wapmorgan / Mp3Info

The fastest PHP library to extract mp3 meta information (duration, bitrate, samplerate and so on) and tags (id3v1, id3v2).
https://wapmorgan.github.io/Mp3Info/
GNU Lesser General Public License v3.0
139 stars 41 forks source link

Cannot determine codecVersion #14

Closed swilczynski closed 4 years ago

swilczynski commented 5 years ago

Hello,

I get following error when trying to load mp3 file

Notice: Undefined index: in /var/www/vendor/wapmorgan/mp3info/src/Mp3Info.php on line 270 Notice: Undefined index: in /var/www/vendor/wapmorgan/mp3info/src/Mp3Info.php on line 271 Notice: Undefined variable: offset in /var/www/vendor/wapmorgan/mp3info/src/Mp3Info.php on line 286 Warning: Division by zero in /var/www/vendor/wapmorgan/mp3info/src/Mp3Info.php on line 300 Warning: fseek() expects parameter 2 to be integer, float given in /var/www/vendor/wapmorgan/mp3info/src/Mp3Info.php on line 302 Warning: Division by zero in /var/www/vendor/wapmorgan/mp3info/src/Mp3Info.php on line 226

As far as I was able to debug the issue I saw that $headerBytes[1] equals 227 in my mp3 file and 227 >> 3 & 0b11 = 0 and there is no option for this.

Unfortunately I am not experienced with bitwise operations and mp3 specifications, maybe this is something you could look into.

I can provide mp3 file in PM when requested

wapmorgan commented 5 years ago

I can provide mp3 file in PM when requested

Yes, provide it to fix.

swilczynski commented 5 years ago

Sorry I opened this issue half year ago, I don't have this file anymore