Stupid Divx Audio


Recommended Posts

I downloaded an episode of Boston Legal (yes... i know it's frowned upon, but I'm at class when it's on and I delete them after a couple weeks.) who ever did the latest episode screwed it up. The problem stems from the second to last commercial break. Whoever encoded it made a mistake. The last two scenes have the audio out of sync, but i believe it to be in sync at the beginning, which means it's slow. Is there anyway to fix this? sync up the audio to the lips on the actors? If not, it's not a big deal.

Link to comment
Share on other sites

If it's an avi, ogm or mkv you can fix it in Virtualdubmod by changing the video framerate (Video > Frame Rate > Source Rate Adjustment: First try Change so video and audio durations match. If that doesn't work you'll have to adjust it manually, which may take some time).

Link to comment
Share on other sites

Oh, that's opened a can of worms. I get an error opening the AVI (divx) file. It says "VirtualDub has detected an improper VBR audio encoding in the source avi files and will rewrite teh audio header with standard CBR values during processing for better compatibility. This may introduce up to 5243 ms of skew from the video stream. If this is unacceptable, decompress the *entire* audio stream to an uncompressed WAV file and recompress with a constant bitrate encoder. (bitrate: 123.3+- 16.3kbps)

i click ok, try to do as you say below and i get an insane frame rate (8865.105 fps) beside the "change so video and audio durations match" I'm assuming I have to do the above before i can do your step, but how do i do the above?

Link to comment
Share on other sites

I take it that is going to effect my ability to edit the file. Any suggestions? I tried the above "change so video and audio durations match" and it came out close (but killed the video quality) Perhaps adding xvid to my computer will help? any other suggestions?

Link to comment
Share on other sites

I forgot: Video > Direct Stream Copy

Then it won't touch the video itself (only speed it up or slow it down a bit).

Vbr in .avi is a pain, in Virtualdubmod you can choose not to rewrite the header though which works most of the time, or try saving as mkv or ogm, these formats were designed to deal with vbr audio.

As last effort you could try Streams > Stream List, demux the audio to an mp3 file, and reencode it with a constant bitrate, then add that version and disable the original.

Using XviD or DivX shouldn't matter (since you won't have to reencode the video part either way).

Link to comment
Share on other sites

  • 11 months later...

Well, I had the same problem when I tried to open some AVIs with VirtualDub, and, after several days of searching and trying, I finally found the ONLY 100% EFFECTIVE SOLUTION. That stuff about decompressing and recompressing doesn?t work: after the whole process it loses sync between video and audio.

First of all, let?s understand the problem:

You have an AVI file which?s audio is encoded with VBR (Variable Bit Rate). This is very frequently used, but is not ?technically correct? for AVI files. VirtualDub suggests decompressing the audio and recompressing it with CBR (Constant Bit Rate). This, no matter which way you do it, which program you use, which BitRate you choose, won?t work. You will never get sync between Audio and Video.

There?s a program called VirtualDubMod. It?s a variation of VirtualDub, with a lot of great add-ons, but still has this same problem: can?t handle files with VBR without losing sync. There?s another program called NanDub. It?s another variation of VirtualDub specially designed to work with files with VBR. It doesn?t alert anything when you open the file. The problem is that it just doesn?t work: when trying to save the file, although you?ve already selected the desired compression, it doesn?t compress anything and writes entire raw video data. This generates a file of approximately 80 GB. Not to mention that IT DOESN?T WRITE ANY AUDIO DATA AT ALL. Maybe it?s my fault, but it?s a lot different and harder to use than VirtualDub. Searching a lot more, I discovered that an earlier version of VirtualDubMod (the first variation I mentioned) has a checkbox in the lower left corner of the ?Open Video File? dialogue that reads ?NanDub VBR MP3 compatibility mode?. I can?t imagine why they left out this option in newer versions. So, to sum up, you need VirtualDubMod 1.4.11.2

Download it from http://downloads.sourceforge.net/virtualdu...mp;big_mirror=0

As you might have already guessed, problems don?t stop here: VirtualDubMod has always been distributed in two packages: one for the program files and another for the DLL files. And also, as an option, an ?ALL INCLUSIVE? package, which includes both. But the problem is that they discontinued the DLL package as well as the ?ALL INCLUSIVE? for older versions, so, if you download and install from the url I gave you, it won?t work yet. You need to get the DLLs from a newer version. Download it from http://downloads.sourceforge.net/virtualdu...mp;big_mirror=0

Now extract all files from the 1.4.11.2 version (the firs link) into a folder. Then, extract all DLL files from the 1.5.10.2 version (second link) to the same folder. MORE PROBLEMS: the older version uses some DLL files that the newer doesn?t, so you need to get them from somewhere else. These files are libpng.dll and zlib.dll.

You can get them from these addresses (these are the versions that work with this program, it took me a while to find them, because they are also older versions, and newer versions won?t work with VirtualDubMod 1.4.11.2, so don?t try getting them from other addresses):

libpng.dll: http://www.driverskit.net/dll/get/1722.html

zlib.dll: http://www.dll-files.com/dllindex/download...nload0UIkR0dJgT

They are both within zip files, so you need to open the files you downloaded and extract both DLL files into VirtualDubMod folder.

Congratulations!!! You did it! Finally! Now, open VirtualDubMod, choose File>Open video file. Check the ?NanDub VBR MP3 compatibility mode? checkbox before selecting the file, and then just open the file you want. You should know that you can?t change anything about the audio stream (compression, conversion, etc) or it will lose sync. Be sure that ?Direct Stream Copy? is selected in the Audio menu. That?s it. You can do whatever you want to the video stream without losing sync in an AVI file with VBR audio encoding. It?s also possible that you won?t hear any audio when playing the opened video file in VirtualDubMod, but it will be perfect when you save it and open it with a Video Player such as Windows Media Player, DivX Player, or any other.

Hope it helps, I couldn?t find this solution anywhere, I had to discover it myself, so read this and you won?t have to go to so much trouble as I did. Greetings,

Gabriel

Link to comment
Share on other sites

  • 1 year later...

Fantastic Gabriel. Thank you so very much. I have long been frustrated by the VBR error in VirtualdubMod.

I would like to append to your post to advise how to hard code subtitles into a foreign film when this error is a problem.

In your same version of VirtualDubMod (1.4.11.2) you will need to add the subtitler workshop filter.

You should be able to find this at virtualdub.org - its called subtitler-2_4.zip. What you need is the subtitler.vdf file.

Make sure you put this (subtitler.vdf) into virtualdubmod PLUGINS in the later version, and copy the PLUGINS to the old version. Put it in VirtualDub's plugin folder too.

Once you have added the subtitler.vdf file to the plugins folder of both virtualdub and the virtualdubmod 1.4.11.2 - you must start by converting the subtitles into .ssa format. You must do this, even if they are already .ssa.

Open Subtitle workshop, click File, and then Load subtitle - navigate to the srt file for your video, and click Open.

Under Settings, click Output Settings and click on SubStation Alpha (*.ssa) and the left side.

Then choose the colours for your subtitles. I particularly like a very dark green as the primary colour, with black for the remainder. Some people prefer orange, or just white. Play with this, when you start to add the subs in VirtualDubMod, you will quickly see the results. It is very easy to stop and redo the subtitle file and change the settings.

When you are happy, click Set Font. In my copy, this defaults to Arial - Regular - 24, which I find quite satisfactory, click Ok.

Back to output settings box, click OK. (Note - you can change the border style too, and add an opaque box around text - once again, it's up to your personal taste, play around till you are happy with the result.

Go to File > Save as - and find SubStation Alpha in the icons. Double click it and save in the same folder as your avi.

NOW the subs are converted, it's time to hard encode them.

This part includes resizing the video because most TVs overscan the pic and cut off the subs.

OPEN VIRTUALDUBMOD (version 1.4.11.2)

File>Open Video File> navigate to your avi and click Open.

Under Video, make sure you are in Full Processing Mode., then click Filters at the top.

Click Add. (here's where you put the subtitler thing in the plugins)

Scroll to find subtitler, and click OK.

Subtitler configuration..click the browser button in the address and navigate to your .ssa file, then click OK.

Click ADD again, and find resize, click OK. Filter resize box opens, change the values for width and height to match your avi, then click OK.

Filters > OK.

Click Video > Compression (Select Video Compression box) and choose DivX 5.2.1 codec OR it may be DivX 6.8 codec-2 logical cpus... see that format restrictions read Width multiple of 4, height multiple of 2 etc. Then click Configure.

Divx codec properties displays. Choose encode mode and set to 1-pass, then click Bitrate calculator (NB - you must know the exact playing time of your video to put it in this box (eg: 1 hour, 45mins, 12 seconds).

then click Accept., back to Divx codec and click OK... video compression... OK.

Back to FILE and SAVE AS AVI.. choose a location, name your file and click Save.

That's all there is to it.

I hope everyone can understand all the above.

For a file of about 700MB VirtualDubMod takes about 1 hour to convert.

When done, you have an avi that is hard subbed.

I have successfully burned these to DVD and watched the result on my DVD player which plays Divx files.

Good luck and thanks again Gabriel for your brilliant post

Well, I had the same problem when I tried to open some AVIs with VirtualDub, and, after several days of searching and trying, I finally found the ONLY 100% EFFECTIVE SOLUTION. That stuff about decompressing and recompressing doesn?t work: after the whole process it loses sync between video and audio.

First of all, let?s understand the problem:

You have an AVI file which?s audio is encoded with VBR (Variable Bit Rate). This is very frequently used, but is not ?technically correct? for AVI files. VirtualDub suggests decompressing the audio and recompressing it with CBR (Constant Bit Rate). This, no matter which way you do it, which program you use, which BitRate you choose, won?t work. You will never get sync between Audio and Video.

There?s a program called VirtualDubMod. It?s a variation of VirtualDub, with a lot of great add-ons, but still has this same problem: can?t handle files with VBR without losing sync. There?s another program called NanDub. It?s another variation of VirtualDub specially designed to work with files with VBR. It doesn?t alert anything when you open the file. The problem is that it just doesn?t work: when trying to save the file, although you?ve already selected the desired compression, it doesn?t compress anything and writes entire raw video data. This generates a file of approximately 80 GB. Not to mention that IT DOESN?T WRITE ANY AUDIO DATA AT ALL. Maybe it?s my fault, but it?s a lot different and harder to use than VirtualDub. Searching a lot more, I discovered that an earlier version of VirtualDubMod (the first variation I mentioned) has a checkbox in the lower left corner of the ?Open Video File? dialogue that reads ?NanDub VBR MP3 compatibility mode?. I can?t imagine why they left out this option in newer versions. So, to sum up, you need VirtualDubMod 1.4.11.2

Download it from http://downloads.sourceforge.net/virtualdu...mp;big_mirror=0

As you might have already guessed, problems don?t stop here: VirtualDubMod has always been distributed in two packages: one for the program files and another for the DLL files. And also, as an option, an ?ALL INCLUSIVE? package, which includes both. But the problem is that they discontinued the DLL package as well as the ?ALL INCLUSIVE? for older versions, so, if you download and install from the url I gave you, it won?t work yet. You need to get the DLLs from a newer version. Download it from http://downloads.sourceforge.net/virtualdu...mp;big_mirror=0

Now extract all files from the 1.4.11.2 version (the firs link) into a folder. Then, extract all DLL files from the 1.5.10.2 version (second link) to the same folder. MORE PROBLEMS: the older version uses some DLL files that the newer doesn?t, so you need to get them from somewhere else. These files are libpng.dll and zlib.dll.

You can get them from these addresses (these are the versions that work with this program, it took me a while to find them, because they are also older versions, and newer versions won?t work with VirtualDubMod 1.4.11.2, so don?t try getting them from other addresses):

libpng.dll: http://www.driverskit.net/dll/get/1722.html

zlib.dll: http://www.dll-files.com/dllindex/download...nload0UIkR0dJgT

They are both within zip files, so you need to open the files you downloaded and extract both DLL files into VirtualDubMod folder.

Congratulations!!! You did it! Finally! Now, open VirtualDubMod, choose File>Open video file. Check the ?NanDub VBR MP3 compatibility mode? checkbox before selecting the file, and then just open the file you want. You should know that you can?t change anything about the audio stream (compression, conversion, etc) or it will lose sync. Be sure that ?Direct Stream Copy? is selected in the Audio menu. That?s it. You can do whatever you want to the video stream without losing sync in an AVI file with VBR audio encoding. It?s also possible that you won?t hear any audio when playing the opened video file in VirtualDubMod, but it will be perfect when you save it and open it with a Video Player such as Windows Media Player, DivX Player, or any other.

Hope it helps, I couldn?t find this solution anywhere, I had to discover it myself, so read this and you won?t have to go to so much trouble as I did. Greetings,

Gabriel

Link to comment
Share on other sites

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.