Extract Cover/Album Art


Hello there!

I'm hoping this is the right forum category. To start off, MP3Tag is awesome! :slight_smile: It's really an extremely stable and featured program, which I share with MANY people, and it's always a big hit. Recently someone asked me the following:
Is it possible, say using PHP, to "echo" (extract/view) art from an mp3 file? Meaning, if on server there is a song.mp3 which already has cover/album art encoded, is there a way/script to extract that to view on webpage.

(PHP was just an example, it can be js, etc).



I assume you know that Mp3tag can extract the "picture" field, from various file types, to the users file system.
However, there are only minimal command line arguments available, and they are mostly (only?) concerned with loading files and directories. AFAIK, there are no plans to expand command line functionality.

"ExifTool is a platform-independent Perl library plus a command-line application for reading, writing and editing meta information in a wide variety of files."

It can extract the "picture" field (or any other field) from the tag of various audio file types (mp3, flac, wma, at least). It is a monster of a program, aimed at photographers, and highly respected in that community. It is well documented and supported by the author, Phil Harvey, but the learning curve is steep!

I've used it with .bat and .vbs scripts and faintly remember talk in the Exiftool forums of js and php "wrappers". Maybe that indicates it can be called by those scripts.


Thank you for the quick response.
Yes, I'm familiar with MP3Tag's extract feature. Thanks for checking though.
Interesting tip re:exiftool. Will look into it. Thank you.


Just to let you know about the ExifTool and mp3:
It can only READ mp3, not write...

MP3 R MPEG-1 layer 3 audio (uses ID3 information)
source: http://www.sno.phy.queensu.ca/~phil/exiftool/#supported


Thanks. Turns out its possible: