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. Latest Solution on July 26, 2016 8:53 am

      Good day, I actually fix out of sync audio and video using handbrake. Thanks I will download Avidemux

      Reply
    2. trm on August 19, 2016 11:16 pm

      many thanks

      Reply
      • Gayan on August 20, 2016 3:37 pm

        The pleasure is all mine!

        Reply
    3. Robert Schatz on September 8, 2016 7:59 pm

      I have a gopro mp4 file which I need to open. When I use your application it says “cannot find a demuxer for…”

      The two mp4 files have data but neither can open in quicktime. Also have tried two repair utilities and they cannot open it either…remo repair and stellerphoenix repair.

      any advice would be appreciated. by the way only the video is needed, sound is not important

      Reply
      • Gayan on September 9, 2016 8:56 am

        Hi Robert,

        Have you tried using MkvToolNix? It’s a very powerful utility that lets you open huge number of multimedia containers and extract (either subtitle, audio, video) the content into a MKV file without encoding.

        https://mkvtoolnix.download/

        Remember though that the output file will be a MKV one.

        Reply
    4. bright2light on September 22, 2016 11:11 pm

      You saved my bacon!!

      My original file was a .WMV file so I could not save it successfully (it ended up being very garbled) using Avidemux. So I used another software – NCH videopad editor – to convert it into a .AVI file and then opened that in Avidemux. It finally worked! What a relief, thank you so much!

      Reply
      • Gayan on September 23, 2016 7:49 am

        You’re welcome 🙂 .

        Reply
    5. richfiles on October 10, 2016 3:59 am

      This only shifts audio and video.

      For those with a recording that has dropped frames due to recording from a degrading source, this does absolutely nothing.

      I have a video, recorded from VHS that has so many distorted frames that the capture device dropped, that the video ends at 49:12, and the audio ends 5:50 later, at 55:02. Both audio and video start synced at 00:00.

      This is the TRUE monster of a sync problem that has plagued me for years. Is there a solution for this type of sync problem? Something that will allow me to scale the length of a video to bring it back up to the play length of it’s audio. I don’t even mind if each moment is slightly out of sync, as long as I don’t have segments of video that play MINUTES before the corresponding audio!

      Reply
      • Gayan on October 17, 2016 10:25 am

        Hi,

        Yes there is a possible solution and it has already been answered by me and a few others as well. What you need to do is to manually ‘stretch’ the audio so that it plays in the proper speed in relative to the video frame rate. Just look for my answer to ‘Tim Jong-Il’ (just search for his name within the article).

        Reply
    6. MB on February 8, 2017 8:23 am

      Running Mac OSX 10.9.5 and Avidemux would not open no matter what I tried

      Reply
      • Gayan on February 15, 2017 11:03 am

        Hi,

        I don’t have the Apple Mac operating system. However, have you tried Googling it:

        https://www.google.lk/webhp?sourceid=chrome-instant&ion=1&espv=2&ie=UTF-8#q=can't+open+avidemux+mac

        Reply
    7. Arjunvarma on February 15, 2017 8:22 pm

      Thank you so much It worked

      Reply
      • Gayan on February 16, 2017 8:07 am

        You’re welcome.

        Reply
    8. pmshah on February 26, 2017 9:37 am

      If the file you are playing is in mkv container there is an easier fix than this. Open header editor in MkvToolNix Gui. and make necessary changes in it. This you can do in under 1 minute and the changes are permanent. You could do this to mp4 containers too. by following the same method and making necessary changes in the header as the file is being ripped to an mkv container.

      Reply
    9. john on March 21, 2017 6:27 pm

      This was awesome! Thank you:) Lots of comments but for anyone coming across this one… this is what I did on Linux. I choose to reencode instead of playing with audio synching (Shift).

      Synaptic -> Avidemux (installed w/o issue: Mint Cinnamon 17.3)
      Run Avidemux
      Load offending video
      Selected -> Video: mpeg-4 ASP (Xvid)
      Selected -> Audio: MP3 (lame)
      Shift -> NOT selected

      10 minutes later (on old duo-core laptop), I got a new AVI file with video/audio working perfectly.

      Reply
      • Gayan on March 22, 2017 11:29 am

        You’re welcome John.

        Reply
    10. Sake SM on April 15, 2017 9:29 am

      This is the best Sync Program out there. and your simple, straight forward instructions are the best…thanks heaps!

      Reply
      • Gayan on April 17, 2017 8:36 am

        You’re welcome.

        Reply
    11. maxMJ on April 18, 2017 11:11 pm

      I fixed audio sync issue in my MP4 video file in seconds. It’s like magic. Other software’s actually takes hours to do such a task. Thank you Gayan, you are a live saver.

      Reply
      • Gayan on April 19, 2017 7:32 am

        You’re welcome 🙂 .

        Reply
    12. Kevin on April 25, 2017 8:47 am

      I have a file that needs sync adjustment twice in the middle. i.e.

      00:00:00 to 00:42:53 no sync required

      00:42:53 to 01:13:56 -500ms required

      01:13:56 to end -1000ms (additional -500ms ) required

      Your guide does not show how to achieve that

      Reply
    13. Arias on May 8, 2017 11:44 pm

      I figured it out. In case anyone has the same kind of problem, you need to cut out the part that is out of sync and save it as a new file before you sync the audio, Avidemux cannot treat it in isolation on it’s own.

      Select the time where the problem occurs. I recommend cutting at nearest keyframes (Go to previous/next keyframe – at the bottom left bar) to avoid corruption at cutting points. Use Ctrl + PgUp to set Marker A, and Ctrl + PgDn to set Marker B. Then click DEL to delete the time in between Marker A and B. Use that method to cut out and save the clips into new files as part 1, part 2, part 3, etc. Select Mkv Muxer as Output format before saving. (It’s apparently the best option when dealing with H.265/H.264, and you can convert the finished video back to mp4, or something else with Apowersoft Free Online Video Converter).

      Now shift the audio of “part 2” (In my case) as many milliseconds as you need to sync it, and save it. When you’re done with all the syncing, open part 1, and once it’s up click File – Append, and select Part 2, then File – Append, and select Part 3.

      And there you have it. Your clips are merged. Done.

      Reply
      • Arias on May 11, 2017 4:22 pm

        Forgot to mention that you should leave Video Output and Audio Output as “Copy” the entire time.

        Reply
    14. David on May 29, 2017 2:20 am

      Can’t begin. Opened MP4 – got error message about no demux. It would be good to understand the problem with Avidemux instead of going to another tool that forces a file type change.

      Reply
    15. Richard on May 30, 2017 8:48 pm

      No wonder this article appears high up in Google searches- it worked, even after I raised a cynical eyebrow that it might not worked properly several years after its first publication. Thank you very much for such a clearly written guide!

      Reply
      • Gayan on May 31, 2017 7:01 pm

        You’re welcome Richard.

        Reply
    16. vulcanmeister on July 5, 2017 5:22 am

      I had a great movie but the audio sync was way off…about +10.85 sec!
      I followed your suggestion and it worked perfectly.
      Thank you so much!

      Reply
      • Gayan on July 25, 2017 10:57 am

        You’re welcome.

        Reply
    17. Emily on July 20, 2017 1:15 pm

      Thanks so much for the post! I got my mp4 file on there no problem, but the application won’t play the audio? I tried to mess around with the volume but it won’t let me click on the dial. Halp

      Reply
      • Gayan on July 25, 2017 11:11 am

        Hi Emily,

        Hmm that’s strange. Avidemux supports playing lots of audio/video and container formats (http://www.avidemux.org/admWiki/doku.php?id=general:input_formats). Is the audio playable on other players (say on VLC for instance)?

        Reply
    18. Barry Deutsch on August 19, 2017 9:39 pm

      Thanks very much for the clear instructions! Worked perfectly for me.

      Reply
      • Gayan on August 22, 2017 7:05 pm

        You’re welcome.

        Reply
    19. Steve Dunn on October 12, 2017 7:13 pm

      Just echoing the last poster – great instructions, did the job. Thanks.

      Reply
      • Gayan on October 21, 2017 3:27 pm

        You’re welcome Steve.

        Reply
    20. Asanisma on December 2, 2017 11:42 am

      Thank you for this guide, works great. I successfully synchronized the audio.

      Reply
      • Gayan on December 3, 2017 7:21 am

        You’re welcome.

        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.