Added 'ffprobe' command line handler options
authorThierry Florac <thierry.florac@onf.fr>
Tue, 08 Sep 2015 17:00:34 +0200
changeset 7 b930c820b6cd
parent 6 b78dab193043
child 8 e42e04460e14
Added 'ffprobe' command line handler options
src/pyams_media/ffbase.py
--- a/src/pyams_media/ffbase.py	Tue Sep 08 16:59:44 2015 +0200
+++ b/src/pyams_media/ffbase.py	Tue Sep 08 17:00:34 2015 +0200
@@ -151,9 +151,9 @@
         for i in range(0, len(input) * 2, 2):
             input.insert(i, "-i")
         if self.__ffmpeg__ == 'ffprobe':
-            input.extend(['-show_streams', '-print_format', 'json'])
+            input.extend(['-show_format', '-show_streams', '-print_format', 'json'])
             probe = self.__exec__(*input)[0]  # stdout
-            metadata.extend(json.loads(probe.decode()).get('streams', []))
+            metadata = json.loads(probe.decode())
         else:
             lines = self.__exec__(*input)[1]  # stderr
             for line in lines.split(b'\n'):