How to add cover image in mp3 files

sbhadauria
@sbhadauria
9 years ago
129 posts
I want to add cover image in mp3 files. please help.
updated by @sbhadauria: 10/29/15 06:34:13PM
michael
@michael
9 years ago
7,714 posts
If your talking about the embeded data, then try embedding it before uploading it.
sbhadauria
@sbhadauria
9 years ago
129 posts
Thanks for your response.

I am using below mentioned code but failed:

$_tags['APIC'][0]['data'] = 'image data';
$_tags['APIC'][0]['mime'] = 'image/jpeg';
$_tags['APIC'][0]['description'] = "description";
$_tags['APIC'][0]['picturetypeid'] = "item_id";

// Add Tags
$id3 = jrCore_check_id3_install();
$cmd = $id3;
foreach ($_tags as $tag => $txt) {
if (function_exists('utf8_encode')) {
$cmd .= " --{$tag} \"". utf8_encode($txt) ."\"";
}
else {
$cmd .= " --{$tag} \"". jrCore_entity_string($txt) ."\"";
}
}
ob_start();
system("{$cmd} {$input_file} >/dev/null 2>{$tmp}", $ret);
ob_end_clean();
updated by @sbhadauria: 09/25/15 08:02:33AM
sbhadauria
@sbhadauria
9 years ago
129 posts
waiting for answer.
michael
@michael
9 years ago
7,714 posts
Not following how or where you are using that code, but it seams unrelated to my suggestion of adding the image to the file when you upload it.

Tags