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

  • 1
    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
metaflac --export-tags-to=- input.flac | \
metaflac --remove-all-tags --import-tags-from=- output.flac

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

|improve this answer|||||
  • 1
    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
  • importing pictures from stdin doesn't seem to work well, it seems you really want to export the picture(s) to a file and then import them back from the files. When trying to import from stdin, it is often ending up with a picture block in the target file, but with zero bytes (no picture data) – Cheetah Jan 8 '18 at 16:50

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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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