You've already forked FrameTour-RenderWorker
尝试传入resolution,不使用scale自适应模板
This commit is contained in:
@ -33,6 +33,7 @@ class FfmpegTask(object):
|
||||
self.mute = True
|
||||
self.speed = 1
|
||||
self.frame_rate = 25
|
||||
self.resolution = None
|
||||
self.subtitles = []
|
||||
self.luts = []
|
||||
self.audios = []
|
||||
@ -239,7 +240,13 @@ class FfmpegTask(object):
|
||||
input_index = input_args.count("-i")
|
||||
input_args.append("-i")
|
||||
input_args.append(overlay)
|
||||
filter_args.append(f"{video_output_str}[{input_index}:v]scale=rw:rh[v]")
|
||||
if self.resolution:
|
||||
filter_args.append(f"{video_output_str}scale={self.resolution.replace('x', ':')}[v]")
|
||||
else:
|
||||
if os.getenv("OLD_FFMPEG"):
|
||||
filter_args.append(f"{video_output_str}[{input_index}:v]scale2ref=iw:ih[v]")
|
||||
else:
|
||||
filter_args.append(f"{video_output_str}[{input_index}:v]scale=rw:rh[v]")
|
||||
filter_args.append(f"[v][{input_index}:v]overlay=1:eof_action=endall[v]")
|
||||
video_output_str = "[v]"
|
||||
for subtitle in self.subtitles:
|
||||
|
Reference in New Issue
Block a user