Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Is there a way to copy all tags from one FLAC file to another seamlessly using a command-line tool?

share|improve this question
    
Why is it that so much official documentation misses out on so friggin' many things that users are so very likely to need? Good question. –  killermist Jun 21 '12 at 23:04
add comment

2 Answers

up vote 9 down vote accepted
metaflac --export-tags-to=- input.flac | \
metaflac --remove-all-tags --import-tags-from=- output.flac

Possibly needs the --no-utf8-convert option, too.

share|improve this answer
    
Too bad it doesn't copy pictures too… You'll have to do the same trick with --export-picture-to and --import-picture-from –  Adrien Clerc Jun 2 '13 at 13:35
add comment

If you only want the text part of metadata, you should use metaflac with the --no-utf8-convert option on export and on import, otherwise characters that are not in your shell's characters set get mangled (e.g. for me Japanese metadata did get mangled without it):

metaflac --no-uft8-convert --export-tags-to=- src.flac | metaflac --import-tags-from=- --remove-all-tags dest.flac

no idea why utf8 is not the default.

This is not complete. If you want to move images as well, a small python script leveraging mutagen is the best way to copy all metadata.

share|improve this answer
    
+1 for the mutagen recommendation. It's what I use whenever I need to do anything important with tags. –  Naftuli Tzvi Kay Nov 21 '13 at 21:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.