Page 1 of 1

GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 11:45 am
by tfevan
I've getID3 1.9.9. Its so slow when I analyze a mp3 file. Its takes 6-7 second to analyze and load the page to give me output. But when I try to analyze video file then its faster and give me output within 1 second. Teste dMP3 file size is between 3 MB - 8 MB. Tested Video (avi, mkv, mp4) file size is 300 MB- 1.5 GB. I'm using WAMP.

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 12:17 pm
by James Heinrich
It shouldn't take anywhere near that long to analyze an MP3 file, it should be in the order of milliseconds (e.g. 0.01 to 0.1 seconds) to analyze most MP3 files.
Browse the file with demo.browse.php and take a look in the Warnings and Errors sections. I suspect you may have a VBR mp3 file with no VBR header so it needs to scan much more of the file than it otherwise would.
Let me know if you have any other warnings and/or errors.

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 12:29 pm
by tfevan
I tried a lot of MP3 files. but same problem occours. My mp3 files are 64 kbps, 128 kbps, 320 kbps.

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 12:30 pm
by James Heinrich
You didn't mention what, if any, errors and warnings you see.

Can you provide a sample MP3 file that takes a long time to analyze?

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 5:12 pm
by tfevan
Thankx a lot for catch my post. This is a mp3 file link http://hindisongs.fusionbd.com/download ... mp3&sort=1 I can reach demo.browse.php but how I run a mp3 file in this page??? I am new in GetID3

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 5:35 pm
by James Heinrich
Open demo.browse.php in your browser, navigate to where you have the MP3 file saved that you want to look at and click on it. Directory view should look something like this, then when you click on the filename you want you should get a very detailed output.

I assume from the link you provided you had downloaded the original file (not the 64-kbps version). The file parses just fine on my system: "File parsed in 0.064 seconds"

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 5:56 pm
by tfevan
My all mp3 files located on 'mp3' folder, when click the mp3 folder through demo.browse.php then the page loading & loading. Just delete and create a new mp3 folder. then I can reach meta tag page. File parsed in 1.421 seconds. but when click a video (.mkv 765 MB) it parsed in 0.274 seconds through demo.browse.php. By the way thanks a lot

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 5:59 pm
by James Heinrich
And do you see anything under "warning" or "error" in the detailed analysis?

Re: GetID3 is so slow when analyze a MP3 file

Posted: Thu May 14, 2015 6:06 pm
by tfevan
From my mentioned link, I've also download the orginal file which is 187 kbps. not 64 kbps. Warnings:0, Errors:0 (when reach the path 'www/mp3' folder). Anyway, thanks a lot for your help :)

Re: GetID3 is so slow when analyze a MP3 file

Posted: Sun May 24, 2015 7:55 pm
by MediaOnDeck
I'm also getting this issue, no warnings or errors when analyzing through the browse demo. File is here: https://www.mediafire.com/?20hoiof9ba29lba

It took over a second to analyze.

Re: GetID3 is so slow when analyze a MP3 file

Posted: Fri May 29, 2015 1:49 am
by James Heinrich
MediaFire link says "permission denied".

Re: GetID3 is so slow when analyze a MP3 file

Posted: Fri May 29, 2015 12:56 pm
by MediaOnDeck
Sorry! Mediafire put some strange restriction on the file. This link should work (but only once): http://www.mediafire.com/?nyxg25to90oas ... 6cwqu7q7nr

Re: GetID3 is so slow when analyze a MP3 file

Posted: Fri May 29, 2015 1:09 pm
by James Heinrich
Your link worked this time.
File parsed in 0.779 seconds.
On my system it parses in a little under a second. The ID3v2 is reasonably large (635kB), mostly due to embedded cover art, and ID3v2 parsing time will increase with larger tag sizes since more reads are required. The parsing is optimized for smaller tags, since the vast majority of ID3v2 tags (without embedded art) are 4kB or less in size, and even those with a small cover picture are typically less than the 32kB read buffer size.

Other than the size of the ID3v2 picture, the file itself looks good (Xing header in place, no warnings or errors) so I'd say everything is working as expected.