D Richard Felker III wrote:
The only purpose is for encoding mp3 with lame. In the first pass ("pass 0") you encode the audio with vbr, and you get the exact audio bitrate. Then you can tune the video bitrate for pass 1 and 2 so that it exactly fills the CD, maximizing quality. With OGM, you do the same thing by encoding your vorbis audio in a .ogg file before you even begin video encoding.
Why can't one do the same with MP3? Use LAME to encode the audio, then encode video in two passes. Then, put them back together with mencoder.
The problem with the 3pass code, though, is that it doesn't just encode the audio. It also makes a table of input/output frame correspondence for A/V sync, but without decoding any video, just using info from the demuxer. This will work under ideal conditions, but if any frames get dropped by the decoder (e.g. they're damaged beyond recovery) or by the vf chain during pass 1/2, the sync info from pass0 will be bogus and will result in a bad output file.
What is the purpose of the input/output frame table? What does it do for you that an ordinary two pass encode doesn't? Does this have something with kludging VBR MP3 into AVI? Jonathan Rogers