fix ox.ffprobe output to match ox.avinfo

This commit is contained in:
j 2014-12-19 11:57:38 +00:00
parent edf876c119
commit fd0c35fa14

View file

@ -264,17 +264,20 @@ def ffprobe(filename):
'r_frame_rate': 'framerate',
'sample_rate': 'samplerate',
'pix_fmt': 'pixel_format',
'sample_aspect_ratio': 'pixel_aspect_ratio',
}.get(key, key)] = fix_value(key, s[key])
info[s['codec_type']].append(stream)
else:
pass
#print s
for v in info['video']:
if not 'display_aspect_ratio' in v and 'width' in v:
v['display_aspect_ratio'] = '%d:%d' % (v['width'], v['height'])
k = 'display_aspect_ratio'
if not k in v and 'width' in v \
or (k in v and v[k] == '0:1'):
v[k] = '%d:%d' % (v['width'], v['height'])
v['pixel_aspect_ratio'] = '1:1'
info['oshash'] = oshash(filename)
info['path'] = os.path.basename(filename)
info['path'] = filename
return info
def makedirs(path):