

Larger, this causes DirectShow to seek as if every MPEG frame was a sample, which gives accurate seeking even with VBR Since no MPEG frame created by the MP3 codec is 1152 bytes or Purposes, rounds up all of the chunk sizes. This ends up interacting with an interesting bug/feature in the DirectShow AVI parser, which, for seeking The odd thing here is that this causes all of the audio chunks to be smaller than the nBlockAlign Ordinarily, this is a bad idea because itĬauses multiple audio blocks to be written for each video frames and consumes a couple of additional % in the AVI for Nandub writes each MPEG audio frame as a separate chunk in the file. Stream should be horribly desynchronized.Įxcept for the strange nBlockAlign value and the way that Nandub writes out audio samples. Independent of bitrate here, so with a fixed blocksize and a compressed sample rate regardless of bitrate, the audio Now, you'll notice that dwRate/dwScale is Streams, but those are usually low bitrate and seldom used. The significance of the dwRate/dwScale fraction is that MPEG-1 audio framesĭecompress to 1152 samples each it turns out that this is incorrect for MPEG-2 (16-24KHz) and MPEG-2.5 (8-12KHz) Streams, so setting it to zero for VBR operation doesn't work at all - the AVI parsers use the nBlockAlign dwRate/dwScale = sampling_rate/1152 (rate of compressed samples)ĭwSampleSize, as it turns out, is totally ignored by both the AVIFile and DirectShow AVI parsers for audio.The way Nandub tries to set up (VBR) MP3 streams is as follows:

It only happens if you use an MP3 file as input - VBR or not - and doesn't happen if you actually compress And it turns out that they sometimes work, and sometimes they don't. Now, I've warned Nando repeatedly about the way in which vdub-mp3,Īnd later Nandub, sets certain fields in the audio stream header when it uses an MP3 file as input. Hours of reverse engineering, it turns out that it's actually caused by Nandub. I finally started attacking that sync problem that people have been reporting with VirtualDub for ages, and after several And it turns out that all act slightly different. The MCIAVI driver, AVIFile, and DirectShow's AVI splitter. How many AVI parsers do you think Microsoft ships with Windows? One? Two?

: How seeking in AVI really works, a.k.a.

You should be reading current news instead. The latest version of VirtualDub is 1.4c (11759). Home Download WIP Features Screenshots Doc umentation FA Q Knowledge Base News Links L icense Contact
