I can successfully get the mp3 ID3 tags out of my mp3 app, using php. I am left with a huge BLOB. I'm sure this is pretty straightforward, but I just need a little help in the right direction. What I'd like to end up with is (BLOB DATA CORRECTED):
$media_year = implode($ThisFileInfo['comments_html']['year']);
$media_genre = implode($ThisFileInfo['comments_html']['genre']);
$media_jpg = [BLOBDATA];
(I know that makes no programming sense, but you get the idea. The first two lines work fine for me, but I don't know how to get the BLOBDATA from the ID3 tags and convert it to a JPG that I can display.)
In another tutorial I see this, but it doesn't connect the dots for me:
[comments] => Array
(
[picture] => Array
(
[0] => Array
(
[data] => <binary data>
[image_mime] => image/jpeg
)
)
)
I loathe asking readers to "do it for me" so, please forgive me. But I've tried every resource I can find. Any help is supremely appreciated.
i use getid3 library for this work fine like
<?php
$Path="mp3 file path";
$getID3 = new getID3;
$OldThisFileInfo = $getID3->analyze($Path);
if(isset($OldThisFileInfo['comments']['picture'][0])){
$Image='data:'.$OldThisFileInfo['comments']['picture'][0]['image_mime'].';charset=utf-8;base64,'.base64_encode($OldThisFileInfo['comments']['picture'][0]['data']);
}
?>
<img id="FileImage" width="150" src="<?php echo @$Image;?>" height="150">
in this code i embedded image in to HTML with base64_encode
that you can see
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With