map track language to track
This commit is contained in:
parent
2bd1c7d657
commit
bc9c3c8944
1 changed files with 7 additions and 1 deletions
|
@ -215,10 +215,16 @@ def ffprobe(filename):
|
|||
info['metadata'] = ffinfo['format'].get('tags', {})
|
||||
for s in ffinfo['streams']:
|
||||
tags = s.pop('tags', {})
|
||||
language = None
|
||||
for t in tags:
|
||||
info['metadata'][t] = tags[t]
|
||||
if t == 'language':
|
||||
language = tags[t]
|
||||
else:
|
||||
info['metadata'][t] = tags[t]
|
||||
if s.get('codec_type') in ('audio', 'video'):
|
||||
stream = {}
|
||||
if language and language != 'und':
|
||||
stream['language'] = language
|
||||
keys = [
|
||||
'codec_name',
|
||||
'width',
|
||||
|
|
Loading…
Reference in a new issue