so I do this in my script:
import json
info = json.loads(get_info())
print info
Which outputs:
richard@richard-desktop:~/projec
To print codec_long_name
and duration
from the second stream do the following:
details = subprocess.check_output(["C:/FFmpeg/bin/ffprobe.exe",
"-loglevel", "quiet", "-print_format", "json", "-show_streams",
file_path])
info = json.loads(details)
print info['streams'][1]['codec_long_name'], info['streams'][1]['duration']