%2
This commit is contained in:
parent
16cbe7db87
commit
4245416b33
1 changed files with 3 additions and 0 deletions
|
@ -17,6 +17,7 @@ output = '/tmp/test.mp4'
|
|||
height = 480
|
||||
aspect = 16/9
|
||||
width = int(height * aspect)
|
||||
width -= width % 2
|
||||
|
||||
files = []
|
||||
for clip in edit:
|
||||
|
@ -28,9 +29,11 @@ for clip in edit:
|
|||
if clip_aspect < aspect:
|
||||
x = width
|
||||
y = int(x / clip_aspect)
|
||||
y -= y % 2
|
||||
else:
|
||||
y = height
|
||||
x = int(y * clip_aspect)
|
||||
x -= x % 2
|
||||
vf = 'scale=%s:%s' % (x, y)
|
||||
if x != width:
|
||||
vf += ',crop=%s:%s' % (width, height) # crop center
|
||||
|
|
Loading…
Reference in a new issue