Fix VAAPI Encode Error
This commit is contained in:
parent
b74c6f0ef7
commit
86448ccc93
@ -83,7 +83,8 @@ def get_encode_process_use_vaapi(orig_filename: str, subtitles: list[str], new_f
|
|||||||
encode_process = subprocess.Popen([
|
encode_process = subprocess.Popen([
|
||||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||||
"-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi", "-i", orig_filename, "-vf",
|
"-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi", "-i", orig_filename, "-vf",
|
||||||
",".join("subtitles=%s" % i for i in subtitles),
|
"hwmap=mode=read+write+direct,format=nv12," +
|
||||||
|
"".join("subtitles=%s," % i for i in subtitles) + "hwmap",
|
||||||
"-c:v", "h264_vaapi",
|
"-c:v", "h264_vaapi",
|
||||||
*_common_ffmpeg_params(),
|
*_common_ffmpeg_params(),
|
||||||
# "-t", "10",
|
# "-t", "10",
|
||||||
@ -111,7 +112,7 @@ def get_encode_hevc_process_use_nvenc(orig_filename: str, subtitles: list[str],
|
|||||||
encode_process = subprocess.Popen([
|
encode_process = subprocess.Popen([
|
||||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||||
"-i", orig_filename, "-vf",
|
"-i", orig_filename, "-vf",
|
||||||
",".join("subtitles=%s" % i for i in subtitles) + ",hwupload_cuda",
|
"".join("subtitles=%s," % i for i in subtitles) + ",hwupload_cuda",
|
||||||
"-c:v", "hevc_nvenc",
|
"-c:v", "hevc_nvenc",
|
||||||
*_common_ffmpeg_params(),
|
*_common_ffmpeg_params(),
|
||||||
# "-t", "10",
|
# "-t", "10",
|
||||||
@ -125,7 +126,8 @@ def get_encode_hevc_process_use_vaapi(orig_filename: str, subtitles: list[str],
|
|||||||
encode_process = subprocess.Popen([
|
encode_process = subprocess.Popen([
|
||||||
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
FFMPEG_EXEC, *_common_ffmpeg_setting(),
|
||||||
"-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi", "-i", orig_filename, "-vf",
|
"-hwaccel", "vaapi", "-hwaccel_output_format", "vaapi", "-i", orig_filename, "-vf",
|
||||||
",".join("subtitles=%s" % i for i in subtitles),
|
"hwmap=mode=read+write+direct,format=nv12," +
|
||||||
|
"".join("subtitles=%s," % i for i in subtitles) + "hwmap",
|
||||||
"-c:v", "hevc_vaapi",
|
"-c:v", "hevc_vaapi",
|
||||||
*_common_ffmpeg_params(),
|
*_common_ffmpeg_params(),
|
||||||
# "-t", "10",
|
# "-t", "10",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user