Closed GoogleCodeExporter closed 9 years ago
Please include your sample file as well
Original comment by svollbehr
on 14 Feb 2010 at 8:11
[deleted comment]
Oh, sorry! I didn't know that it was necessary.
My "sample" file is a song protected by copyright, and thus I can't post here. I
could send to your e-mail, it's Ok for you?
Regards,
Original comment by v1d4l...@gmail.com
on 15 Feb 2010 at 6:57
Please do so
Original comment by svollbehr
on 16 Feb 2010 at 1:30
I still need the sample file for this. Please send it to me so I can debug the
issue
with it.
Original comment by svollbehr
on 7 Mar 2010 at 8:56
Closed until problem can be reproduced
Original comment by svollbehr
on 26 Mar 2010 at 6:51
I'm having the same problem as posted. I'm attaching the MP3 that is giving me
issues (though it's by far not
the only one).
The PHP code I'm using is:
require_once 'Zend/Media/Mpeg/Abs.php'; // or using autoload
$abs = new Zend_Media_Mpeg_Abs('00.mp3');
The output I get is:
PHP Notice: Undefined offset: 0 in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 254
Notice: Undefined offset: 0 in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 254
PHP Warning: Division by zero in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 255
Warning: Division by zero in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 255
PHP Notice: Undefined offset: 0 in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 256
Notice: Undefined offset: 0 in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 256
PHP Notice: Undefined offset: 0 in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 257
Notice: Undefined offset: 0 in
/home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php on line 257
PHP Fatal error: Uncaught exception 'Zend_Io_Exception' with message 'Size
cannot be negative' in
/home/glandix/include/Zend/Io/Reader.php:168
Stack trace:
#0 /home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php(263):
Zend_Io_Reader->skip(-4)
#1 /home/glandix/include/Zend/Media/Mpeg/Abs.php(408):
Zend_Media_Mpeg_Abs_Frame-
>__construct(Object(Zend_Io_FileReader), Array)
#2 /home/glandix/include/Zend/Media/Mpeg/Abs.php(218):
Zend_Media_Mpeg_Abs->_readFrames(1000)
#3 /home/glandix/aac.php(16): Zend_Media_Mpeg_Abs->__construct('00.mp3')
#4 {main}
thrown in /home/glandix/include/Zend/Io/Reader.php on line 168
Fatal error: Uncaught exception 'Zend_Io_Exception' with message 'Size cannot
be negative' in
/home/glandix/include/Zend/Io/Reader.php:168
Stack trace:
#0 /home/glandix/include/Zend/Media/Mpeg/Abs/Frame.php(263):
Zend_Io_Reader->skip(-4)
#1 /home/glandix/include/Zend/Media/Mpeg/Abs.php(408):
Zend_Media_Mpeg_Abs_Frame-
>__construct(Object(Zend_Io_FileReader), Array)
#2 /home/glandix/include/Zend/Media/Mpeg/Abs.php(218):
Zend_Media_Mpeg_Abs->_readFrames(1000)
#3 /home/glandix/aac.php(16): Zend_Media_Mpeg_Abs->__construct('00.mp3')
#4 {main}
thrown in /home/glandix/include/Zend/Io/Reader.php on line 168
Original comment by glan...@gmail.com
on 24 May 2010 at 6:36
Also, after I had the issue above, I added the following code on line 236 of
Zend/Media/Mpeg/Abs/Frame.php:
print 'LAYER: ' . $this->_layer . "\n";
I get the following output with the above file:
LAYER: 2
LAYER: 2
LAYER: 2
LAYER: 1
LAYER: 2
LAYER: 0
Followed by the PHP errors mentioned in my previous post
Original comment by glan...@gmail.com
on 24 May 2010 at 6:40
Thanks for reporting! I will investigate the issue the soonest!
Original comment by svollbehr
on 24 May 2010 at 7:01
[deleted comment]
Quick look with a hex editor at the source file reveals that your MP3 file
actually
has two ID3v2 tags, one after the other.
The Zend_Media_Mpeg_Abs class successfully skips both ID3v1 and ID3v2 tags
found from
both ends of the file but does not have any logic for the second ID3v2 tag.
Thus the
class starts parsing MPEG data where the second ID3v2 tag starts thinking it's
the
beginning of the MPEG stream (as it should start there). This is also the root
cause
of the invalid values in the parsing.
I manually removed the first ID3v2 tag from the file and the class was able to
extract the file information after that. I will add a code snippet to the ID3v2
wiki
page on how to remove tags from the files.
Original comment by svollbehr
on 24 May 2010 at 7:48
Original issue reported on code.google.com by
v1d4l...@gmail.com
on 6 Feb 2010 at 8:38