50fps should result in 25fps videos
This commit is contained in:
parent
73e82cca92
commit
3dc8dfcacd
1 changed files with 9 additions and 3 deletions
|
@ -117,7 +117,13 @@ def video_cmd(video, target, profile, info):
|
||||||
fps = AspectRatio(info['video'][0]['framerate'])
|
fps = AspectRatio(info['video'][0]['framerate'])
|
||||||
width = int(dar * height)
|
width = int(dar * height)
|
||||||
width += width % 2
|
width += width % 2
|
||||||
|
extra = []
|
||||||
|
if fps == 50:
|
||||||
|
fps = 25
|
||||||
|
extra += ['-r', '25']
|
||||||
|
if fps == 60:
|
||||||
|
fps = 30
|
||||||
|
extra += ['-r', '30']
|
||||||
bitrate = height*width*fps*bpp/1000
|
bitrate = height*width*fps*bpp/1000
|
||||||
aspect = dar.ratio
|
aspect = dar.ratio
|
||||||
#use 1:1 pixel aspect ratio if dar is close to that
|
#use 1:1 pixel aspect ratio if dar is close to that
|
||||||
|
@ -129,7 +135,7 @@ def video_cmd(video, target, profile, info):
|
||||||
'-s', '%dx%d'%(width, height),
|
'-s', '%dx%d'%(width, height),
|
||||||
'-aspect', aspect,
|
'-aspect', aspect,
|
||||||
'-vf', 'yadif',
|
'-vf', 'yadif',
|
||||||
]
|
] + extra
|
||||||
else:
|
else:
|
||||||
video_settings = ['-vn']
|
video_settings = ['-vn']
|
||||||
|
|
||||||
|
@ -143,7 +149,7 @@ def video_cmd(video, target, profile, info):
|
||||||
else:
|
else:
|
||||||
audio_settings = ['-an']
|
audio_settings = ['-an']
|
||||||
|
|
||||||
cmd = ['ffmpeg', '-y', '-i', video] \
|
cmd = ['ffmpeg', '-y', '-i', video, '-threads', '4'] \
|
||||||
+ audio_settings \
|
+ audio_settings \
|
||||||
+ video_settings \
|
+ video_settings \
|
||||||
+ ['-f','webm', target]
|
+ ['-f','webm', target]
|
||||||
|
|
Loading…
Reference in a new issue