Close Menu
    X (Twitter)
    Hectic GeekHectic Geek
    • Apps
      • Apps for Mac
      • Apps for PCs
      • Best Apps
    • Concepts
      • Comparison
      • For Geeks
      • IT Careers
    • Gadgets
      • Accessories
      • Best Work Laptops
      • Budget Laptops
    • GNU/Linux
      • Ubuntu
    • How To
      • Virtualization
      • Windows
      • Windows How-To
    Hectic GeekHectic Geek
    Home » How to Fix an Incorrect Audio/Video Sync Setting and Save it Permanently using ‘Avidemux’
    GNU/Linux

    How to Fix an Incorrect Audio/Video Sync Setting and Save it Permanently using ‘Avidemux’

    GayanBy GayanFebruary 3, 2013Updated:June 24, 2023255 Comments8 Mins Read
    Twitter Reddit Telegram WhatsApp Email
    Share
    Twitter Reddit Telegram WhatsApp Email

    ‘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.

    'Avidemux' running on Windows 8

    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).

    Enabling few primary options in 'Avidemux'

    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’ …

    Positive sync value - Avidemux

    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’ …

    Negative sync value - Avidemux

    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.

    Proper way of entering audio-video sync values - Avidemux

    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.

    Choosing the proper container format - Avidemux

    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.

    Saving a file - Avidemux

    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.

    Share. Twitter Reddit Telegram WhatsApp Email
    Gayan

    An RHCE, 'Linux' user with 14+ years of experience. Extreme lover of Linux and FOSS. He is passionate to test every Linux distribution & compare with the previous release to write in-depth articles to help the FOSS community.

    Related Posts

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    AlmaLinux vs Rocky Linux: What you need to know

    August 24, 2023

    Pop!_OS VS Linux Mint, Which One to Select in 2023

    July 27, 2023

    Debian vs Ubuntu Server: A Brief Comparison for Beginners

    July 2, 2023

    255 Comments

    1. Jean-Luc Glorieux on November 7, 2013 4:43 am

      I apologize for being such a pest but I am again having a problem with the “save” function. Suddenly after modifying and saving successfully about a dozen files, I still am able to properly sync audio and video but I am then unable to save the modified file. The “save” function seems to work normally, but then the saved file is not the modified one but the original one. Any suggestions? Thanks.

      Reply
      • Gayan on November 7, 2013 8:02 am

        Hi Jean,

        I’m not sure if this helps but you can try the following.

        1. Once you’ve figured out the correct sync setting/value, take a note of it (memorize it or save it into a text file for later use) and close all running instances of ‘Avidemux’).

        2. Then re-open ‘Avidemux’ and load the multimedia file and re-enter the sync setting/value directly into the ‘Shift’ message box (without using the playback toolbar).

        3. After that try saving the file (again, make sure to select the proper ‘muxer’) to see if it fixes it.

        Reply
        • Jean-Luc Glorieux on November 7, 2013 10:35 pm

          Dear Gayan:
          Thank you very much for your quick feedback and suggestions. I did exactly as you suggested above but, unfortunately, this did not fix the problem and I am still unable to save the corrected file. Instead, the original uncorrected file is saved every time. This is very frustrating because, until yesterday, I had been able to successfully lip sync a number of my anime download files (all in MP4 format) but, now, I cannot continue this, even though I am not aware of doing anything different. Is there a prescribed file saving procedure (file name and/or location) which I am somehow failing to implement? I don’t understand. I even tried and re-installed the Avidemux software, but this did not correct the problem either. Any further suggestions you might have would be very welcome.

          Reply
    2. Jean-Luc Glorieux on November 8, 2013 8:15 am

      Dear Gayan:
      Well, I mulled over some more this sudden inability to save the corrected file and I eventually decided to try one of the suggestions posted above (by Fresh Air on September 5, 2013) and set the Audio Output to “MP3(lame)” instead of “Copy”.
      I am glad to report that this also did the trick for me. It took considerably longer to save the file (probably because of the conversion which only proceeded at around 350 fps), but I ended up with a properly synced saved file. Hourrah!
      I still don’t understand what happened and why I started needing this procedural change all of a sudden, but any way that works is good enough for me.

      Reply
      • Gayan on November 8, 2013 9:40 am

        Yes, when you choose anything other than ‘Copy’, it re-encodes the track and thus it takes more time. I’m currently writing about using ‘MKVToolNix’ for fixing these issues, though this tool only gives you a MKV output which is not that widely supported by hardware based players.

        Reply
    3. Amol on December 23, 2013 7:56 am

      Hi..i could do all the steps properly but just as i save and play the file in vlc..d audio itself has disappeared”!!total mute…pls tell me solution for this

      Reply
      • Gayan on December 23, 2013 8:45 am

        Hi Amol,

        To what container did you put the file into ? When VLC is playing the file, press ‘Ctrl + J’ key combination. This will show you the audio & video tacks inside the multimedia file. Take a look to see if it lists the audio track. If it does, then try playing the file with another application.

        If all fail, then you can follow these steps for correcting the issues and this method, unlike the one described in this article, most of the time fixes lip-sync issues, though its only drawback is that it forces you to put the corrected multimedia file into the MKV container, which however shouldn’t be a problem as long as you’re planing to play it on a computer (as some hardware based multimedia players don’t support MKV).

        Reply
    4. Amol on December 23, 2013 4:55 pm

      Hi gayan…it was a .mkv file and i had set the output format to mkv muxer…was that a mistake?

      Reply
      • Gayan on December 23, 2013 5:49 pm

        Hi Amol,

        I’m not sure what the issue is. However, try the suggested article of my above answer and that method should work without any issues since the file that you’re having issues is also a MKV file.

        Reply
    5. Amol on December 23, 2013 6:34 pm

      Hmm okay i will..and i tried the video in GOM player..in that the video itself gets stuck
      Anyway thanks for the help 🙂

      Reply
      • Gayan on December 24, 2013 5:21 am

        No problem :).

        Reply
    6. Tim Jong-Il on January 18, 2014 7:07 pm

      This is only if the audio isn’t in time with the video. Do you know of a way to fix the audio is it’s slightly slower than the video? As in, at the start of the movie it’s perfectly in sync, but by the 2 hour mark, it’s out by nearly half a second.

      Reply
      • Gayan on January 18, 2014 7:51 pm

        Hi Tim,

        This usually happens when the audio playback rate (based on the ‘audio time codec’ setting) is imperfectly matched with the video FPS. So as you mentioned, although the track may play ‘perfectly’ in the beginning, as it progresses, the audio gets ahead or behind the video, thus leading to a bad lip-sync. For instance, if the video fps is 30 but the audio playback speed is set around to match a video that plays at 29.97 fps, then it is going to create a small lip-sync issue as the track progresses.

        I haven’t tried to fix this using ‘Avidemux’ (I don’t think it supports it), but if you’re familiar with ‘MKVTooNix’ (I did mention it here), and if you can calculate (within a certain degree of accuracy) how fast/slow the audio has to be played so that it matches with the video fps, then there is an option in ‘MKVToolNix’ called ‘Stretch by’ that let you control the audio playback speed, and it might be able to fix it.


        A quick recap …

        Figure out the by how much the audio should be delayed or played ahead, then once installed, add your multimedia file into ‘MKVToolNix’ window and select the audio track and then simply enter the value into the ‘Stretch by’ box and save your changes. If you do this correctly, it should fix the issue.

        You can research this more by using the below articles if you like …

        http://www.animepassion.net/topic/1426-guide-for-time-stretching-audiotracks-in-mkvwhole-trackpartial/

        http://documentation.apple.com/en/cinematools/usermanual/index.html#chapter=2%26section=6

        Good luck.

        Reply
    7. Abyssen The Holy on January 27, 2014 6:27 pm

      Kind sir.
      You have solved a crisis for me. This works flawlessly. Thank you very much.

      Reply
      • Gayan on January 28, 2014 6:23 am

        You’re welcome 🙂 .

        Reply
    8. GK on February 3, 2014 4:22 pm

      Thanks for the tip, it worked well for me.

      Reply
      • Gayan on February 3, 2014 6:32 pm

        You’re welcome GK.

        Reply
    9. GBear on February 21, 2014 9:38 pm

      Very good writing, thank you for taking the time to be clear. Most people don’t.

      I have a different problem, my mp4 videos play fine with various computer players, but then have audio sync problem when played with my Western Digital player connected to my TV. I find the problems are mostly with MP4, and not AVI. If I fast forward, they can get out of sync, and if I rewind a bit, frequently that clears up the problem.

      So it doesn’t seem like it is a problem in the file, but in the way the Western Digital device is playing the file. What might be going on here, and what should I do to try and fix it?

      Reply
      • Gayan on February 22, 2014 7:25 am

        Hi GBear,

        First of all, you’re welcome. About the issue that you’re having: Well, since your MP4 files play just fine on other media players, it’s probably due to a bug in the software included in ‘Western Digital Player’. So other than saying ‘you should contact WD’, I have no other answer. Sorry about that.

        Reply
    10. Bill on February 28, 2014 7:23 am

      I have a similar problem, except that I have some videos that have very low volume. The video, in the format its in is sync’d perfectly. When I use AVS Video editor to increase the volume the output video comes out of sync by several hundred ms with the audio leading the video. Does avidemux provide for an increase of the volume in its output? That’s the only problem I have is trying to get the volume high enough to play properly on my TV.

      Reply
      • Gayan on March 2, 2014 10:50 am

        Hi Bill,

        No, unless you’re planning on re-encoding the audio track, ‘Avidemux’ does not let changing the volume level when used just for muxing, as far as I know.

        Reply
    11. Ronit Roy on March 7, 2014 2:26 pm

      Thanks!!!!!!!!

      Reply
      • Gayan on March 7, 2014 7:12 pm

        You’re welcome!.

        Reply
    12. Ketim on March 24, 2014 3:50 pm

      Thanks, this is an extremely useful guide. And it is simple too.

      Reply
      • Gayan on March 26, 2014 7:01 am

        You’re welcome Ketim.

        Reply
    13. Amber Tripathi on April 1, 2014 3:42 pm

      Really nice support from you and thanks for revealing

      Reply
      • Gayan on April 1, 2014 6:52 pm

        The pleasure is all mine Amber 🙂 .

        Reply
    14. noblsht on April 10, 2014 3:34 am

      Thanks, I’ve been going around in circles for days trying many different methods to get the audio to sync with the video, I finally got it with your help and advice, one thing I would like to mention, Is when I first started loading videos I did not have any audio. In the application, If people have this issue what they need to go to is the audio settings and click core audio and then the audio portion will be audible in the software program thanks again

      Reply
      • Gayan on April 10, 2014 2:28 pm

        You’re welcome, and thank you also for the input 🙂 .

        Reply
    15. daser basyouni on April 11, 2014 1:13 pm

      thank you so much

      Reply
      • Gayan on April 11, 2014 4:52 pm

        You’re welcome.

        Reply
    16. CRISTY on April 19, 2014 4:11 am

      I have a different issue file syncs and saves however after saving cannot view it?
      have tried 2 different formats of the same video am I doing something wrong?

      Reply
      • CRISTY on April 19, 2014 5:18 am

        I think I have got it, have to convert then sync then convert again pain but works I think

        Reply
    17. Pejo on May 4, 2014 6:56 pm

      Thanks for clear description and for saving my time with this very fast method of solving audio delay in video file.

      Reply
      • Gayan on May 5, 2014 11:17 am

        You’re welcome.

        Reply
    18. Chris Smith-Hill on May 9, 2014 12:55 pm

      Didn’t work. Editing Shift does nothing to my MP4.

      Reply
      • Gayan on May 24, 2014 7:18 am

        Try saving into ‘MP4v2 Muxer’ on the ‘Output Format’ rather than using the ‘MP4 Muxer’.

        Reply
    19. Todd on May 23, 2014 7:55 am

      I used avidemux and the sync worked great while still in the program. My problem I pulled in a mp4 and saved as an mp4 but it will not save as a useable file. Usually a mp4 file looks like a little film clip in my files. This looks like a piece of paper with the end folded over and list it as just (file). The same thing happens when I pull in an AVI file and save as an AVI file. Any suggestions.

      Reply
      • Gayan on May 24, 2014 7:16 am

        I used the latest version of Avidemux on Windows 8.1 and everything worked for me.

        It seems to me in your computer however, that the output file’s extension goes missing while saving, so (again, assuming that it is the cause) you try manually add the extension (mp4 or avi …) while saving the file by entering the extension at the end of its name field, followed by a full stop.

        For example:

        myfilename.mp4

        Or

        myfilename.avi

        Totally unrelated …

        If the corrected sync setting does not get saved when saving as mp4 (happened to me) then try saving it into ‘MP4v2 Muxer’ under ‘Output Format’.

        Reply
        • Todd on May 27, 2014 2:41 am

          That worked. Thank you. This is so cool. I have deleted so many otherwise great bootleg concert vids because of the out of sync. Now I can fix them. I love it. I appreciate your time to help.

          Reply
          • Gayan on May 27, 2014 7:11 am

            You’re welcome Todd.

            Reply
    20. Shraddha on June 20, 2014 12:12 pm

      Thankyou! It worked very well.. HELPFUL

      Reply
      • Gayan on June 21, 2014 6:03 am

        You’re welcome Shraddha.

        Reply
    ← Older Comments
    Newer Comments →
    Leave A Reply Cancel Reply

    This site uses Akismet to reduce spam. Learn how your comment data is processed.

    Latest Posts

    Transforming Geek Culture with Advanced Software Development

    April 8, 2024

    The Role of Technology in Enhancing Digital Signage Solutions

    February 21, 2024

    How to Check Linux CPU Usage?

    February 5, 2024

    Linux export Command: A Comprehensive Tutorial

    February 3, 2024

    [Fixed] HDMI No Signal to TV or Monitor on Windows 10/11

    November 7, 2023

    AlmaLinux vs Ubuntu – How to Select the Best One?

    October 22, 2023

    Subscribe to Updates

    Get the latest news and updates from Hectic Geek. We won't overload you or sell your data!

    Contact
    • About Us
    • Contact Us
    • Privacy Policy
    • Write for Us
    X (Twitter)
    © 2026 Hectic Geek.

    Type above and press Enter to search. Press Esc to cancel.