Help: I need a proper method to detect 99% of all mp3 files

Matthias Welwarsky mwelwarsky at web.de
Wed Jul 14 16:54:42 BST 2004


On Sunday 11 July 2004 16:47, Allan Sandfeld Jensen wrote:
> On Thursday 08 July 2004 14:34, Matthias Welwarsky wrote:
> > On Tuesday 06 July 2004 14:52, Scott Wheeler wrote:
> > > On Tuesday 06 July 2004 12:49, Matthias Welwarsky wrote:
> > > > Well, the proper method is to parse the bitstream and see if it is
> > > > compliant to the standard. This is both quick and reliable, and works
> > > > with and without tags.
> > >
> > > Well, except for the quick part.  ;-)
> > >
> > > Operations like this are bound by disk speed, not code complexity or
> > > CPU time.
> >
> > Hm? mp3 frames are typically around 400 byte long, and decoding a few of
> > them is probably much less a hassle than parsing a tag. So the "disk
> > speed" not an issue, not even over network or USB.
>
> MP3-files are sometimes prepended with upto 14kbytes of crap that needs to
> be searched for synchronizations frames. If you dont skip ID3v2 frames,
> this will be quite common when reading iTunes mp3s with embedded pictures.

Yes, but you would not feed the ID3v2 tag into the decoder anyway, would you? 
And risk distorted audio because the decoder chokes on the tag data. So you 
need code to skip the ID3v2 tag.

And, if you have an ID3v2 tag, there's not much sense in decoding the mp3 
bitstream to find out whether it is an mp3 or not :)

regards,
	matthias


>
> `Allan
> _______________________________________________
> kde-multimedia mailing list
> kde-multimedia at kde.org
> https://mail.kde.org/mailman/listinfo/kde-multimedia



More information about the kde-multimedia mailing list