Created
March 16, 2024 14:47
-
-
Save flavioribeiro/e31df329bd1f06eedda426a18373d2ac to your computer and use it in GitHub Desktop.
get fmp4mux with av1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git mux/fmp4/Cargo.toml mux/fmp4/Cargo.toml | |
index 73e1f01b..090dc3a7 100644 | |
--- mux/fmp4/Cargo.toml | |
+++ mux/fmp4/Cargo.toml | |
@@ -3,7 +3,7 @@ name = "gst-plugin-fmp4" | |
version = "0.12.0-alpha.1" | |
authors = ["Sebastian Dröge <[email protected]>"] | |
license = "MPL-2.0" | |
-description = "GStreamer Fragmented MP4 Plugin" | |
+description = "GStreamer Fragmented MP4 Plugin (Supports AV1)" | |
repository = "https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs" | |
edition = "2021" | |
rust-version = "1.70" | |
diff --git mux/fmp4/src/fmp4mux/boxes.rs mux/fmp4/src/fmp4mux/boxes.rs | |
index 9d84158e..23fb7cbd 100644 | |
--- mux/fmp4/src/fmp4mux/boxes.rs | |
+++ mux/fmp4/src/fmp4mux/boxes.rs | |
@@ -157,6 +157,11 @@ fn cmaf_brands_from_caps(caps: &gst::CapsRef, compatible_brands: &mut Vec<&'stat | |
} | |
} | |
} | |
+ "video/x-av1" => { | |
+ // https://aomediacodec.github.io/av1-isobmff/#cmaf | |
+ compatible_brands.push(b"cmfc"); | |
+ compatible_brands.push(b"cmf2"); | |
+ } | |
"audio/mpeg" => { | |
compatible_brands.push(b"caac"); | |
} | |
diff --git mux/fmp4/src/fmp4mux/imp.rs mux/fmp4/src/fmp4mux/imp.rs | |
index 3a090d6d..1454a2cc 100644 | |
--- mux/fmp4/src/fmp4mux/imp.rs | |
+++ mux/fmp4/src/fmp4mux/imp.rs | |
@@ -3539,6 +3539,10 @@ impl ElementImpl for CMAFMux { | |
.field("width", gst::IntRange::new(1, u16::MAX as i32)) | |
.field("height", gst::IntRange::new(1, u16::MAX as i32)) | |
.build(), | |
+ gst::Structure::builder("video/x-av1") | |
+ .field("stream-format", "obu-stream") | |
+ .field("alignment", "tu") | |
+ .build(), | |
gst::Structure::builder("video/x-h265") | |
.field("stream-format", gst::List::new(["hvc1", "hev1"])) | |
.field("alignment", "au") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment