180/-180 rotation does not change width/height

This commit is contained in:
j 2023-07-06 17:07:11 +05:30
parent 3debebf923
commit baec9c4ea6

View file

@ -276,7 +276,7 @@ def ffprobe(filename):
# print s
for v in info['video']:
k = 'display_aspect_ratio'
if 'rotate' in info.get('metadata', {}) and int(info['metadata']['rotate']) in (-180, -90, 90, 180):
if 'rotate' in info.get('metadata', {}) and int(info['metadata']['rotate']) in (-90, 90):
v['width'], v['height'] = v['height'], v['width']
if k in v:
v[k] = ':'.join(reversed(v[k].split(':')))