Re-add hwaccel cuda

This commit is contained in:
ByteDream 2023-03-23 13:53:37 +01:00
parent b1d23c2f25
commit 55483878b3

View file

@ -285,7 +285,7 @@ impl FFmpegPreset {
if let Some(hwaccel) = hwaccel_opt { if let Some(hwaccel) = hwaccel_opt {
match hwaccel { match hwaccel {
FFmpegHwAccel::Nvidia => { FFmpegHwAccel::Nvidia => {
input.extend(["-hwaccel", "cuvid", "-c:v", "h264_cuvid"]); input.extend(["-hwaccel", "cuda", "-hwaccel_output_format", "cuda", "-c:v", "h264_cuvid"]);
output.extend(["-c:v", "h264_nvenc", "-c:a", "copy"]) output.extend(["-c:v", "h264_nvenc", "-c:a", "copy"])
} }
} }
@ -303,7 +303,7 @@ impl FFmpegPreset {
if let Some(hwaccel) = hwaccel_opt { if let Some(hwaccel) = hwaccel_opt {
match hwaccel { match hwaccel {
FFmpegHwAccel::Nvidia => { FFmpegHwAccel::Nvidia => {
input.extend(["-hwaccel", "cuvid", "-c:v", "h264_cuvid"]); input.extend(["-hwaccel", "cuda", "-hwaccel_output_format", "cuda", "-c:v", "h264_cuvid"]);
output.extend(["-c:v", "hevc_nvenc", "-c:a", "copy"]) output.extend(["-c:v", "hevc_nvenc", "-c:a", "copy"])
} }
} }