Source i (link to git-repo or to original if based on someone elses unmodified work):

Add the source-code for this project on opencode.net

0
Become a Fan
5.0

Description:
EmbedCover is a script for embedding album cover images in MP3 files. The script will automatically look up the image associated to it in amaroK and embed this image into the file.

CAUTIONS:
- If the file already had image inside, it will be overwritten.
- This operation is NOT reversible
Last changelog:

v0.7.6:
Fix for VA/Compilation tracks

v0.7.5:
Support for ID3v2.3 & ID3v2.4 (Tags with ID3v2.3's frame size will be converted to ID3v2.4 format).
Tags prior to ID3v2.3 are not supported.

v0.7.4:
1. Overwrite image if the type is "cover (front)" (0x03) or "other" (0x00) -> changed because many MP3 files do not conform ID3 tag frame rules...
2. Simplified output/error messages


Ratings & Comments

30 Comments

chrisvdb

Hi, Does this script work with Amarok 2.2? When I installed the script I received a success notification, but after restarting the script does not show as installed and the context menu did not change. Is this normal behavior under 2.2? Thanks, Chris.

knightrider

This script is designed for Amarok 1.4. Its behaviour on Amarok 2.x is unknown. Amarok 2.x is still buggy & many features disappeared, and I don't feel like migrating my script until Amarok 2.x got stable.

rain84src

Hi, based on what i've understood of your plugin, it make use on the image database that amarok keeps for album arts...so i've tried to embed some album arts that i've set as custom cover providing an image from my hard disk...and indeed the script says that there aren't any image associated with that file..i guess that this means that amarok doesn't store custom cover in its database or maybe can be due to something else? Any solution possible for this?

knightrider

right click > edit track(s) info > check on [each track] > summary > right click on cover icon > set custom cover > select your custom cover > save & close then right click > EmbedCover > DoIt!

ghanarama

Great script! For some reason when my files are located on a CIFS-mounted drive I get a "Destination file is not writable" error when I try to embed. Amarok itself, however, has no problem modifying tags on this same drive. Any ideas?

poe84it

amarok stores the cover in the DB as an md5 on a composition of the name of the artist + name of the album, but if an album is catalogued as "various artists", is instead stored an md5 only on the name of the album. This causes an errorr in the script that does not find the image with the "correct" name. A good fix would be to control the field "sampler" in the table "tag", such a way to adapt successfully the string for the MD5. I've fixed thath in this way in my local copy: #that's the original artist_id = `dcop amarok collection query "SELECT DISTINCT artist FROM tags WHERE url = '#{dcopfile}'"`.chomp() artist = `dcop amarok collection query "SELECT DISTINCT artist.name FROM artist WHERE id = '#{artist_id}'"`.chomp() album_id = `dcop amarok collection query "SELECT DISTINCT album FROM tags WHERE url = '#{dcopfile}'"`.chomp() album = `dcop amarok collection query "SELECT DISTINCT album.name FROM album WHERE id = '#{album_id}'"`.chomp() #and i've added that is_in_VA = `dcop amarok collection query "SELECT DISTINCT sampler FROM tags WHERE url = '#{dcopfile}'"`.chomp() #---- #and modify this #md5sum = MD5.hexdigest( "#{artist.downcase()}#{album.downcase()}" ) #in that if is_in_VA == "1" md5sum = MD5.hexdigest( "#{album.downcase()}" ) else md5sum = MD5.hexdigest( "#{artist.downcase()}#{album.downcase()}" ) end #end mod I hope to be helpful

grana

Hi, I really like your app, but it "sometimes" gives me an error: when I'm trying to embed cover on certain files, it tells me "no image found for the file", although an image is shown in amarok. I don't know, perhaps it is related to the source of the cover, if cached by amazon or else. Can you help me?

grana

I think I understood when this happens: when a cover jpg image is found in the directory of the album, and is therefor taken by amarok as the cover. When this happens, and you try to embed it in the mp3, the error occurs.

knightrider

bingo!

grigorescu

So... how do we fix this? Seems like it shouldn't be hard to add a clause where, if the image isn't found, it will check for an image in the directory, and then use that instead. Also, can it check to see if an MP3 already has an image embedded, and skip it if it does? Since that's another way to get this error: if an MP3 has an embedded image, Amarok won't store a separate image for it, and then it complains that it can't find an image.

Khan

The script is displaying an error in the pop-up that indicates that the track is "Not in Collection" which is not the case since well, I'm choosing my tracks from my collection. Thoughts?

Khan

And like BorgQueen, I have never had this script installed before. Also, regardless of if I drag and drop the files from the Context tab or the Collection tab, the results are the same.

knightrider

Hmm... I never had this. The popup comes if the script failed to find the track IDs from Amarok's DB. Any ideas? Weird filename / directory maybe?

Khan

The structure is: ~/Music/Artist/Album/TrackNo-TrackName.mp3 Is this script looking for a specific image type of a specific location for the Amarok DB?

knightrider

>The structure is: >~/Music/Artist/Album/TrackNo-TrackName.mp3 Mmm... this info is not enough... > Is this script looking for a specific image type of a specific location for the Amarok DB? It uses the images in Amarok DB, which are always stored as PNG.

Khan

>The structure is: >~/Music/Artist/Album/TrackNo-TrackName.mp3 >Mmm... this info is not enough... That's the file structure for the files. What information are you specifically looking for? > Is this script looking for a specific image >type of a specific location for the Amarok DB? >It uses the images in Amarok DB, which are always stored as PNG. What if the cover image is set manually? For example, I have a file called cover.jpg in each album folder. Does Amarok that that image, converts it to a PNG file and then inserts it into the DB or does it link to the JPG in the folder?

knightrider

Maybe something got corrupted. Try $ rm -rf ~/.kde/share/apps/amarok ~/tmp/ksocket-guest/amarok.visualization_socket ~/.kde/share/config/amarok* and restart amarok. Hope this helps.

Khan

Well, that certainly took care of it. It's working nicely now :-) No doubt something did get corrupted. That DB has been upgraded who knows how many times. I've been running Amarok almost since it's inception. Thanks again for you help.

MilhousePunkRock

Hey! Thanks for picking up the work on this script. I would love to have EmbedCover working somewhat automagically, as in embedding the cover while a track is playing (like the CopyCover script http://kde-apps.org/content/show.php/CopyCover+(amaroK+Script)?content=22517 does its work silently in the background). Do you think you can add a little configurability? So we can choose which APIC tag gets written, and more importantly, which filetype the picture is. My Windows-centric MP3 player can only deal with Cover(Front) (which apparently is the type of picture that gets embedded) in jpg, so it won't display the png picture (at least Kid3 tells me it's png). Anyway, thanks for the good work, it's much appreciated! Rock on, MilhousePunkRock

knightrider

Amarok always _automaGically_ converts the cover to PNG into its DB. I think we should stick to this rule. Meanwhile, the backend script (addimage2mp3.rb) is able to embed JPEG picture into MP3 file. So if you want, do it manually with this script. No problem.

markey

Wow, thanks for taking over maintainership of my script :) I was really hoping that someone takes over, since I've been too busy lately to continue developing it. Good luck!

markey

Ok, FYI, I've just deleted the old page for EmbedCover on kde-apps.org, so that people don't get confused.

knightrider

Well, I was in need of software to insert cover image into MP3 files, but couldn't find anything useful, except yours. Thanks a lot. It was outdated so I made some fixes to make it works. I'm very new to Ruby and can't promise to maintain so any help is welcomed. -Bud

josep

Hi, many thanks for this script, it worked perfectlly in my iRivier E100. It is possible to extend this script to other formats like Ogg and FLAC?

knightrider

Probably... but I don't have any OGG files...

Pling
0 Affiliates
Details
license
version 0.7.6
updated
added
downloads 24h 0
mediaviews 24h 0
pageviews 24h 0

Other Amarok 1.x Scripts:

Gnome Play Video in Totem
mwheatland
last update date: 19 years ago

Score 5.0

editLyrics-gnome
ZeeD
last update date: 19 years ago

Score 5.0

amarok Alarm
aroth
last update date: 16 years ago

Score 5.0

amaroK Web Collection V xmms
pti-jean
last update date: 16 years ago

Score 5.0

SongLogger
lucatnt
last update date: 17 years ago

Score 5.0

amaroK Web Collection
pti-jean
last update date: 16 years ago

Score 5.0



System Tags