VideoHelp Forum

Our website is made possible by displaying online advertisements to our visitors. Consider supporting us by disable your adblocker or Try ConvertXtoDVD and convert all your movies to DVD. Free trial ! :)
+ Reply to Thread
Results 1 to 4 of 4
Thread
  1. Member
    Join Date
    Aug 2006
    Location
    United States
    Search Comp PM
    EDIT: I fixed it, I'm a happy camper

    Hi guys,

    I'm creating a movie from images and trying to add audio. The movie comes out perfectly but when I add audio it's not only way out of sync but the movie comes out longer than it should be.

    Here is the setup:

    300 bitmaps at 30 fps make a 10 sec video perfectly
    a .wav file that's exactly 10 secs at sample rate 44100 with 2 channels and 16-bit (standard CD PCM)

    When I add in the audio the movie becomes 12 secs and the sound events occur much too early.

    Here is the code:

    Code:
    // this works great:
    ffmpeg -r 30 -i frame_%d.bmp -vcodec rawvideo -y movie.avi
    
    // trying to add audio:
    ffmpeg -r 30 -i frame_%d.bmp -i audio.wav -vcodec rawvideo -acodec copy -y movie.avi
    This is killing me, please help. Thank you.
    Last edited by Endemoniada; 30th Jan 2013 at 20:31. Reason: Solved
    Quote Quote  
  2. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    You could try mux the audio after

    Code:
    ffmpeg -i movie.avi -i audio.wav -vcodec copy -acodec copy newmovie.avi
    Quote Quote  
  3. I'm a MEGA Super Moderator Baldrick's Avatar
    Join Date
    Aug 2000
    Location
    Sweden
    Search Comp PM
    I see you solved it.....it would would be good if you told how also. It might help others who searches for same problem.
    Quote Quote  
  4. untested:
    Code:
    ffmpeg -r 30 -i frame_%d.bmp -i audio.wav -map 0:0 -map 1:1 -c:v:0 rawvideo -c:a:1 copy -y movie.avi
    Quote Quote  



Similar Threads