Skip to content
Snippets Groups Projects
Verified Commit 0d98ab21 authored by Dominic Meiser's avatar Dominic Meiser
Browse files

use libsvtav1 instead of av1 when vaapi is disabled

parent 9d87c61a
No related branches found
No related tags found
No related merge requests found
...@@ -104,13 +104,12 @@ impl FfmpegOutput { ...@@ -104,13 +104,12 @@ impl FfmpegOutput {
// select codec and bitrate // select codec and bitrate
const QUALITY: &str = "22"; const QUALITY: &str = "22";
if venc { if venc {
let mut vcodec: String = match self.format { let vcodec = match (self.format, vaapi) {
FfmpegOutputFormat::Av1Flac | FfmpegOutputFormat::Av1Opus => "av1".into(), (FfmpegOutputFormat::Av1Flac, false) | (FfmpegOutputFormat::Av1Opus, false) => "libsvtav1",
FfmpegOutputFormat::AvcAac => "h264".into() (FfmpegOutputFormat::Av1Flac, true) | (FfmpegOutputFormat::Av1Opus, true) => "av1_vaapi",
(FfmpegOutputFormat::AvcAac, false) => "h264",
(FfmpegOutputFormat::AvcAac, true) => "h264_vaapi"
}; };
if vaapi {
vcodec = format!("{vcodec}_vaapi");
}
cmd.arg("-c:v").arg(vcodec); cmd.arg("-c:v").arg(vcodec);
if let Some(bv) = self.video_bitrate { if let Some(bv) = self.video_bitrate {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment