Skip to content
Snippets Groups Projects
Unverified Commit 083bcb07 authored by Dominic Meiser's avatar Dominic Meiser
Browse files

fix incorrectly setting vaapi output when copying codec

parent 5746939c
No related branches found
No related tags found
No related merge requests found
...@@ -257,17 +257,19 @@ impl Ffmpeg { ...@@ -257,17 +257,19 @@ impl Ffmpeg {
// append encoding options // append encoding options
const QUALITY: &str = "22"; const QUALITY: &str = "22";
if venc {
if vaapi { if vaapi {
cmd.arg("-c:v").arg("h264_vaapi"); cmd.arg("-c:v").arg("h264_vaapi");
if self.video_bitrate.is_none() { if self.video_bitrate.is_none() {
cmd.arg("-rc_mode").arg("CQP"); cmd.arg("-rc_mode").arg("CQP");
cmd.arg("-global_quality").arg(QUALITY); cmd.arg("-global_quality").arg(QUALITY);
} }
} else if venc { } else {
cmd.arg("-c:v").arg("libx264"); cmd.arg("-c:v").arg("libx264");
if self.video_bitrate.is_none() { if self.video_bitrate.is_none() {
cmd.arg("-crf").arg(QUALITY); cmd.arg("-crf").arg(QUALITY);
} }
}
} else { } else {
cmd.arg("-c:v").arg("copy"); cmd.arg("-c:v").arg("copy");
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment