I need to locate a command line tool that would allow me to write ID3v2 and album art to an MP3 file. Command line is required as it will be executed from PHP, so no graphical interface. Searches of Google have proved fruitless, so perhaps there is a tool available that will enable me to do this?
4 Answers
eyeD3 (http://eyed3.nicfit.net/), as suggested by Arboghast, will do the job.
eyeD3 --add-image file.jpg:FRONT_COVER music.mp3
will add the front cover album art (which is what iTunes/iPhone uses for the image).
eyeD3 --add-image :FRONT_COVER music.mp3
will remove the last front cover image. (Note that if you want to replace an image [e.g. you fixed the image], you need to remove the image and then add it. If you just add the image again you will get multiple front cover images.)
PHP has ID3 capabilities built in, but it looks like it doesn't support album art.
If you really want a command line tool there's id3v2.
-
It just needs to be a simple way of doing this through PHP, and the easiest option appeared to be command line.– tombazzaCommented Aug 27, 2009 at 12:33
-
Hey, I have d3v2. I'm trying to track down a "how to" for id3v2 and image embedding. Any suggestions?– ScottCommented Jan 22, 2011 at 17:59
-
The command
id3v2 -r "APIC" *.mp3
will remove cover art. You can also useeyeD3 --remove-all-images *.mp3
.– slmCommented Dec 9, 2013 at 13:33
I've found http://eyed3.nicfit.net/ to be the most comprehensive command-line MP3 tag manipulator for Linux. Supports embedding art using --add-image argument (caveat: haven't tried using it for that myself).
try using mp3info, it's command line. I'm not sure if the album art is stored as tag and it's not supported by mp3info.