An excellent Python application that I routinely use to add cover art to mp3 files is the command line applicationeyeD3
. This can be installed from a Terminal as follows:
sudo apt-get install eyed3
Here is an example of a command to add a cover image named cover.jpg
to an mp3 file named test.mp3
:
eyeD3 --add-image "cover.jpg:FRONT_COVER" test.mp3
See an example below of this at work on my own computer, adding a cover image to an mp3 otherwise empty of meta tags:
andrew@ilium~$ eyeD3 --add-image "cover.jpg:FRONT_COVER" test.mp3
test.mp3 [ 946.12 KB ]
-------------------------------------------------------------------------------
Adding image cover.jpg
Time: 01:00 MPEG1, Layer III [ 128 kb/s @ 44100 Hz - Joint stereo ]
-------------------------------------------------------------------------------
ID3 v2.4:
title:
artist:
album:
album artist: None
track:
FRONT_COVER Image: [Size: 95788 bytes] [Type: image/jpeg]
Description:
Writing ID3 version v2.4
-------------------------------------------------------------------------------
andrew@ilium~$
There are many other options for adding images although I have given the basic syntax above. Below are these other options:
--add-image IMG_PATH:TYPE[:DESCRIPTION]
Add or replace an image. There may be more than one
image in a tag, as long as the DESCRIPTION values are
unique. The default DESCRIPTION is ''. If PATH begins
with 'http[s]://' then it is interpreted as a URL
instead of a file containing image data. The TYPE must
be one of the following: OTHER, ICON, OTHER_ICON,
FRONT_COVER, BACK_COVER, LEAFLET, MEDIA, LEAD_ARTIST,
ARTIST, CONDUCTOR, BAND, COMPOSER, LYRICIST,
RECORDING_LOCATION, DURING_RECORDING,
DURING_PERFORMANCE, VIDEO, BRIGHT_COLORED_FISH,
ILLUSTRATION, BAND_LOGO, PUBLISHER_LOGO.
References:
Best Answer
I've written a script that will do this automatically. Just run the script against each
.m4a
ormp4
file, like this, and it will produce the.mp3
files in the same directory:You'll need to install these dependencies:
Here's the script. Copy and paste this content and save it to a file named
convert-mp4-to-mp3.sh
: