统一qsv加速,删除无用不统一的rc参数
This commit is contained in:
parent
bdc82f986c
commit
4c4e3fa4e6
@ -420,8 +420,8 @@ def get_encode_process_use_nvenc(orig_filename: str, subtitles: list[str], new_f
|
||||
encode_process = subprocess.Popen([
|
||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||
"-i", orig_filename, "-vf",
|
||||
",".join("subtitles=%s" % i for i in subtitles) + ",hwupload_cuda",
|
||||
"-c:v", "h264_nvenc", "-rc:v", "vbr",
|
||||
",".join("subtitles=%s" % i for i in subtitles),
|
||||
"-c:v", "h264_nvenc",
|
||||
*_common_ffmpeg_params(),
|
||||
# "-t", "10",
|
||||
new_filename
|
||||
@ -430,28 +430,17 @@ def get_encode_process_use_nvenc(orig_filename: str, subtitles: list[str], new_f
|
||||
|
||||
|
||||
def get_encode_process_use_intel(orig_filename: str, subtitles: list[str], new_filename: str):
|
||||
if platform.system().lower() == "windows":
|
||||
print("[+]Use Intel QSV Acceleration")
|
||||
encode_process = subprocess.Popen([
|
||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||
"-hwaccel", "qsv", "-i", orig_filename, "-vf",
|
||||
",".join("subtitles=%s" % i for i in subtitles),
|
||||
"-c:v", "h264_qsv", "-rc:v", "vbr",
|
||||
*_common_ffmpeg_params(),
|
||||
# "-t", "10",
|
||||
new_filename
|
||||
], **subprocess_args(True))
|
||||
else:
|
||||
print("[+]Use Intel VAAPI Acceleration")
|
||||
encode_process = subprocess.Popen([
|
||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||
"-hwaccel", "vaapi", "-i", orig_filename, "-vf",
|
||||
",".join("subtitles=%s" % i for i in subtitles) + ",hwupload",
|
||||
"-c:v", "h264_vaapi", "-rc:v", "vbr",
|
||||
*_common_ffmpeg_params(),
|
||||
# "-t", "10",
|
||||
new_filename
|
||||
], **subprocess_args(True))
|
||||
print("[+]Use Intel QSV Acceleration")
|
||||
encode_process = subprocess.Popen([
|
||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||
"-init_hw_device", "qsv=hw", "-filter_hw_device", "hw",
|
||||
"-i", orig_filename, "-vf",
|
||||
",".join("subtitles=%s" % i for i in subtitles),
|
||||
"-c:v", "h264_qsv",
|
||||
*_common_ffmpeg_params(),
|
||||
# "-t", "10",
|
||||
new_filename
|
||||
], stdout=subprocess.PIPE)
|
||||
return encode_process
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user