Gabriel Bouvigne wrote: >>I'm currently writing a simple tool to convert MP3 (and later MP2 and >>MP1) to correct WAV files (with the exact bitrate, even for VBR files) >>that could be muxed with video accurately... > > > I was thinking that it was already the case with the acm codec. Could you > explain limitations of your acm codec please?
The problem with the ACM is that the information about the encoding properties is checked at the beggining of the encoding. So for VBR files (and even ABR files) you can't know exactly the average bitrate precisely. So the problem is that with long files (muxed with video) you get a delay after a few minutes and after seeking. I think that it might be solved by putting a better estimation of the bitrate in the WAV header (it comes from the ACM when encoding normally) and so the precision would be somehting like 0.01% at least (depends on the bitrate). I noticed that with the same files encoded with the LAME ACM compared to Nandub putting better MP3 data in AVI files. I guess that's what they do (better estimation of the bitrate). If that's the problem I might also modify VirtualDub and submit it to Avery Lee so that it writes the real bitrate, at least for MP3 (should be good on all codec). Finally, this can't be solved in the ACM because that's not handled by the API (getting statistics at the end of the encoding doesn't exists). So it must be solved by the WAV/AVI writer (by counting the data length in bytes and time). >>But now I have a problem with the last frame that contains "LAME" at the >>same position (seems like). Is there any documentation on this frame ? I >>guess it doesn't contain audio. Is the "LAME" data always at the same >>position ? > > > There is audio in this frame. The "LAME" string should only be some padding > when in the last frame there is remaining space after audio encoding. > Moreover you could check the "info" tag which indicates encoder delay and > padding for the file in number of samples. Well, that info tag is mostly informational to me, because if some bad frames occur in the file (bad transmission, overclocked machines, etc) these info are wrong. That's why I prefer to check the whole file and compute the statistics with the real data. _______________________________________________ mp3encoder mailing list [EMAIL PROTECTED] http://minnie.tuhs.org/mailman/listinfo/mp3encoder
