%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
|
height = 480
|
||||||
aspect = 16/9
|
aspect = 16/9
|
||||||
width = int(height * aspect)
|
width = int(height * aspect)
|
||||||
|
width -= width % 2
|
||||||
|
|
||||||
files = []
|
files = []
|
||||||
for clip in edit:
|
for clip in edit:
|
||||||
|
@ -28,9 +29,11 @@ for clip in edit:
|
||||||
if clip_aspect < aspect:
|
if clip_aspect < aspect:
|
||||||
x = width
|
x = width
|
||||||
y = int(x / clip_aspect)
|
y = int(x / clip_aspect)
|
||||||
|
y -= y % 2
|
||||||
else:
|
else:
|
||||||
y = height
|
y = height
|
||||||
x = int(y * clip_aspect)
|
x = int(y * clip_aspect)
|
||||||
|
x -= x % 2
|
||||||
vf = 'scale=%s:%s' % (x, y)
|
vf = 'scale=%s:%s' % (x, y)
|
||||||
if x != width:
|
if x != width:
|
||||||
vf += ',crop=%s:%s' % (width, height) # crop center
|
vf += ',crop=%s:%s' % (width, height) # crop center
|
||||||
|
|
Loading…
Reference in a new issue