Changing the Album on FLAC files from the command line in Linux

3

1

I have a folder of FLACs that I want to change the album on. I use Ubuntu linux with Gnome. Is there a command line program that can do what I need? I can't seem to find an appropriate program.

Ideally it would be something like...

flacchange --Album NewAlbumName *.flac

Any help would be appreciated!

Drew

Posted 2009-10-19T19:41:18.100

Reputation: 325

Answers

2

Jeffrey Aylesworth

Posted 2009-10-19T19:41:18.100

Reputation: 2 170

1You should give a minimal working example in your answer. – user3188445 – 2017-08-12T20:10:01.607

1

You can do this with the metaflac tool (man page), which should be available from the flac package (I use debian).

You want to remove the old tag first, and then add the tag again with the correct values. Here is the artist tag for example:

metaflac --remove-tag=artist *.flac
metaflac --set-tag=artist="Beyoncé" *.flac  

And here's a short demo of changing the artist tag on a couple of example files:

burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ ls
11 - All Night.flac  12 - Formation.flac

burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ metaflac --show-tag=artist *.flac
11 - All Night.flac:ARTIST=Beyonce
12 - Formation.flac:ARTIST=Beyonce

burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ metaflac --remove-tag=artist *.flac
burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ metaflac --show-tag=artist *.flac
burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ 
burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ metaflac --set-tag=artist="Beyoncé" *.flac
burnsba@gigadeb:/mnt/datadrive/dump/test/dir1$ metaflac --show-tag=artist *.flac
11 - All Night.flac:artist=Beyoncé
12 - Formation.flac:artist=Beyoncé

BurnsBA

Posted 2009-10-19T19:41:18.100

Reputation: 239

1

If you want a general command-line tagger that should work the same for any music file regardless of the format, try pytags, included in the pytagsfs package.

Ryan C. Thompson

Posted 2009-10-19T19:41:18.100

Reputation: 10 085

ooo, that looks interesting. bonus, it uses mutagen as the tagging library. – quack quixote – 2009-10-31T05:21:04.630

Yeah, mutagen is a giant bucket of win. Ditto Quod Libet/Ex Falso. I was previously using mid3v2, the mutagen-based reimplementation of id3v2, along with a local customization to support multiple tag values. But since pytags does this already, and for all file types, I suppose I'll switch over to it. – Ryan C. Thompson – 2009-10-31T08:14:30.380

might wanna rethink -- i read pytagsfs currently uses mutagen's EasyID3 interface so doesn't support all the tags ExFalso will. tho that may be the same as mid3v2, i can't recall. i always just used EF for any multi-tag use (only needed multiple genre tags anyways, and only tagging mp3s). – quack quixote – 2009-11-02T23:17:52.167

Hmm. You're right. It seems that the magical format-agnostic tagging ability is built into Quod Libet/Ex Falso, not mutagen itself. – Ryan C. Thompson – 2009-11-03T05:04:42.300