id3-go icon indicating copy to clipboard operation
id3-go copied to clipboard

Support for embedding album artwork

Open Garoth opened this issue 9 years ago • 5 comments

Hey,

I really like your library -- it seems quite complete and well thought out, and in pure Go. I'm working on a little pet project to download and format soundcloud files for personal use -- and one thing that'd be cool is to be able to embed album art directly into the files. This is more valuable than normal, since most music on soundcloud is pretty indie, or remixes, so standard album artwork lookup doesn't tend to work.

From what I can tell, you already support ImageFrames to some degree (at least for basic parsing). Assuming I find the motivation, would you be willing to accept a patch to basically just add a NewImageFrame function that takes a path to an image and jams it in?

(I'm not really an id3 expert at this point, but it doesn't look too crazy to implement.)

Garoth avatar Mar 21 '16 19:03 Garoth

It's been a while since I've touched the code, but from what I can tell, the existing framework isn't so amenable to writing images, so yes, that's some missing functionality, and I'd be happy for you to add it!

On the specifics, I think it would be more appropriate to model (and use) the DataFrame's NewDataFrame method, and take in a byte slice, rather than directly using a path (people might get the image data from places other than files). You can then use AddFrames on that new frame and it should work.

mikkyang avatar Mar 21 '16 20:03 mikkyang

Thanks for taking the time to give me some pointers. I'll check it out and start with the approach you proposed if I find some time :-)

Garoth avatar Mar 21 '16 21:03 Garoth

@Garoth Haha. I'm rewriting my ruby project to go, that also download, tag and put to iTunes playlist tracks from SoundCloud. You can find it here, if you interested: https://github.com/bogem/nehm

And I'm interested in making this framework work with album pictures. Today I started to read code of this library and I have some ideas to make it a little bit better. Hopefully I will find a way to make this library work with album covers

n10v avatar Mar 22 '16 19:03 n10v

@bogem Cool. Sadly, I found soundscrape and realized that it meets my needs pretty much perfectly. I can shellscript around the rest here. I still like this lib, but doesn't look like I need to use it now.

Garoth avatar Mar 24 '16 02:03 Garoth

If somebody wants to write artworks in mp3 files with Go, you can use my lib: https://github.com/bogem/id3v2

n10v avatar Aug 19 '16 11:08 n10v