I'm not sure if this is a bug in getID3 or a bug in metaflac. Any help making that determination would be very much appreciated.
When I tag certain FLAC files using metaflac, and then call getID3's analyze() method on the resultant file, the result contains an error message and is missing all tag data:
Code: Select all
["error"]=>
array(1) {
[0]=>
string(82) "METADATA_BLOCK_HEADER.BLOCK_TYPE (PICTURE) at offset 42 extends beyond end of file"
}
The full dump of the analyze() result is as follows:
Code: Select all
array(17) {
["GETID3_VERSION"]=>
string(14) "1.9.9-20141121"
["filesize"]=>
int(466068)
["filepath"]=>
string(51) "/var/www/clients/client1/web5/private/protected/tmp"
["filename"]=>
string(11) "NBizrA.flac"
["filenamepath"]=>
string(63) "/var/www/clients/client1/web5/private/protected/tmp/NBizrA.flac"
["avdataoffset"]=>
int(42)
["avdataend"]=>
int(466068)
["fileformat"]=>
string(4) "flac"
["audio"]=>
array(10) {
["dataformat"]=>
string(4) "flac"
["bitrate_mode"]=>
string(3) "vbr"
["lossless"]=>
bool(true)
["sample_rate"]=>
int(44100)
["channels"]=>
int(2)
["bits_per_sample"]=>
int(16)
["bitrate"]=>
float(372854.4)
["channelmode"]=>
string(6) "stereo"
["compression_ratio"]=>
float(0.26421088435374)
["streams"]=>
array(1) {
[0]=>
array(9) {
["dataformat"]=>
string(4) "flac"
["bitrate_mode"]=>
string(3) "vbr"
["lossless"]=>
bool(true)
["sample_rate"]=>
int(44100)
["channels"]=>
int(2)
["bits_per_sample"]=>
int(16)
["bitrate"]=>
float(372854.4)
["channelmode"]=>
string(6) "stereo"
["compression_ratio"]=>
float(0.26421088435374)
}
}
}
["error"]=>
array(1) {
[0]=>
string(82) "METADATA_BLOCK_HEADER.BLOCK_TYPE (PICTURE) at offset 42 extends beyond end of file"
}
["encoding"]=>
string(5) "UTF-8"
["mime_type"]=>
string(12) "audio/x-flac"
["flac"]=>
array(5) {
["STREAMINFO"]=>
array(9) {
["min_block_size"]=>
int(4608)
["max_block_size"]=>
int(4608)
["min_frame_size"]=>
int(3002)
["max_frame_size"]=>
int(8247)
["sample_rate"]=>
int(44100)
["channels"]=>
int(2)
["bits_per_sample"]=>
int(16)
["samples_stream"]=>
int(441000)
["audio_signature"]=>
string(16) "��/�*���0LG�f"
}
["compressed_audio_bytes"]=>
int(466026)
["uncompressed_audio_bytes"]=>
int(1764000)
["compression_ratio"]=>
float(0.26418707482993)
["encoding"]=>
string(5) "UTF-8"
}
["playtime_seconds"]=>
int(10)
["md5_data_source"]=>
string(32) "82eb022fde2a1118cdf6ec304c478f66"
["bitrate"]=>
float(372854.4)
["playtime_string"]=>
string(4) "0:10"
}
Any insight into this problem would be great!