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
|
// 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 {
|
||||||
|
|
Loading…
Reference in a new issue