Chris Pomeroy
2017-08-08 8945da8c613084c271872216737365cf04a8275e
aaxConvert.py
@@ -2,6 +2,8 @@
import argparse
import os
import glob
import subprocess
import json
# arguments
# activation_key, file name, codec(default to mp3)
@@ -23,6 +25,9 @@
    print act_byte
for rfile in glob.glob(args.filename):
    if (rfile.find("aax") != -1):
        if os.path.isfile(rfile):
            print os.path.abspath(rfile)
    if rfile.find("aax") != -1 and os.path.isfile(rfile):
    #print os.path.abspath(rfile)
        ret = subprocess.check_output(["ffprobe", "-v", "quiet", "-hide_banner", "-show_format", "-show_chapters", "-print_format", "json", os.path.abspath(rfile)])
        metadata = json.load(ret)
        print ret