根据模板定义的分辨率进行操作
This commit is contained in:
parent
d8bc3c8595
commit
02dd2b72a0
@ -77,7 +77,7 @@ def find_placeholder_params(source, task_params):
|
|||||||
return {}
|
return {}
|
||||||
else:
|
else:
|
||||||
return new_sources[0]
|
return new_sources[0]
|
||||||
return {}
|
return {}
|
||||||
|
|
||||||
|
|
||||||
def parse_video(source, task_params, template_info):
|
def parse_video(source, task_params, template_info):
|
||||||
|
@ -236,17 +236,17 @@ class FfmpegTask(object):
|
|||||||
...
|
...
|
||||||
for lut in self.luts:
|
for lut in self.luts:
|
||||||
filter_args.append(f"{video_output_str}lut3d=file={lut}{video_output_str}")
|
filter_args.append(f"{video_output_str}lut3d=file={lut}{video_output_str}")
|
||||||
|
if self.resolution:
|
||||||
|
filter_args.append(f"{video_output_str}scale={self.resolution.replace('x', ':')}[v]")
|
||||||
|
video_output_str = "[v]"
|
||||||
for overlay in self.overlays:
|
for overlay in self.overlays:
|
||||||
input_index = input_args.count("-i")
|
input_index = input_args.count("-i")
|
||||||
input_args.append("-i")
|
input_args.append("-i")
|
||||||
input_args.append(overlay)
|
input_args.append(overlay)
|
||||||
if self.resolution:
|
if os.getenv("OLD_FFMPEG"):
|
||||||
filter_args.append(f"{video_output_str}scale={self.resolution.replace('x', ':')}[v]")
|
filter_args.append(f"{video_output_str}[{input_index}:v]scale2ref=iw:ih[v]")
|
||||||
else:
|
else:
|
||||||
if os.getenv("OLD_FFMPEG"):
|
filter_args.append(f"{video_output_str}[{input_index}:v]scale=rw:rh[v]")
|
||||||
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]")
|
filter_args.append(f"[v][{input_index}:v]overlay=1:eof_action=endall[v]")
|
||||||
video_output_str = "[v]"
|
video_output_str = "[v]"
|
||||||
for subtitle in self.subtitles:
|
for subtitle in self.subtitles:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user