use libsvtav1 instead of av1 when vaapi is disabled
This commit is contained in:
parent
9d87c61a39
commit
0d98ab21f0
1 changed files with 5 additions and 6 deletions
|
@ -104,13 +104,12 @@ impl FfmpegOutput {
|
|||
// select codec and bitrate
|
||||
const QUALITY: &str = "22";
|
||||
if venc {
|
||||
let mut vcodec: String = match self.format {
|
||||
FfmpegOutputFormat::Av1Flac | FfmpegOutputFormat::Av1Opus => "av1".into(),
|
||||
FfmpegOutputFormat::AvcAac => "h264".into()
|
||||
let vcodec = match (self.format, vaapi) {
|
||||
(FfmpegOutputFormat::Av1Flac, false) | (FfmpegOutputFormat::Av1Opus, false) => "libsvtav1",
|
||||
(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);
|
||||
|
||||
if let Some(bv) = self.video_bitrate {
|
||||
|
|
Loading…
Reference in a new issue