From 5919345d3dea34050ce151acd6499472da6b62da Mon Sep 17 00:00:00 2001 From: j Date: Sat, 22 Oct 2022 11:50:46 +0200 Subject: [PATCH] fix aspect ratio --- ox/file.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ox/file.py b/ox/file.py index 885a982..d60fb3c 100644 --- a/ox/file.py +++ b/ox/file.py @@ -275,11 +275,11 @@ def ffprobe(filename): pass # 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): v['width'], v['height'] = v['height'], v['width'] - k = 'display_aspect_ratio' - if k in v: - v[k] = ':'.join(reversed(v[k].split(':'))) + if k in v: + v[k] = ':'.join(reversed(v[k].split(':'))) if k not in v and 'width' in v \ or (k in v and v[k] == '0:1'): v[k] = '%d:%d' % (v['width'], v['height'])