From 8945da8c613084c271872216737365cf04a8275e Mon Sep 17 00:00:00 2001
From: Chris Pomeroy <chris.pomeroy@ercot.com>
Date: Tue, 08 Aug 2017 22:09:02 +0000
Subject: [PATCH] Added json and correcting command for ffprobe

---
 aaxConvert.py |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/aaxConvert.py b/aaxConvert.py
index 01c91bb..94fca03 100755
--- a/aaxConvert.py
+++ b/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
+

--
Gitblit v1.10.0