LINUX FFMPEG 7.0 Compatible
This commit is contained in:
parent
bc13578156
commit
03b4434c36
@ -148,7 +148,7 @@ class FfmpegTask(object):
|
|||||||
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)
|
||||||
filter_args.append(f"{video_output_str}[{input_index}:v]scale2ref=mw:mh[v]")
|
filter_args.append(f"{video_output_str}[{input_index}:v]scale2ref=main_w:main_h[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:
|
||||||
@ -280,4 +280,4 @@ class FfmpegTask(object):
|
|||||||
elif isinstance(input_file, FfmpegTask):
|
elif isinstance(input_file, FfmpegTask):
|
||||||
if not input_file.check_annexb():
|
if not input_file.check_annexb():
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
@ -64,7 +64,7 @@ def duration_str_to_float(duration_str: str) -> float:
|
|||||||
def probe_video_info(video_file):
|
def probe_video_info(video_file):
|
||||||
# 获取宽度和高度
|
# 获取宽度和高度
|
||||||
result = subprocess.run(
|
result = subprocess.run(
|
||||||
["ffprobe.exe", '-v', 'error', '-select_streams', 'v:0', '-show_entries', 'stream=width,height:format=duration', '-of',
|
["ffprobe", '-v', 'error', '-select_streams', 'v:0', '-show_entries', 'stream=width,height:format=duration', '-of',
|
||||||
'csv=s=x:p=0', video_file],
|
'csv=s=x:p=0', video_file],
|
||||||
stderr=subprocess.STDOUT,
|
stderr=subprocess.STDOUT,
|
||||||
**subprocess_args(True)
|
**subprocess_args(True)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user