use apsect ratio from video source
This commit is contained in:
parent
0aaf1a9263
commit
afd0e519b7
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,8 @@ for clip in edit:
|
|||
})
|
||||
position += duration
|
||||
continue
|
||||
clip_aspect = clip['resolution'][0] / clip['resolution'][1]
|
||||
src_info = ox.avinfo(clip['path'])
|
||||
clip_aspect = src_info['video'][0]['width'] / src_info['video'][0]['height']
|
||||
if clip_aspect < aspect:
|
||||
x = width
|
||||
y = int(x / clip_aspect)
|
||||
|
@ -103,7 +104,6 @@ for clip in edit:
|
|||
print('skip empty clip', clip)
|
||||
else:
|
||||
files.append(out)
|
||||
src_info = ox.avinfo(clip['path'])
|
||||
vid = src_info['video'][0]['id']
|
||||
if not src_info['audio']:
|
||||
audio = ['-f', 'lavfi', '-i', 'anullsrc=channel_layout=stereo:sample_rate=48000']
|
||||
|
|
Loading…
Reference in a new issue