‘Audio to video synchronization‘ is anย extremely important aspect of a multimedia file, because when playing, multimedia players rely on it for properly synchronizing the audio and the video tracks. If the synchronization value is incorrect, then the audio (or the video) is going to be played early or with a delay, compared to the other, which is commonly known as ‘lip-sync’ errors, and it jeopardizes all the excitement, obviously.
For instance, while watching a movie, if you have ever come across situations like gunshot firing sounds coming out before its video scene is displayed, then that is due to an improper audio to video sync. This is a pretty common issue in multimedia files and there are many reasons behind its existence, butย for keeping the article clear andย simple so that anyone can understand its context without having to go through boring technical details, I will not mention them. Sometimes syncing issues are also caused by audio hardware devices (sound cards, amplifiers or even buggy headphones etc). But this method that I’m going to show you, only works if the sync problem lies with the multimedia file. If it’s hardware based, you should be looking elsewhere.
In any case, the good news is,ย depending on the OS platform that you are using,ย there are powerful software multimedia players (VLC, KMPlayer, MPLayer etc) that giveย you the ability to manually adjust theย sync (video or audio) setting, thus you can enjoy the multimedia files without such issues.
The problem with that method however is thatย it only saves the sync setting temporarily, and it will be lost the next time you play it. Therefore, the most ideal solution is to use a video syncing (synchronization) software to fix it. And the good news is that you don’t have to buy a premium software utility, because thanks to a great (and free) open-source tool called ‘Avidemux’, youย can save the audio & video out of sync settingย permanently for a lots of video & audio codecs (HD, Blu-ray or even 4K videos!) and container formats (MP4, MKV, FLV, MPEG, AVI etc). ‘Avidemu’ย is actually one of the best free audio and video synchronization software that you can use (it’s originally intended purpose is actually to act as a simple video editing & encoding software whichย comes withย in-built filters etc).
‘Avidemux’ also supports multiple operating systems, therefore you don’t have to be only a Windows user to useย it either. So if you’re having lip-sync errors in one of your multimedia files, then you can try the below ‘Steps’ for a possible fix. While the results are not always guaranteed, ‘Avidemux’ has a good track record. If this method fails, then I’ve added another method that guarantees results in most situations at the end of the article as well.
Update (2017-07-25): Yes it’s been more than four years since I originally wrote this post (yes, even so, I update it from time to time), but the instructions still work. I just added this ‘update’ just to give some confidence to the readers.
Step 1:
First of all, go to this page, download the package and install it (it has pre-built packages for Windows, Mac OS X and GNU/Linux).
Step 2:
Now open ‘Avidemux’ program and load the ‘troublesome’ multimedia file into it.
Step 3:
Before continuing, under the ‘Video Output‘ and ‘Audio Output‘ options, make sure it says ‘Copy’. Also make sure to enable the option called ‘Shift’ (disabled by default), as it is the option that lets you change the audio/video sync setting (shown below).
Any value that you enter here (‘Shift’) should be in milliseconds (1000 milliseconds = 1 second).
Step 4:
Now, if you know what the correct audio/video sync value is then you can skip this and go directly into the end of ‘Step 5‘. If not, click on the ‘Play’ button on ‘Avidemux’ window, so we can observe and see whether the audio comes before or after the video scenes.
Howย to Syncย Audio and Videoย Correctly?
If the audio comes ‘before’ …
The rule of the thumb is that, if the audio is playedย before the video, then that means we have to ‘add time’ to it (thus delaying it), so the video track can ‘catch up’ with the audio track. This is done by entering a positive sync value (say 200 milliseconds) into the ‘Shift’ box.
If the audio comes ‘after’ …
If it comes few seconds (or milliseconds) after the video scene is displayed, then it is already delayed, therefore, we have to ‘remove time’ from it, thus making it being played early.
One cannot give you the exact audio/video sync value that is needed as it is something that you will have to guess by observing the video playback. However, in my experience, the usual range is 200 milliseconds to 2000 milliseconds (2 seconds). But there can be occasions where itย requires one to enter higher values.
Anyhow, unlike above, this time we have to add a negative value as the sync value, in order to make it load earlier (if you enter ‘-200’, then that means the audio will be loaded 200 milliseconds early).
Step 5:
Let’s assume that the file you loaded had an audio track that was being played with a delay. Then to make it play early, we have to enter a negative value. And unless the sync was so big that you could easily tell that the audio came few seconds after the video, I recommend that you start by entering a small negative (say a ‘-100’ milliseconds) value first.
If it fixes the lip-sync a little, then add another -100 (altogether ‘-200’ milliseconds). Then carry it on until you arrive at the optimal audio/video sync value.
However, before every time you apply a different sync setting, first make sure to ‘Pause’ the playback, then add the new value and resume playback. Otherwise ‘Avidemux’ will not apply that setting to the playback.
Note: This is just an example (of course) and depending on your multimedia file, you will have to figure out whether to use a negative or a positive value, but the procedure is just the same.
Step 6:
Once you are satisfied with your new audio/video sync, now all you have to do is to save the changes. But before doing so, just make sure that under the ‘Output Format’ option, you have selected the proper output format.
For example, if the source file was an AVI file, then make sure to select ‘AVI Muxer’. If it was FLV, then choose ‘FLV Muxer’ etc.
‘Avidemux’ doesn’t have like a huge list there, but it supports saving into AVI, FLV, MP4, MPEG-TS, MKV etc. If your input file has a different format than listed there, then you can choose ‘MKV Muxer’ as it supports storing a huge number of different audio and video codecs.
Note: Please be aware that, if you put audio/video that were previously stored in an AVI file into a MKV container, then sure MKV will store them without any issues. But most commercial hardware devices (iPad for example) will struggle to play it afterwards. This does not concern the computer users as most popular players support playing the awesome MKV format.
Update:ย Sometimes while trying to fix a MP4 file, though you might be able to successfully fix it and play it in ‘Avidemux’, the corrected sync value might simplyย be lost,ย after saving it into a new MP4. If this occurs, then I advice you to try selecting ‘MP4v2 Muxer‘ rather than using the ‘MP4 Muxer‘ (under ‘Output Format‘). I have been able to successfully save the corrected sync settings ofย certain MP4 files, by simply making that change alone!.
Update 2: If that doesn’t work, then try changing the audio output from ‘copy’ to ‘MP3 Lame’. Yes this will re-encode the audio file, but it shouldn’t take a long time since encoding an audio track isn’t as difficult or time consuming as encoding a video file. I haven’t tried this, but someone called ‘John’ in the comment section let me know of this which has worked for him under Windows XP. I just have a gut feeling that this might work for all those of you who doesn’t seem to get an audio track in the output file after fixing the lip sync issue.
Step 7:
Once all is done, from its menu click on: ‘File’ -> ‘Save’ to save the changes permanently.
Depending on the length of the video, the time it takes will differ, but it should not take much longer (pretty much like copying that file over to somewhere else) since nothing gets re-encoded.
When it is finished saving, you can open that file using any media player, and if the sync value you entered was correct, then it should be playable without any sync issues. Well, that is it!.
Update: Some readers have complained that ‘Avidemux’ software is not always working for them when correcting theย audio and video synchronization. So I wrote another method that uses another software tool (it involves two tools actually), which is known to work most of the time for correctlyย syncing the audio and the video. However, that method only supports saving your input files (you can input almost anything into it AVI, MPEG, MP4, FLV …) into ‘MKV’, which as briefly mentioned above, is not playable on certain hardware based multimedia players.
You can read about it from here.









255 Comments
Thankyou very much ,it could not be clearer if i can do it then anyone can,thankyou again
You’re welcome!.
I followed your guide to the letter, and the audio never synced, all the program does is make copies…I can do that through windows explorer…please help ๐
Sorry to hear that mate. ‘Avidemux’ is not perfect & does not work well all the time. That said, what is the container format of your multimedia file ? (AVI, MP4 etc)
Have you tried putting the changed file into ‘MKV’, under the ‘Output Format’ option ?
I had the same problem (avidemux only made a copy from my mp4 file) i saved it with mkv format, and everything was fine
Great! ๐ .
I found that if I use AVI files it doesn’t always save correctly. However, if I open Avidemux, load an AVI, adjust and save but close the software afterwards and open it new everytime it works for me. Also the file is saved as an AVI but without the .avi extension – but you can easily add that in file explorer
Hmm, interesting observation…
i have a different method with avidemux
before load files go to preferences /automation and tick all except bitstream.
then load file ,leave all settings defaults ie copy.
avidemux will run
change format to mp4
save file
done
Thanks.
Hey, thanks for the tip – this fixed my out of sync audio. Now it plays back properly. ๐
You’re welcome ‘Natalie’ :).
I have avidmux 2.6.4. It doesn’t have automation under preferences or anywhere else as far as I can tell. are you using a different version?
this worked for me,
thanks a lot ant !!!
You’re welcome leo.
Hi Gayan, your recipe is missing two important bits:
1. Typically, audio/video sync issues occur with DVB recordings. However, in that case the actual offset can vary throughout the recording whenever there is a bad packet in the MPEG transport stream. So you have to use a method that honors the timestamp embedded in the stream, like some players do (VLC does that pretty well, for instance). Avidemux unfortunately doesn’t. ProjectX does, but is very difficult to work with, and apparently fails on MPEG transport streams (at least those generated by my TV set).
2. Even assuming the offset is constant throughout the file, you can’t find the right value by trying to play the video inside Avidemux, because Avidemux’s integrated player causes about 200..300ms audio lag itself. Even with a perfectly sync’d video file, playback inside Avidemux will yield delayed audio. Therefore my method is to select a short scene, transcode it with Avidemux, and play the result in VLC to see if it’s okay.
Thanks ‘Martin’, an interesting observation. I however, haven’t noticed audio delays while playing it through Avidemux’s internal player though.
YOU ARE THE MANNN
:D.
I have a slightly different problem, the audio start out in synch, but gets ahead of the video the farther it plays. By the end, I have a black screen and audi only for about 8 second (45 minute concert vid) Any ideas?
Hi ‘JJ’,
I’m not expert on this, but I too have seen these types of videos, where the sync gets worsened the further it plays. My understanding is however, it is because of corrupted A/V stream, and I’ve never been able to successfully fix them either. That’s the only info I have.
P.S: There are however, ‘Audio Synchronizers’ utilities that are built to address these issues. There are both free and paid ones that you can try (just ‘Google’ the term ‘audio synchronizer software’ for that), good luck.
This is a great guide, however in AVIdemux 2.6.0 when i tried the delay with it set to “copy” i ended up with a file with no audio, so i updated to AVIdemux 2.6.4 and tried again, but this time i got no delay, file was out of sync same as original file. So i tried it with reencode of audio, to same audio format, and the delay worked then, probably with some slight degradation, but probably undetectable to most ears.
Hi,
This could probably be an issue with ‘AVIdemux’, however, did you put (‘copy’) the audio & video into the same container format as the original one. Because sometimes, if you put the ‘fixed’ media file into a different container format (say that you put the ‘MP4’ content to ‘AVI’, this might not be even allowed if the ‘MP4’ contains codecs that are not supported by ‘AVI’, I just wanted to give an example), there could be such issues as well.
As mentioned in the article, if the original input container of the file is not present in the ‘Output Format’ option, then you can use ‘Mkv Muxer’ as it supports virtually all the major audio/video codecs.
This is ridiculous how it does not work. You have it perfect but it just does not save the file you have just corrected. WHY WILL IT NOT SAVE THE CORRECTED FILE.
WHY DO I JUST KEEP GETTING THE SAME FILE OVER AND OVER AGAIN WITH NO ADJUSTMENTS TO THE SOUND. THIS IS HARDLY ROCKET SCIENCE SO IT SHOULD NOT BE DIFFICULT TO FOLLOW THE ABOVE INSTRUCTIONS. THIS SOFTWARE IS NOT ALL THAT IT’S CRACKED UP TO BE
Terima kasih banyak atas infonya..God Bless You…
You’re welcome Indra.
Thanks a lot for this tutorial ๐ In my case when I’ve been trying to combine mp4 file with mp4 muxer I couldn’t save it. So I’ve changed it to mkv muxer and it helped ๐
You’re welcome ๐
Thanks!! Your steps worked like a charm!!
You’re welcome Steve.
The suggestion to re-encode just the audio, fixed the trouble I was having. I figured out I needed 18 seconds of audio shift which is 18,000 milliseconds (the value you enter in the avidemux is milliseconds, in this case 18000), which is a lot.
I had a mp4 video in a avi container. I’m using the Mac version 2.6.4 (r8694).
My audio was ahead of the video by 18 seconds, which is 18000 ms (milliseconds, 1000 of which equal a second), which is the value you have to put in the shifting value box. You also have to check the box by shift window under “Audio Output” on the left hand menu. if it had been behind by the same amount the value in the shift box would be -18000 instead.
Changing the shift box in the left hand menu automatically changes the same choice if you use the menus at the top of the screen. They are the same controller and should both be checked when in use and have the same value. I’d use the one on the left hand menu, since it’s right there.
My video had ads that had been inserted after the 18 second delay had been introduced, so I had to chop those out before shifting the 18 seconds. After the ads were chopped out, I did the 18 second shift.
The shifting showed up in avidemux after you stop the player and restart it in avidemux. The synch was perfect in avidemux.
However, when I used copy for the video and audio, with of course the shift box checked and with the 18000 value, the resulting video copy did not reflect the shift I had done and the 18 second delay was in the new copy.
I took the suggestion from the above comments and made a new copy. On the new copy I kept the video choice as copy but on the audio I changed copy to MP3 (Lame). Then on the menu I chose save, named it and avidemux made a new copy. Of course it took maybe a couple of minutes instead of 20 seconds to make the copy because the audio was being re-encoded.
The result was a new Video with audio that matched the video. I don’t know enough to know if MP3 Lame was the best choice regarding preserving quality, but it did work and kept the file size similar.
I’ve just starting editing so I’ve probably shared more details than some need, but I would have loved to have read this post several hours ago, before I had to figure out what value was supposed to be in the shift box and should it be positive or negative. Hoping I can save someone else the effort.
Thank you!.
avidemux can only open mp4 format video is it?
i try to open the rmvb, it will say it cannot locate the file.
No, it can open other containers, perhaps not ‘rmvb’ though.
Using a Mac OS X . . ..
I ripped a number of DVDs using MacX Ripper Pro and out of 100+ movies ripped, only three would not rip with ordinary settings. For those three it was necessary to use the “safe mode” option, but it left the audio out of sync.
Your explanation on how to sync the audio is excellent. I also had problems saving the synced-up file, but found the following settings to work:
Video Output – MPEG4 (x264)
Audio Output -Copy
Output Format – MP4 Mixer
The file takes a long time to convert – 1:1 movie time.
You’re welcome Tymothy, and thank you also for the input.
Update after checking my results:
Although I could save the corrected file, final rendering revealed the situation described in comments above. The file is properly synced at the beginning of the film, but gradually falls out of sync where by the end it’s as much as 3/4 sec. out.
Thx so much for this helpful tutorial ๐ You’re the best ๐ ๐ ๐ !!!
You’re welcome Kevin :).
I was able to properly synchronize the audio with the video using your instruction, but then I was unable to save the corrected file. When you click “file”, then “save”, there doesn’t seem to be anything happening nor any is there any indication of the saving process to let you know when it is complete. Where is the “saved” file stored? When I try to play the original file which I loaded, it is not changed.
It should be saved in the location that you set after clicking on the ‘Save’ button (when you click it, it opens up a ‘file-save’ message box, here give a name to the file and a location).
Please remember that, as I’ve said many times above and in the article, you should carefully select the ‘Output Format’, otherwise you’ll run into playback issues later. I do know that ‘Avidemux’ is not perfect and has its issues. For instance, I corrected the sync of a MP4 file and saved it in the MP4 format and it worked perfectly well. However, I also decided to save the same file into the ‘MKV’ format/container (within the same ‘Avidemux’ session), and the file was saved into ‘MKV, but without the corrected sync!.
Weird enough, I clicked on the ‘Play’ button in ‘Avidemux’, and saw that even after adding the correct sync setting, the playback was still going on with the original out-of-sync setting (though on the earlier occasion, when I saved it into MP4, it played with the correct sync).
So I manually changed the value to a different one, and let it play, and then re-changed it to the correct sync and let it play again, and this time it was playing with the correct setting. Then I saved it into ‘MKV’ again, and this occasion, it saved it with the correct sync setting.
What I’m trying to say is that, most users who complain it not being able to fix their issues (though there certainly are occasions where ‘Avidemux’ doesn’t work), use a bit of common sense, and double check before you save things, because this usually fixes a lot of issues. Good luck.
When I click “file” then “save” at the end of the process, no “file-save” message box appears as you mention above. Why is that?
Also, I made sure to select the output format as MP4 (the same format as the original file) prior to saving.
I’m sorry Jean, I don’t know what it doesn’t appear. Just make sure that you’re using the latest stable version of Avidemux, and especially if you’re using Windows 64-bit, then try the 32-bit version of Avidemux rather than the 64-bit. Also, try changing the output format into MKV to see if that helps. That’s the best advice I can give you.
Thanks for the prompt advice.
Unfortunately, I tried both the 64- and 32-bit version Avidmux and still no save message box appears. I also tried to change to output format to MKV as you suggested, but also without success.
I guess I’ll have to give up and find some other audio-video sync software.
Thanks anyway
It’s me again. I think I finally figured out how to do it. Apparently, you can only save the file in the “pause” mode, or at least when you click “pause” and then “save”, the “save” message box does appear and lets you name and direct the file to be saved as you stated. However, f you click “save” when the file is still playing, nothing happens.
Thanks again.
Excellent!. As I said before, a little common sense goes a long way ;-).