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