uncommitted stuff: some bitrate changes [skip ci]
This commit is contained in:
parent
6e56452f78
commit
b6fb0fa184
1 changed files with 8 additions and 16 deletions
|
@ -117,9 +117,8 @@ impl FfmpegOutput {
|
|||
self
|
||||
}
|
||||
|
||||
fn append_to_cmd(self, cmd: &mut Command, venc: bool, _aenc: bool, vaapi: bool) {
|
||||
// select codec and bitrate
|
||||
const QUALITY: &str = "28";
|
||||
fn append_to_cmd(self, cmd: &mut Command, venc: bool, _aenc: bool, mut vaapi: bool) {
|
||||
// select codec and bitrate/crf
|
||||
if venc {
|
||||
let vcodec = match (self.format, vaapi) {
|
||||
(FfmpegOutputFormat::Av1Flac, false)
|
||||
|
@ -134,19 +133,12 @@ impl FfmpegOutput {
|
|||
if vcodec == "libsvtav1" {
|
||||
cmd.arg("-svtav1-params").arg("fast-decode=1");
|
||||
cmd.arg("-preset").arg("7");
|
||||
}
|
||||
|
||||
match self.video_bitrate {
|
||||
Some(bv) if vcodec != "libsvtav1" => {
|
||||
cmd.arg("-crf").arg("28");
|
||||
} else if vcodec == "h264" {
|
||||
cmd.arg("-preset").arg("slow");
|
||||
cmd.arg("-crf").arg("21");
|
||||
} else if let Some(bv) = self.video_bitrate {
|
||||
cmd.arg("-b:v").arg(bv.to_string());
|
||||
},
|
||||
None if vaapi => {
|
||||
cmd.arg("-rc_mode").arg("CQP");
|
||||
cmd.arg("-global_quality").arg(QUALITY);
|
||||
},
|
||||
_ => {
|
||||
cmd.arg("-crf").arg(QUALITY);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
cmd.arg("-c:v").arg("copy");
|
||||
|
|
Loading…
Reference in a new issue