windows 兼容性
This commit is contained in:
parent
be617d6e33
commit
aca066aad1
@ -53,6 +53,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):
|
def get_encode_process_use_intel(orig_filename: str, subtitles: list[str], new_filename: str):
|
||||||
print("[+]Use Intel QSV Acceleration")
|
print("[+]Use Intel QSV Acceleration")
|
||||||
|
if platform.system().lower() == "windows":
|
||||||
|
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
|
||||||
|
], stdout=subprocess.PIPE)
|
||||||
|
return encode_process
|
||||||
encode_process = subprocess.Popen([
|
encode_process = subprocess.Popen([
|
||||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||||
"-init_hw_device", "qsv=hw", "-filter_hw_device", "hw",
|
"-init_hw_device", "qsv=hw", "-filter_hw_device", "hw",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user