Howto – fix lip sync on DivX videos

10Aug10

I’ve been a keen fan of DivX for many years now (though I must confess that I still mostly use the long deprecated Dr Divx in favour of the newer DivX Converter).

One recurring annoyance is that transcoded files can sometimes have issues with lip sync. Having never found anything useful online about fixing this I thought I’d put together a quick guide.

Finding the error

The first thing is to figure out how much the audio track is out by versus the video, which can be done with a bit of trial and error using Media Player Classic [download], which has an option in the play menu to add a delay to the audio (which can be a negative number). I usually take a look at the video without any compensation and firstly try to figure out whether the audio is late or early, then make a guess at what the delay is to within a hundred ms. I’ll then add/subtract 100ms increments until it looks/sounds right (remember at 25 frames per second each frame takes 40ms, so there’s no point in fiddling around with increments less than that).

Correcting the error

For this I use VirtualDub [download], following these steps:

  1. Open the file with the lip sync issue. If you’ve used variable bit rate audio encoding you might see this warning, which can be safely ignored:
  2. We’re not going to actually change the audio, just its timing, so first set audio to Direct Stream Copy:
  3. Now we need to configure the Interleaving to match the delay found using Media Player Classic:
  4. Video isn’t going to be changed either, so set that to Direct Stream Copy too:
  5. And that’s pretty much it. All that’s needed now is to File->Save As with a different file name to the original (I append an underscore to keep things simple). The file should process really fast as VirtualDub isn’t doing any hard CODEC work – it’s just unzipping the audio from the video and rezipping it back together in a new file:

and that’s it – you should now have a file with fixed lip sync. Try it in a regular player like Windows Media Player to double check. If it’s worked to plan you can now delete the original and rename the new version.

This same process probably works for other CODEC’s besides DivX (after all it doesn’t actually do any CODEC stuff), but since I use DivX for pretty much anything I can’t say that I’ve tried.



2 Responses to “Howto – fix lip sync on DivX videos”

  1. 1 Gary Jones

    At Last!
    I’ve been looking for a way to fix this issue for years!
    Great post. Thanks for the info. Works a treat!

  2. 2 Jaqi M.

    It’s super nice that you wrote this, however, if you have to fix a program’s fault to make it work correctly, that program is GARBAGE, and I have come to the conclusion that DivX Pro, is just that. I’ve had issue with it from day one, including voice sync issues, casting, etc., and all I find online are non-responded to questions about the same, excuses, or third-parties (such as you), trying to be helpful, with a myriad of steps to try in order to correct the issues. SERIOUSLY? Your time is so devalued that you take these steps in order to use DivX? I finally uninstalled it today when I realized that the MediaMonkey Gold I paid for a while back, plays movies amazingly, with no issue whatsoever. I don’t know if it casts, but for being 2/10 in casting with DivX, it really wouldn’t matter.


Leave a reply to Jaqi M. Cancel reply

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