load subtitle info

This commit is contained in:
j 2019-08-01 16:28:00 +02:00
parent d632cd3803
commit b49acd47dc

View file

@ -293,6 +293,18 @@ def ffprobe(filename):
'sample_aspect_ratio': 'pixel_aspect_ratio', 'sample_aspect_ratio': 'pixel_aspect_ratio',
}.get(key, key)] = fix_value(key, s[key]) }.get(key, key)] = fix_value(key, s[key])
info[s['codec_type']].append(stream) info[s['codec_type']].append(stream)
elif s.get('codec_type') == 'subtitle':
info['subtitles'] = info.get('subtitles', [])
stream = {}
for key in (
'codec_name', 'language'
):
if key in s:
stream[{
'codec_name': 'codec',
}.get(key, key)] = s[key]
info['subtitles'].append(stream)
else: else:
pass pass
# print s # print s