From: Joseph W. <jo...@bi...> - 2000-12-29 06:32:37
|
>I just have begun with mp3 support in kreatecd. Sounds good >AudioConverter class in AudioFile for fomats which cannot processed directly >by kreatecd (for now this is only mp3). Would be nice to have some kind of plugin interface (just an idea) >- how can we detect MP3 files? For now I assume a 0xff 0xfb at the beginning >of the file. But this doesn't work for RIFF MP3 files and files from some >strange encoders The KDE mimetype checking does only look at the extension, but the problem is, mpg123 can only decode files, which start with an valid header, it does not skip HTTP headers or other stuff. For MP3 recognition we would have to parse the first say 100 byte for an valid header and look if after that one follows another valid header at the right position. >- who should have the length of an mp3 file before we decode it - how can we >get this? You don't need to decode it completely. You can recalculate it from the frame header. You only need to jump from one header to to following. Frame size can be calculated easily, as I remember. That's the way the mpeglib or xmms, freeamp, (winamp) do it. (I think so) Is there a new version of mpg123 ? The last I saw is over one year old and had terrible problems with VBR. I patched my own version once to support VBR correctly, but if I have the code somewhere, I'm not sure if it can be reintegrated into MPG123. Perhaps I'll find time to talk with the MPG123 author. |