Friday, November 14, 2008

How To Easily Fix AVI Audio-Video Sync Problems

Audio-Video sync issues can be very frustrating, whether you have spent hours encoding a video or hours downloading it, nothing quite ruins it for you like the audio not matching the lips moving, making it look like a 1970's English dubbed karate flick. Fortunately, this problem can often be corrected in a matter of minutes especially if it's not too bad off to start with. As usual, I'll walk you through this process, how I do it, step-by-step.

NOTE: I highly advise you to make a copy of your video file (copy > paste) before trying to adjust the audio by any method, just to be on the safe side.

1. First, download YAAI (freeware):

"YAAI - Yet Another Avi Info"
yaai.sourceforge.net

Download the "YAAI executable" (current ver. is YAAI_2.0.2.485.zip) and unzip it.

2. Launch YAAI.exe, and "Open avi" dialog will appear.
3. Find and open the AVI file, and YAAI will open displaying info about your video.

4. Click on "Sync Audio" tab. Small video player will pop up.


Basically, there are two types of video-audio sync problems. Often the video starts out fine but as the video plays it gets further and further out of sync. In other cases the sync is uniformly off from start to finish (and not-so-commonly you will run into a combination of both)


Step 5. If the audio starts out ok but by the end of a video it gets increasingly out of sync (often not even noticeable at all until the very end) what we want to do is slightly change the video framerate in the 'stretch audio' area of YAAI. If at the end the audio is leading the video click the +0.0001 button a few times to change the framerate (if the audio lags at the end, click the (-) one). Click Apply, and check it by sliding the slider on the preview player to the end of the video to see if it got better or worse.


Repeat trial and error till it's right. I can usually get this perfectly synced in 2 or 3 tries. Once you get used to it and become a better judge of how much of a delay or advance to enter it becomes much easier.


Step 6. Finally, when it's in sync at the end, close YAAI tool. When it asks the question: "Do you want to keep the changes?", click Yes. The file will be corrected instantly.

If the sync is off uniformly throughout the entire movie, you use the delay audio/video settings similarly....


TIP: For videos where the sync problem seems uniformly off from start to finish, I usually use VLC Player to adjust the sync while playing the video to see how far off it is then I actually fix the file with YAAI using the 'delay audio/video' settings using the amount of delay/advance I figured out from VLC player (this saves time by putting you in the right ballpark in YAAI).

VLC Media Player
www.videolan.org/vlc/

Adjusting the audio-video sync with VLC Player v9.4:
Tools > Extended Settings > Synchronization, Then click the up or down buttons on the "Advance of audio over video" ('up' moves the audio back. 'down' advances it ahead of the video) while the video is playing.


Often you have to enter a number instead of using the up/down buttons in VLC Player to get the sync just right. I usually just get it close enough to determine what value I will start off with entering in YAAI.

You can download this guide in PDF format here for your future reference.

YAAI works to fix most (but apparently not all) audio-video sync problems in videos in .AVI format, or so I'm told as it's always worked for me so far, however if this fails you, you may want to try here for several other methods.

[NOTE} I have corrected the placement of two of the images above which may have confused people (OOPS!) and made a slight edit in the instructions for clarity. I apologize if this confused anyone.