View Full Version : AVI made with VBR--difficult to open in Vdubmod
I encoded a movie (from DVD, ripped by DVDDecrypter) with AutoGK. Newest version of both products.
As the music is central to the movie (a music video, essentially), I wanted to put the quality of the music a high priority. Being a small movie for Pocket PC, however, I couldn't keep the AC3 sound. I chose VBR MP3, as that theoretically should provide better quality than CBR. I also upped the bit rate from the default of 128 kbps to 192 kbps.
After making it, tried it out on the PC, played by Media Player Classic, and it played fine, video and sound in sync, etc. (I haven't yet tried it on the PPC.)
Then I tried to open it with Vdubmod, as I thought I might want to edit something in it. I was surprised, that Vdubmod seemed to have a major problem with it, due to the VBR. I got an error message from Vdubmod right on opening the file, about a problem with the VBR header, asking if I wanted to change it to CBR, etc. I clicked on "No". I tried to play the movie in Vdub, with the preview button. It played very strangely, with the sound VERY out of sync, then the program crashed. I tried a few times, same result. I also tried in regular vdub (not mod), same result.
I understand that vdubmod is part of the process of creating the AutoGK video. (In fact, the vdubmod I was using was installed by AutoGK, in a subdirectory of the AutoGK directory.)Therefore, I don't understand why Vdubmod had such a problem with this AVI. Can Vdub and Vdubmod never open videos with VBR MP3 sound? Do other programs also have trouble with this? (Media Player Classic obviously didn't have a problem with it.)Is it safer to use CBR? (I didn't realize that there were compatibility problems with VBR. Perhaps there should be a warning with that option.) Or is it due to using a 192 kbps bit rate, rather than 128?
Anyone know what was happening here with vdubmod and vdub?
manono
28th June 2004, 09:59
Hi-
You said the .avi played fine in MPC. Isn't that what counts? What do you care if it doesn't play well (or at all) in VDubMod? If you want to edit in VDubMod, then fine, it'll do that. But it's not really a VBR audio player. You did correctly in hittimg "No" when that stupid error message popped up.
In AutoGK VDubMod is used for the video encoding, and for the muxing. It has nothing to do with the MP3 encoding.
stephanV
28th June 2004, 10:55
Originally posted by Yo
I encoded a movie (from DVD, ripped by DVDDecrypter) with AutoGK. Newest version of both products.
As the music is central to the movie (a music video, essentially), I wanted to put the quality of the music a high priority. Being a small movie for Pocket PC, however, I couldn't keep the AC3 sound. I chose VBR MP3, as that theoretically should provide better quality than CBR. I also upped the bit rate from the default of 128 kbps to 192 kbps.
at such a high bit rate (192 kbps) you might as well use CBR. i think hardly anyone would be able to tell the difference.
Then I tried to open it with Vdubmod, as I thought I might want to edit something in it. I was surprised, that Vdubmod seemed to have a major problem with it, due to the VBR. I got an error message from Vdubmod right on opening the file, about a problem with the VBR header, asking if I wanted to change it to CBR, etc. I clicked on "No". I tried to play the movie in Vdub, with the preview button. It played very strangely, with the sound VERY out of sync, then the program crashed. I tried a few times, same result. I also tried in regular vdub (not mod), same result.
In VirtualDubMod (v 1.5.4), go to options-->preferences. when scrolling down in the VDubMod-tab, you will find an option called Priss Rocks. enable it. this will most likely prevent VDM from crashing. Normal VDub will probably never handle VBR audio, but i will come to that in a minute.
Therefore, I don't understand why Vdubmod had such a problem with this AVI. Can Vdub and Vdubmod never open videos with VBR MP3 sound?
Its not so much a problem of VDub(Mod) but more a problem of AVI. AVI as such can handle VBR (as it does for video streams) but for audio streams AVI uses an additional header called WAVEFORMATEX that causes the problems. In that header a value must be defined (nBlockAlign) that describes the smallest indivisible part/block of the audio stream in bytes. In MP3 this would be (more or less) the size of one audio frame. Normally several of these parts are stored in one chunk.
The problem is that for VBR MP3 (as the name suggests) the audio frames are of different sizes and therefor it cant be defined in waveformatex. However, there has been found a workaround for this:
- each audio frame in its own chunk, instead of several frames in one chunk
- nBlockAlign is set to 1152 bytes
The value of nBlockAlign is set so high that it will normally read the whole chunk. E.g. for an MP3 frame encoded with a bitrate of 192 kbps at 48 kHz has a size of 576 bytes. And now comes the part why it is a "hack" (terrible word BTW). If for example a chunk with that frame would be read, a chunk of 576 bytes is read completely. But the avi-splitter must be in dubio now: it has read a chunk of 576 bytes while it should have been at least 1152 bytes (remember nBlockAlign). So it could make two decisions now: output nothing because it thinks it has read an incomplete frame OR (and this is actually what happens) just feed the data to the audio decompressor anyway as it has read a whole chunk and a whole chunk in principle should never contain anything less but whole frames (or blocks).
This solution can be broken however, when your audio frames get larger than 1152 bytes, but this is very uncommon. Also, if MS would alter their AVI splitter to make the first decision instead of the second one, all AVIs with VBR MP3 would become unreadable (well, if it weren't for Gabest). I think it is for this reason that Avery Lee will never add VBR support to VDub. The guys who did the modifications of it had less problems with it. ;)
BTW - how CBR MP3 in AVI is stored by VDub is not completely correct either because it uses nBlockAlign = 1 byte. Although, this will NEVER cause any problems unless you start cutting in your AVI. In that case, you will very likely cut audio frames in half (not a good thing).
Do other programs also have trouble with this? (Media Player Classic obviously didn't have a problem with it.)Is it safer to use CBR?
Any DirectShow based player will play these files correctly, given the restriction i mentioned above (the maximum audio frame size). Remember that VDub isnt a player and should not be used as such.
@manono: the warning message is not stupid, it is very indicative. Not displaying the message would be much more stupid IMO. :p
manono
28th June 2004, 17:21
If I had a nickel for every time that I've seen posts about that message by people that think they did something wrong, or worse yet, clicked "Yes"...
I still think it's stupid.
Originally posted by manono
If you want to edit in VDubMod, then fine, it'll do that. [/B]
No it won't. VdubMod has crashed every time I've opened that file in it.
I also see a weird looking frame at the beginning of the movie (when opened in vdubmod) that says something about "Warning-nothing B-Frame Decoder" (and some words are out of sight and cannot be read--even when the size of the frame is increased-the letter size increases, and you still cannot see all words in the message--which is in weird lettering.)
What is that about?
manono
28th June 2004, 19:20
Ignore the B-Frame decoder lag message. I thought you said VDubMod crashed when playing. Now you're saying you can't even open the .avi?
Originally posted by manono
Ignore the B-Frame decoder lag message. I thought you said VDubMod crashed when playing. Now you're saying you can't even open the .avi?
Yes, I can open it.
Besides crashing when playing, it has crashed while editing, or doing anything with that file.
Of course I wasn't using it as a player, to watch the video for fun. But the preview function can be useful while editing.
stephanV
28th June 2004, 19:57
have you tried my suggestion?
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.