From db7125c187939d502a2a67d0e8580d933575e1d7 Mon Sep 17 00:00:00 2001 From: michael Date: Fri, 28 Aug 2015 22:39:57 -0400 Subject: [PATCH] better video scaling --- converter/avcodecs.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/converter/avcodecs.py b/converter/avcodecs.py index f005ba93..2aa8c116 100644 --- a/converter/avcodecs.py +++ b/converter/avcodecs.py @@ -652,9 +652,9 @@ def _codec_specific_produce_ffmpeg_list(self, safe, stream=0): if 'wscale' in safe and 'hscale' in safe: optlist.extend(['-vf', 'scale=%s:%s' % (safe['wscale'], safe['hscale'])]) elif 'wscale' in safe: - optlist.extend(['-vf', 'scale=%s:-2' % (safe['wscale'])]) + optlist.extend(['-vf', 'scale=%s:trunc(ow/a/2)*2' % (safe['wscale'])]) elif 'hscale' in safe: - optlist.extend(['-vf', 'scale=-2:%s' % (safe['hscale'])]) + optlist.extend(['-vf', 'scale=trunc((oh*a)/2)*2:%s' % (safe['hscale'])]) return optlist