Skip to content

Instantly share code, notes, and snippets.

@kepstin
Last active June 27, 2016 19:23
Show Gist options
  • Save kepstin/2c23f3ecc0a60f188273931527de5c12 to your computer and use it in GitHub Desktop.
Save kepstin/2c23f3ecc0a60f188273931527de5c12 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import mutagen
import mutagen.easymp4
import sys
if len(sys.argv) < 3:
print "Usage: %s src.flac dest.m4a" % (sys.argv[0])
sys.exit(1)
flacfile = mutagen.File(sys.argv[1])
aacfile = mutagen.easymp4.EasyMP4(sys.argv[2])
for tag in flacfile:
try:
aacfile[tag] = flacfile[tag]
except mutagen.easymp4.EasyMP4KeyError:
pass
aacfile.save()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment