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. karan on July 4, 2014 11:36 am

      thank u very much .. it helped

      Reply
      • Gayan on July 4, 2014 7:58 pm

        You’re welcome.

        Reply
    2. John on August 20, 2014 1:41 am

      It works good until I save it and then it reverts back to non-sync.
      What am I doing wrong?
      Do I have to let the video play full length or can I stop it when I have the correct sync and save it.
      I have tried it both ways and it does not work. Still out of sync.
      Also unless I save it as the original name, it will not save at all.
      Non of the formats will work except for the “dummy”.

      Reply
      • Gayan on August 21, 2014 6:54 am

        Have you tried saving it into mp4 version 2 ?

        Reply
    3. Hanan on September 18, 2014 4:44 pm

      Perfect … Work like MAGIC for me .. thanks a lot ๐Ÿ™‚

      Reply
      • Gayan on September 18, 2014 5:12 pm

        You’re welcome ๐Ÿ™‚ .

        Reply
    4. Jerrard on September 20, 2014 1:37 pm

      Works like a charm. Thanks.

      Reply
      • Gayan on September 20, 2014 4:20 pm

        The pleasure is all mine Jerrard ๐Ÿ™‚ .

        Reply
    5. Don Estes on October 12, 2014 11:46 pm

      I went to download the software, and got this report from Norton:

      Norton Rating
      Norton Safe Web has analyzed open-any-file.com for safety and security problems. Below is a sample of the threats that were found.
      Summary

      Computer Threats: 1
      Identity Threats: 0
      Annoyance factors: 0

      Total threats on this site: 1
      The Norton rating is a result of Symantec’s automated analysis system.

      Needless to say, this is a little intimidating. Do you have another download site?

      Reply
      • Gayan on October 14, 2014 9:23 am

        Hi Don…

        What I’ve linked is the official web-site of ‘Avidemux’ and it’s pretty trustworthy, I don’t know why Norton was complaining though…

        Reply
    6. Adam on October 13, 2014 8:51 am

      Easy to follow. Quick fix. Much appreciated.

      Reply
      • Gayan on October 14, 2014 9:21 am

        You’re welcome Adam.

        Reply
    7. ducky on November 3, 2014 9:12 pm

      Try mkvtoolnix mmg, it always works for me. I still use Avidemux for other things, but mmg be better to fix OOS.

      Reply
    8. Bernie on November 17, 2014 6:40 pm

      Hi Gayan, seems like you made a lot of people happy ๐Ÿ˜‰
      Some of your readers have problems with un-sync getting worse as the video plays: this can be corrected very easily within YAAI (Yet Another AVI Info), one would simply have to modify the fps (frames per second) rate, usually very slightly, to get a nice lip-sync all over the video.
      Just to get an idea: I had a 49 minute video having the ” stretch ” problem (audio ok at start but getting delayed while playing), as if the video was playing to fast. After correction and saving (very fast, no re-encoding) in YAAI, the playing time had increased from 49’10” to 49’57” ! No need to say with that time shift the original video was almost un-viewable. At FPS level, the correction was from 23.976 (original value which correspond to the 24 images per second in the movies world) down to 23,602. This slowed a bit the video, thu sshowing a perfect lips-sync all over the play-back.
      Last bust not least YAAI is open source and free of use…
      Best regards and congrats for your initial post, Bernie

      Reply
      • Gayan on November 18, 2014 6:54 am

        Thank you Bernie ๐Ÿ™‚ .

        Reply
    9. Tyler on November 20, 2014 9:18 am

      The following works for me: check to see if there are multiple tracks, either by looking beside Audio Input, e.g. “Audio Input (2 track(s))”, or by going to Audio>Select Tracks. Older versions don’t list the number of tracks beside “Audio Input”, which you can see in the example pics above.

      If there are multiple tracks go to Audio>Select Track; Click “Filters” for both tracks, and make sure they BOTH are shifted, and to the same value, and then try saving with MP4v2 as the output format .

      The audio sync issue doesn’t affect files with only one track, at least for me anyway. It seems to be a bug in thee GUI.

      Reply
    10. Elia on December 2, 2014 1:18 am

      Thank you very much for the information. It really fix my problem, that I was desperate to solve.Thank you very much. =)

      Reply
      • Gayan on December 2, 2014 7:22 am

        You’re welcome Elia.

        Reply
    11. Jim on December 17, 2014 5:01 am

      I’d like to convert the Audio in an MKV video to AAC and save in an MP4 container so i can play on an IPad, but there is no ‘MP4’ option in the Output Format dropdown box in version 2.6.8 for windows (32bit). MP4 MUXER is the closest i see and that reports: “Unsupported. Only MP4 Video and H264 Supported for Video”, followed by “MUXER cannot open” What settings should i use please?

      Reply
      • NHar on January 5, 2015 3:20 am

        I have the same issue. “Only MP4 video and H264 supported for video” and then the muxer fails to open. ๐Ÿ™

        Reply
    12. Matt on December 21, 2014 5:47 pm

      Thanks! It worked great for me.

      Reply
      • Gayan on December 22, 2014 7:51 am

        You’re welcome Matt.

        Reply
    13. Richard on January 14, 2015 8:29 am

      How do you syn/video with Avidemux if the video file has different syn all through the video file?

      Reply
      • Gayan on January 14, 2015 12:40 pm

        Hi Richard,

        I’m not exactly sure what you meant. But if the issue that you’re having is that the sync seems to get worsened through the playback, then there is a possible fix. I did give an answer concerning that, just look for a question by ‘Tim Jong-Il’ in the comments (you can search for that term within this page by using the web-browser, ‘Ctrl’ + ‘f’ usually brings that feature up, on most browsers) and read my answer.

        Reply
    14. Daniel Debaste on January 31, 2015 5:12 pm

      Hi All.

      Although this blog post did not provide me a full solution, the quality of questions and answers teached me all I needed to solve my unexpected lip-sync issue. Thank all of you. And, particularly Gayan who provides a great long time follow-up.
      That’s why I’m happy to share my resulting findings here.

      My situation is rather simple :

      I grab a terrestrial DVB TV stream to files using a tuner;
      I display the end result on a television set thanks to an USB hard disk;
      Avidemux is, as of my opinion, the ideal software to process the files :
      trim the programs;
      remove the commercials;
      save as a DVD MPEG-2 stream in a PS container;
      avoid conversion (just copy audio and video streams) to optimize processing time (not file size) with no loss of quality.

      Dumped directly to a file, the stream results in a TS container file, readable by neither VLC, Avidemux nor my television set.
      Mplayer plays it perfectly, without lip-sink delay. This is good news. The stream does contain information for a player to play the streams in sync.

      In order to avoid a time consuming file to file conversion to make the file Avidemux compatible, I convert the stream to PS, on the fly at grabbing time. ffmpeg does that without significantly loading the CPU. The resulting stream is a DVD MPEG-2 stream in a PS container file. The file is readable by VLC and Mplayer without audio delay. Unfortunately, played or exported by avidemux 2.5.6, the program stream does suffer the lip-sync issue. Maybe later versions of Avidemux fix this silently with no delay. I did not try to solve it that way, preferring sticking to my favorite distribution’s current version.

      There was a pretty trial and error method described above for estimating the correction shift to apply.
      I discovered that the appropriate time shift amount is, in my specific case, provided by mediainfo . Applying the delay reported by mediainfo fixes the lip-sync issue for my programs, not only at the beginning, but for the whole duration.
      The only con of this method is that it is a two phases process. That’s why I automated it. My bash script launches Avidemux, opens the file and presets shift delay and output container type.

      For those who like scripts, it follows. I use it as “Open with…” application in Caja (Linux Mint Debian Edition).

      #!/bin/bash
      #——————————————————————————
      # Daniel Debaste January 2015
      # TntAvidemux.bsh “”
      # Open a PS mpeg file in Avidemux, presetting
      # audio shift delay
      # PS output container
      # Requires : mediainfo, zenity, avidemux
      #——————————————————————————
      # 1. Customization constants
      VideoFolder=”$HOME/Videos”

      # 2. Input file
      if [ -f “$1” ]; then
      InFile=$1;
      elif [ -f “$VideoFolder/$1″ ]; then
      InFile=”$VideoFolder/$1″
      else
      zenity –error –text=”File $1 not found”
      exit 1
      fi

      # 3. Retrieve audio delay
      delay=$(mediainfo $InFile | \
      grep “Delay relative to video” | \
      cut -f 2 -d “:” | \
      cut -f 1 -d “m”)
      if [ “$delay” != “” ]; then
      delay=${delay/s /”}
      fi

      # 4. Build the script
      ScriptFile=$(tempfile).js
      echo “//AD” >> $ScriptFile
      echo “var app = new Avidemux();” >> $ScriptFile
      echo “app.load(\”$InFile\”);” >> $ScriptFile
      echo “//app.video.fps1000 = 25000;” >> $ScriptFile
      if [ “$delay” != “” ]; then
      echo “app.audio.delay=$delay;” >> $ScriptFile
      fi
      echo >> $ScriptFile

      # 5. Open Avidemux
      avidemux –output-format PS –run $ScriptFile

      Enjoy !

      Daniel.

      Reply
    15. chanpreet singh on February 15, 2015 9:05 pm

      you saved my life man
      that was realy very easy thanks alot

      Reply
      • Gayan on February 16, 2015 7:40 am

        You’re welcome ๐Ÿ™‚ .

        Reply
    16. Rhea on February 18, 2015 8:04 pm

      hey, mine doesn’t really work?
      the input video is AVI, and I already found the shift value, which is -1350ms and I’ve tried it on the player, it matched (I’ve also tried it manually on Daum Pot Player). When I save the file, it always come out out of sync, though the audio is a little faster than the original file, but out of sync nevertheless, even though it was perfect on the playback.
      I’ve tried MKV, MP4, MP4V2 outputs but none work.
      Please help?

      Reply
      • Rhea on February 18, 2015 8:20 pm

        Ah, I’ve done it with the MKVToolNix. It works wonders after the frustrating Avidemux. Thank you so much for the simple guide!!!

        Reply
        • Gayan on February 19, 2015 7:06 am

          You’re welcome Rhea. ‘MKVToolNix’ is the best approach to solve this problem.

          Reply
    17. Alexa on February 24, 2015 4:56 am

      Hi, thanks so much this worked!! i am forever in your debt!!

      Reply
      • Gayan on February 25, 2015 3:52 pm

        You’re welcome ๐Ÿ™‚ .

        Reply
    18. David Johnson on March 3, 2015 9:13 am

      At first it worked fine for a couple of videos but when I got a third synced correctly and tried to save using Muxer MP4, I got the following error messages: (1) Unsupported Only MP4 Video & H264 supported for video. (2) Muxer Cannot Open (3) Failed [my MP4 file] was NOT saved correctly. What is wrong?

      Reply
      • Gayan on March 5, 2015 7:30 am

        As included in the error, perhaps your multimedia file contains unsupported media audio/video streams. Have you tried ‘MP4v2Muxer’ under ‘Output Format’ option? If all fail, then try using the ‘Mkv Muxer’, though it has its drawback since the playback of ‘mkv’ files are not widely supported by most hardware based multimedia players, as mentioned earlier.

        Reply
    19. David M on April 24, 2015 11:21 am

      Can anyone explain why and how to cure the fact that Avidemux when playing an mp4 video (other file types not tried) I have a 5 second audio delay when played on one computer but but not when played on another computer?
      I have installed the same release of Avidemux. Unfortunately, the PC I have intended to use for storing, playing and editing videos is the PC that has this audio delay problem.

      Usually, when cutting parts out of an mp4 file, I get the message about the cuts not being at the start of an Iframe but that does not matter. I was going to look into that once I have this other peculiarity within the the Avidemux installation/setup resolved.

      Has anyone else had this problem with Avidemux?

      Reply
    20. Anna Hunter on May 10, 2015 6:09 am

      Hi!
      Synchronization of the video and audio is not always perfectly, especially if you shoot at a distance and have very poor reference sound. I do sync for about 5 years ๐Ÿ™‚ and always facing with a lot of problem.
      But recently I came across one video where video transferring in real time between two smartphones and everything sync automatically, so no need to spent time on syncing, it called Microphone Rocks ๐Ÿ™‚ Check it here: http://www.microphone.rocks I think it will change the way we shoot videos and combining it with audio with smart devices.

      Reply
      • Gayan on May 10, 2015 9:58 am

        Thank you Anna for the news.

        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.