JamesHeinrich / getID3

http://www.getid3.org/
Other
1.13k stars 245 forks source link

Support has been added to the mp3 files of `application/octet-stream` type. #405

Closed ghost closed 1 year ago

ghost commented 1 year ago

Hello, there was a problem with such mp3 files, I was able to provide limited support with a class assistance. I also added a simple example that it would be good to support the file upload system. I think it would be better if you can bring these improvements to your project. (I sent the sample file as an e -mail.)

JamesHeinrich commented 1 year ago

Not needed, sample file already works perfectly well in getID3.

JamesHeinrich commented 1 year ago

Your sample file scans just fine in getID3, generating the warning: Unknown data before synch (should be at beginning of file, synch detected at 417). This is a known problem with some versions of LAME (3.90 - 3.92) DLL in CBR mode.

If the filename you're scanning ends in .mp3 getID3 will perform additional checks to see if it is a corrupt mp3 file (like your example). If you know the file is (probably) mp3 but the filename is not (e.g. temp file from web form upload) you can/should pass the filesize (optional) and original filename as 2nd/3rd parameters to getID3->analyze() which will hint to getID3 to do the additional corrupt-mp3 checks.