How to add cover art to a FLAC file in the command line


=> [1] http://lifeofageekadmin.com/adding-cover-art-to-flac-file-from-command-line-and-gui/

This is essentially a repackaging of a Life of a Geek Admin post[1], but I decided to re-phrase it and leave out the Mp3Tag stuff.

It is a pain to change music metadata. Usually, VLC fares well, but especially with FLAC files I often see it just not working™.

It'd be great to change my metadata from the terminal without much hassle. And indeed, that's possible.

To change FLAC metadata in the command line, you need the `metaflac` tool.¹

I'd install it by installing the `flac` package in openSUSE Tumbleweed. It seems to be the same in Arch, so probably on other distributions too.

Since FLAC is cross-platform, this also works on Windows, BSD, and macOS.

The magic command is:

metaflac --import-picture-from="image path" "flac path"

`image path` may not be a relative path like ~/Pictures, instead use /home/konomo/Pictures²

That's all there is to it.

I did manage to see a weird quirk: being that the cover art isn't overwritten if there is already cover art present. Maybe that is just a bug in my version, though.


¹ If you know a different tool that can do the same thing, please tell me.

² If your username is konomo that is.

tags:
music