saecki / mp4ameta

A library for reading and writing iTunes style MPEG-4 audio metadata
Apache License 2.0
35 stars 5 forks source link

How to set back cover? #24

Closed evensolberg closed 2 years ago

evensolberg commented 2 years ago

First, thanks for making this crate!

I can set the artwork(s) using the various set_artwork functions, but there doesn't appear to be any way to identify whether I'm setting a front cover, back cover, etc? Am I missing something here? Can it be done?

saecki commented 2 years ago

Currently there is no support for that and I don't think there is a spec for that. If you know of some other program that has support, let me know.

evensolberg commented 2 years ago

The one I use lets me select what it is when I add an image, but if I save and load back, it just tags it as "Other", so I guess not. Oh well. I'll just live without. Thanks.

Side question: Is there an easy way to create a Fourcc tag from a string containing (say) the aART ... How do I turn that into Fourcc(*b"aART")?

saecki commented 2 years ago

Something along the lines of . as_bytes().try_into() should work, to turn the string into a byte array. I don't think there is a non fallible way.

evensolberg commented 2 years ago

It compiles but crashes out at runtime with "could not convert slice to array". Might be useful to have a Fourcc::from(&str) as a future enhancement ...