fix ox.ffprobe output to match ox.avinfo
This commit is contained in:
parent
edf876c119
commit
fd0c35fa14
1 changed files with 6 additions and 3 deletions
|
@ -264,17 +264,20 @@ def ffprobe(filename):
|
||||||
'r_frame_rate': 'framerate',
|
'r_frame_rate': 'framerate',
|
||||||
'sample_rate': 'samplerate',
|
'sample_rate': 'samplerate',
|
||||||
'pix_fmt': 'pixel_format',
|
'pix_fmt': 'pixel_format',
|
||||||
|
'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)
|
||||||
else:
|
else:
|
||||||
pass
|
pass
|
||||||
#print s
|
#print s
|
||||||
for v in info['video']:
|
for v in info['video']:
|
||||||
if not 'display_aspect_ratio' in v and 'width' in v:
|
k = 'display_aspect_ratio'
|
||||||
v['display_aspect_ratio'] = '%d:%d' % (v['width'], v['height'])
|
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'
|
v['pixel_aspect_ratio'] = '1:1'
|
||||||
info['oshash'] = oshash(filename)
|
info['oshash'] = oshash(filename)
|
||||||
info['path'] = os.path.basename(filename)
|
info['path'] = filename
|
||||||
return info
|
return info
|
||||||
|
|
||||||
def makedirs(path):
|
def makedirs(path):
|
||||||
|
|
Loading…
Reference in a new issue