Skip to content

Commit

Permalink
better video scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
michael committed Aug 29, 2015
1 parent 33eb642 commit db7125c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions converter/avcodecs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down

0 comments on commit db7125c

Please sign in to comment.