[wp-trac] [WordPress Trac] #26845: MP3 ID3 Tag Metadata Malformed
WordPress Trac
noreply at wordpress.org
Fri Jan 24 14:53:46 UTC 2014
#26845: MP3 ID3 Tag Metadata Malformed
--------------------------+-------------------------
Reporter: chipbennett | Owner:
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 3.9
Component: Media | Version: trunk
Severity: normal | Resolution: worksforme
Keywords: needs-patch | Focuses:
--------------------------+-------------------------
Changes (by matthewhaworth):
* status: new => closed
* version: 3.8 => trunk
* resolution: => worksforme
Comment:
I tried to replicate with this code:
{{{
<?php
include_once 'wp-config.php';
include_once 'wp-load.php';
include_once 'wp-includes/wp-db.php';
include_once 'wp-includes/pluggable.php';
$tracks = get_children( array(
'post_parent' => 4,
'post_type' => 'attachment',
'post_mime_type' => 'audio',
));
// Loop through them
foreach ( $tracks as $track ) {
$metadata = get_post_meta( $track->ID, '_wp_attachment_metadata', true
);
var_dump($metadata);
$metadata = wp_get_attachment_metadata( $track->ID );
var_dump($metadata);
}
}}}
After I had uploaded the file attached, I ran this and got the following
output:
{{{
array(21) {
["dataformat"]=>
string(3) "mp3"
["channels"]=>
int(2)
["sample_rate"]=>
int(44100)
["bitrate"]=>
int(128000)
["channelmode"]=>
string(6) "stereo"
["bitrate_mode"]=>
string(3) "cbr"
["codec"]=>
string(4) "LAME"
["encoder"]=>
string(15) "LAME3.98 (beta)"
["lossless"]=>
bool(false)
["encoder_options"]=>
string(6) "CBR128"
["compression_ratio"]=>
float(0.090702947845805)
["fileformat"]=>
string(3) "mp3"
["filesize"]=>
int(3247099)
["mime_type"]=>
string(10) "audio/mpeg"
["length"]=>
int(203)
["length_formatted"]=>
string(4) "3:23"
["title"]=>
string(17) "I've Seen Footage"
["artist"]=>
string(11) "Death Grips"
["album"]=>
string(15) "The Money Store"
["track_number"]=>
string(1) "6"
["comment"]=>
string(74) "Free download from http://www.last.fm/music/Death+Grips and
http://MP3.com"
}
array(21) {
["dataformat"]=>
string(3) "mp3"
["channels"]=>
int(2)
["sample_rate"]=>
int(44100)
["bitrate"]=>
int(128000)
["channelmode"]=>
string(6) "stereo"
["bitrate_mode"]=>
string(3) "cbr"
["codec"]=>
string(4) "LAME"
["encoder"]=>
string(15) "LAME3.98 (beta)"
["lossless"]=>
bool(false)
["encoder_options"]=>
string(6) "CBR128"
["compression_ratio"]=>
float(0.090702947845805)
["fileformat"]=>
string(3) "mp3"
["filesize"]=>
int(3247099)
["mime_type"]=>
string(10) "audio/mpeg"
["length"]=>
int(203)
["length_formatted"]=>
string(4) "3:23"
["title"]=>
string(17) "I've Seen Footage"
["artist"]=>
string(11) "Death Grips"
["album"]=>
string(15) "The Money Store"
["track_number"]=>
string(1) "6"
["comment"]=>
string(74) "Free download from http://www.last.fm/music/Death+Grips and
http://MP3.com"
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/26845#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list