optimize if chain

This commit is contained in:
Dominic 2023-11-16 12:05:13 +01:00
parent 083bcb07c2
commit fad0d1ec6c
Signed by: msrd0
GPG key ID: DCC8C247452E98F9

View file

@ -270,12 +270,12 @@ impl Ffmpeg {
cmd.arg("-crf").arg(QUALITY); cmd.arg("-crf").arg(QUALITY);
} }
} }
if self.video_bitrate.is_some() {
cmd.arg("-b:v").arg(self.video_bitrate.unwrap().to_string());
}
} else { } else {
cmd.arg("-c:v").arg("copy"); cmd.arg("-c:v").arg("copy");
} }
if venc && self.video_bitrate.is_some() {
cmd.arg("-b:v").arg(self.video_bitrate.unwrap().to_string());
}
if aenc { if aenc {
cmd.arg("-c:a").arg("aac"); cmd.arg("-c:a").arg("aac");
cmd.arg("-b:a").arg("128000"); cmd.arg("-b:a").arg("128000");