added ab-av1 patch
This commit is contained in:
parent
3f1a9455c6
commit
14c6510d28
2 changed files with 37 additions and 0 deletions
20
modules/encode/ab-av1_opus_no_default_bitrate.patch
Normal file
20
modules/encode/ab-av1_opus_no_default_bitrate.patch
Normal file
|
|
@ -0,0 +1,20 @@
|
||||||
|
diff --git a/src/ffmpeg.rs b/src/ffmpeg.rs
|
||||||
|
index bb2dcad..8790725 100644
|
||||||
|
--- a/src/ffmpeg.rs
|
||||||
|
+++ b/src/ffmpeg.rs
|
||||||
|
@@ -141,7 +141,6 @@ pub fn encode(
|
||||||
|
"copy"
|
||||||
|
});
|
||||||
|
|
||||||
|
- let set_ba_128k = audio_codec == "libopus" && !oargs.contains("-b:a");
|
||||||
|
let downmix_to_stereo = downmix_to_stereo && !oargs.contains("-ac");
|
||||||
|
let map = match video_only {
|
||||||
|
true => "0:v:0",
|
||||||
|
@@ -165,7 +164,6 @@ pub fn encode(
|
||||||
|
.arg2("-c:a", audio_codec)
|
||||||
|
.arg_if(matroska, "-dn") // "Only audio, video, and subtitles are supported for Matroska"
|
||||||
|
.arg2_if(downmix_to_stereo, "-ac", 2)
|
||||||
|
- .arg2_if(set_ba_128k, "-b:a", "128k")
|
||||||
|
.arg2_if(add_faststart, "-movflags", "+faststart")
|
||||||
|
.arg2_if(add_cues_to_front, "-cues_to_front", "y")
|
||||||
|
.arg(output)
|
||||||
17
modules/encode/default.nix
Normal file
17
modules/encode/default.nix
Normal file
|
|
@ -0,0 +1,17 @@
|
||||||
|
{ config, pkgs, lib, ... }:
|
||||||
|
{
|
||||||
|
nixpkgs.overlays = [
|
||||||
|
(
|
||||||
|
final: prev: {
|
||||||
|
ab-av1 = prev.ab-av1.overrideAttrs (
|
||||||
|
old: {
|
||||||
|
patches = (old.patches or []) ++ [
|
||||||
|
./ab-av1_opus_no_default_bitrate.patch
|
||||||
|
];
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
||||||
|
)
|
||||||
|
];
|
||||||
|
}
|
||||||
|
# vim: set et ts=2 sw=2 ai:
|
||||||
Loading…
Add table
Reference in a new issue