mirror of
https://github.com/clinton-hall/nzbToMedia.git
synced 2025-07-06 13:11:11 -07:00
fix scaling issues. Fixes #672
This commit is contained in:
parent
f97087e492
commit
2864b730ca
1 changed files with 2 additions and 2 deletions
|
@ -218,11 +218,11 @@ def buildCommands(file, newDir, movieName, bitbucket):
|
|||
w_scale = width/float(scale.split(':')[0])
|
||||
h_scale = height/float(scale.split(':')[1])
|
||||
if w_scale > h_scale: # widescreen, Scale by width only.
|
||||
scale = scale.split(':')[0] + ":trunc(ih/2)*2"
|
||||
scale = scale.split(':')[0] + ":" + str(int((height/w_scale)/2)*2)
|
||||
if w_scale != 1:
|
||||
video_cmd.extend(['-vf', 'scale=' + scale])
|
||||
else: # lower or mathcing ratio, scale by height only.
|
||||
scale = "trunc(iw/2)*2:" + scale.split(':')[1]
|
||||
scale = str(int((width/h_scale)/2)*2) + ":" + scale.split(':')[1]
|
||||
if h_scale != 1:
|
||||
video_cmd.extend(['-vf', 'scale=' + scale])
|
||||
if nzbtomedia.VBITRATE:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue