View Full Version : VirtualDubMod shows a warning upon opening a good AVI file
DmitryR
31st March 2003, 14:03
I use VirtualDubMod to join a DivX video stream and an MP3 audio stream. Audio stream made with "lame --preset standard" (VBR). Video and audio set to direct stream copy. Audio sream is the only one (no second audio) and opened with MP3 menu option.
The result file plays OK, but when I open it with VirtualDub again it says that the audio stream have some trouble and a lag of up to 30100 ms possible. What is wrong?
Suiryc
31st March 2003, 15:29
The result file plays OK, but when I open it with VirtualDub again it says that the audio stream have some trouble and a lag of up to 30100 ms possible. What is wrong?
The answer is in your thread :
I use VirtualDubMod to join a DivX video stream and an MP3 audio stream. Audio stream made with "lame --preset standard" (VBR). Video and audio set to direct stream copy. Audio sream is the only one (no second audio) and opened with MP3 menu option.
VirtualDub and VirtualDubMod will always show you a warning when an AVI file contains VBR MP3. The difference is that VirtualDubMod (in latest versions) will let you choose whether or not you want to keep the stream safe (keep it VBR MP3, and don't cause audio/video out-of-synch) or fix it (as VirtualDub will always do - since VBR audio in AVI is a hack - causing potential audio/video out-of-synch as mentionned in the 'skew' part of the message).
DmitryR
1st April 2003, 14:49
VBR is a feature of VirtualDubMod. Why don't it fix the stream while putting it into the AVI?
Suiryc
1st April 2003, 17:25
Because we prefer warn the user when there is a VBR stream in the AVI you opened. In this case the user is asked to confirm his choice (in latest version the Nandub compatibility - i.e. keeping MP3 VBR stream as is - is a preference in VirtualDubMod).
Otherwise people aren't happy when they open (like you) a file that contains MP3 VBR, that the stream is fixed automatically without a warning and that they discover that the AVI file they made play audio 30s later than video in the middle of the movie ;).
There is also the case where the stream isn't really VBR : when the message tell you about a <10ms skew then you can safely assume the stream is CBR and fix the values (preventing VirtualDub/VirtualDubMod from warning you again the next time you open the generated file).
DmitryR
2nd April 2003, 10:08
So, the lag can appear AFTER the fix? Then, what for is the fix? And, deeper, what does the fix do? May be these questions are highlighted in some FAQ?
Suiryc
2nd April 2003, 20:58
AVI file isn't meant to contain VBR audio.
It actually works because of a trick, and because the current AVI parser used in Windows for DirectShow make this trick works.
That's why Avery Lee (author of VirtualDub) decided to fix VBR streams in AVI files. The trick mainly consists in cheating in some values in the stream header (values that aren't correct then - but the way AVI parser interpret it in windows make the trick works), and then writing each MP3 audio frame in a chunk of the AVI file.
VirtualDub fix the 'incorrect' values in the stream header, canceling the trick and introducing possible lags (depending on wheter the MP3 is really VBR or not).
DmitryR
6th April 2003, 12:29
I have dug it now. But I think it will be reasonable to cut this warning from the VirtualDubMod as long as it features the VBR.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.