Update utils.rs

This commit is contained in:
LetMeByte 2023-02-23 16:13:33 +01:00 committed by GitHub
parent 90212c4ec0
commit 484ae80249
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -486,7 +486,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"])
} }
} }
@ -504,7 +504,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"])
} }
} }