Help - Search - Members - Calendar
Full Version: Metaflac remove all except specfic tags
Hydrogenaudio Forums > Lossless Audio Compression > FLAC
aliumalik
Hi,
Is there any way for metaflac to remove all tag data (pictures, replaygain etc) except the specified tags (artist,album, genre etc). There is a remove all except option but that is for blocks only and I can't find something similar for tags.
Thanks
perilsensitive
It doesn't look like metaflac can do that directly. The following seems to work for me on my linux box:

CODE

metaflac --remove --except-block-type=VORBIS_COMMENT foo.flac
metaflac --show-tag GENRE --show-tag ARTIST --show-tag ALBUM --show-tag TRACKNUMBER foo.flac | metaflac --remove-all-tags --import-tags-from=- foo.flac

You can add SEEKTABLE, APPLICATION, and PADDING to the first command if you want to preserve those blocks. You can also add '--show-tag' options for every other tag you want to preserve.

Note that this won't work with multi-line tags (like CUESHEET) if you want to preserve them. For those you'll have to do something like the following before removing all the other tags and metadata:
CODE

metaflac --show-tag CUESHEET foo.flac > foo.cue

Then edit foo.cue to remove 'CUESHEET=' from the beginning. After you have removed all other tags and metadata, run this:

CODE

metaflac --set-tag-from-file=CUESHEET=foo.cue


This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.