VideoHelp Forum




+ Reply to Thread
Results 1 to 18 of 18
  1. I have a x264 avi file with no sound and a wav file. Is there a software that will sync and mux these two together without re-encoding the video? The audio can be encoded to other formats such as AAC, AC3.
    Quote Quote  
  2. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Code:
    ffmpeg -i video.avi -i audio.wav -map 0:v -map 1:a -c:v copy -c:a aac -b:a 160k output.mp4
    Quote Quote  
  3. I need to sync the audio to the video too, like moving the timeline around.
    Quote Quote  
  4. Member
    Join Date
    Mar 2008
    Location
    United States
    Search Comp PM
    It depends on whether it's just an offset problem, or whether it drifts progressively worse ...
    Quote Quote  
  5. It's not an offset problem I just need to put the audio at some point in time in the video like in Adobe Premiere. I'll try Adobe Premiere and see if it won't re-encode.
    Quote Quote  
  6. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    Originally Posted by digicube View Post
    I need to sync the audio to the video too, like moving the timeline around.
    Code:
    ffmpeg -i video.avi -itsoffset secs -i audio.wav -map 0:v -map 1:a -c:v copy -c:a aac -b:a 160k output.mp4
    where secs is the number of seconds to delay the audio. Decimals and negative values are permitted.
    Quote Quote  
  7. i don't know the numbers. I have to visually sync people's lips to the works spoken.
    Quote Quote  
  8. Member
    Join Date
    Aug 2010
    Location
    San Francisco, California
    Search PM
    I guess you're welcome anyway.
    Quote Quote  
  9. Yea. Thanks anyway.
    Quote Quote  
  10. Mod Neophyte redwudz's Avatar
    Join Date
    Sep 2002
    Location
    USA
    Search Comp PM
    I've used MPC-HC to determine the sync offset, if that is your problem. Play the video and use the + and - keyboard keypad keys as the video plays.
    When you get the audio synced, write down the offset and add it to your encoder/editor program.

    But if the sync changes during the playback, then you would need to adjust the length of the audio.
    Or if you are unfortunate, you might have a combination of both sync errors.
    Quote Quote  
  11. I tried that before, it's time consuming and have to go through many trial and error. It's better if I can visually see the wave forms and the video and then align them together. I'm currently trying Adobe After Effects but it's a complicated software, so I'm watching some tutorials.
    Quote Quote  
  12. Originally Posted by digicube View Post
    It's better if I can visually see the wave forms and the video and then align them together.
    I use AviSynth's AudioGraph filter to do just that:

    https://forum.videohelp.com/threads/383349-Cropping-the-top-of-frame-in-Handbrake/page4#post2487503
    Image Attached Thumbnails Click image for larger version

Name:	1.jpg
Views:	89
Size:	17.9 KB
ID:	41996  

    Click image for larger version

Name:	2.jpg
Views:	119
Size:	19.2 KB
ID:	41997  

    Click image for larger version

Name:	3.jpg
Views:	77
Size:	19.8 KB
ID:	41998  

    Quote Quote  
  13. That looks cool. I'll try that if Adobe fails.
    Quote Quote  
  14. Looks like the video and audio are at different frame rates. The video is exactly 18 fps and the audio is slightly under 18 fps. Video duration is 16min 17s and the audio duration is 16min 38s. How do I change the frame rate of the audio so it syncs with the video? I assume Avisynth can do this.
    Quote Quote  
  15. Audio doesn't have a framerate. But, yes, audio can be stretched using AviSynth. I do my audio work in Audacity, but AviSynth's TimeStretch command might suit you.
    Quote Quote  
  16. How about if we change the video frame rate to suite the audio's duration time? ChangeFPS() or ConvertFPS() will do? Is this better than TimeStretch?

    I will try audacity first and change the speed.
    Last edited by digicube; 22nd Jun 2017 at 11:31.
    Quote Quote  
  17. Neither ChangeFPS() nor ConvertFPS() change video duration, only AssumeFPS() does. But:
    - VirtualDub should be able to do that without re-encoding. (AviSynth() implies reencoding)
    - matching video to audio duration doesn't always guarantee sync. (only with constant frame rate and lengths of the tracks matching)
    Quote Quote  
  18. Audacity's speed change works. Thanks everyone for the help.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!