From a893c91f5ddb30e6c286e70ea7ac62b094a22a9b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Wed, 12 Aug 2026 20:39:11 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=92=20chore(privacy):=20the=20tests=20?= =?UTF-8?q?name=20a=20key,=20the=20machine=20names=20the=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nothing in this tree says what is in anybody's library or where it lives. The handful of tests that are worth nothing against a fixture -- a real HDR10 grade, a header-stripped BluRay remux, a disc's PGS tracks -- asked for absolute paths written into their source, and the comments around them recorded which films the measurements were taken on. Both go. `engine::real_library::film(key)` reads `real_library.toml` at the workspace root, which is gitignored: three logical keys named for what the file *is* (`hevc_4k_hdr`, `h264_dual_audio`, `hevc_4k_pgs`), mapped to wherever that machine keeps them. A missing manifest, a missing key or a missing file each say so on stderr and the test passes, which is the existence gate every one of these already had, in one line instead of five. `real_library.toml.example` documents the shape and what each key must be. The comments keep the technical fact and lose the title: a peak of 1759 cd/m^2 is still 1759, the 37 BCP-47 elements are still 37, and the Opus pre-skip is still measured against ffmpeg -- on "a real 5.1 Opus remux" rather than on a named one. The synthetic paths in the app's unit tests ("/films/…") were never real and are now anonymous too. --- .gitignore | 1 + crates/app/src/main.rs | 8 +-- crates/engine/Cargo.toml | 4 +- crates/engine/src/audio.rs | 4 +- crates/engine/src/colorspace.rs | 34 ++++------- crates/engine/src/demux.rs | 4 +- crates/engine/src/lib.rs | 1 + crates/engine/src/real_library.rs | 89 ++++++++++++++++++++++++++++ crates/engine/src/tonemap.rs | 4 +- crates/engine/tests/audio_streams.rs | 9 +-- crates/engine/tests/bitrate.rs | 2 +- crates/engine/tests/export_color.rs | 9 +-- crates/engine/tests/hw_decode.rs | 9 +-- crates/engine/tests/mkv_encodings.rs | 18 ++---- crates/engine/tests/pgs_bitmaps.rs | 16 ++--- crates/engine/tests/subtitles.rs | 16 ++--- real_library.toml.example | 20 +++++++ scripts/gen_fixtures.sh | 4 +- 18 files changed, 163 insertions(+), 89 deletions(-) create mode 100644 crates/engine/src/real_library.rs create mode 100644 real_library.toml.example diff --git a/.gitignore b/.gitignore index 85ef3d0..e108c68 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ /target /assets +/real_library.toml diff --git a/crates/app/src/main.rs b/crates/app/src/main.rs index ff6a30e..3f44eef 100644 --- a/crates/app/src/main.rs +++ b/crates/app/src/main.rs @@ -10786,7 +10786,7 @@ fn open_ahead( /// Reads, off the UI thread, exactly what the import that follows is about to /// read. The container's header is read for the page cache and thrown away: a /// cold header walk of a 29 GB remux is 11 s and a warm one is 150 ms -/// (measured, `a real 4K HEVC film` 2160p h265), so this call is the eleven +/// (measured on a real 2160p h265 remux), so this call is the eleven /// seconds and [`Player::take_import`] is the hundred and fifty milliseconds. /// The window keeps painting through the eleven. /// @@ -11713,7 +11713,7 @@ fn stream_detail(info: &StreamInfo) -> String { /// The marker costs the word "sound", the way the whole file's rate costs the /// word "total" above, and for the same reason. Measured in Noto Sans 11 px /// against the 186 px this value has beside a "Bitrate" label: "0.16 sound 1/2" -/// wants 192 px on a small film's 4.7 Mb/s and 205 on the 39.8 Mb/s remux -- +/// wants 192 px on a 4.7 Mb/s film and 205 on the 39.8 Mb/s remux -- /// the marker is what gets cut, which is the one part of the line that is new. /// Nothing that keeps the word fits the wide files -- the shortest, "snd 1/2", /// still wants 188 px on that remux -- so the word goes and the number keeps @@ -18638,7 +18638,7 @@ mod tests { ); // Both ends survive: the release's name at the front, the number // that tells them apart at the back. - assert!(clip_middle(a, width).starts_with('F')); + assert!(clip_middle(a, width).starts_with(&a[..2])); assert!(clip_middle(a, width).ends_with("01")); assert!(clip_middle(a, width).contains('…')); // Never wider than the column can hold, gap included. @@ -19347,7 +19347,7 @@ mod tests { /// three lines the same line counts instead. #[test] fn the_card_names_the_subtitle_it_leaves_off_and_counts_them_when_it_cannot() { - let film = "/films/a-real-h264-dual-audio-film.mkv"; + let film = "/films/An Episode 01.mkv"; let two = [ sub(film, Some(1), "[ASS]"), sub(film, Some(2), "[ASS] [FOR DUB]"), diff --git a/crates/engine/Cargo.toml b/crates/engine/Cargo.toml index 4990a87..8228f2a 100644 --- a/crates/engine/Cargo.toml +++ b/crates/engine/Cargo.toml @@ -70,8 +70,8 @@ rusty_vorbis = "0.1.1" # sibling pick, `rusty-opus 0.9.1` -- same family as `rusty_aac`/`rusty_mp3` # above -- hands each self-delimited slice to a decoder that parses it as an # ordinary packet, so every stream but the last decodes the length prefix as -# payload: measured on a real 5.1 Opus remux as full-scale noise at -13 dBFS where the -# film is silent. This one matches ffmpeg's own decode of the same file to a +# payload: measured on a real 5.1 Opus remux as full-scale noise at -13 dBFS +# where the film is silent. This one matches ffmpeg's own decode of the same file to a # correlation of 1.0000 on all six channels. Pinned exactly, like `oxideav-ac3` # below, because a decoder is a bit-exactness dependency. ruopus = { version = "=0.1.2", default-features = false, features = ["std"] } diff --git a/crates/engine/src/audio.rs b/crates/engine/src/audio.rs index 7d2f435..f94ecb3 100644 --- a/crates/engine/src/audio.rs +++ b/crates/engine/src/audio.rs @@ -1576,8 +1576,8 @@ impl SymTrack { Err(e) => eprintln!("audio reopen failed: {e}"), } // Asking for the beginning is asking for nothing: a fresh reader is - // already there, and *seeking* there is how the first 167 ms of - // the remux went missing -- the cue table's first point put the + // already there, and *seeking* there is how the first 167 ms of a + // real 5.1 Opus remux went missing -- the cue table's first point put the // reader past them and no window rule can reach back. if from == 0 { return; diff --git a/crates/engine/src/colorspace.rs b/crates/engine/src/colorspace.rs index 03f0366..92c67cc 100644 --- a/crates/engine/src/colorspace.rs +++ b/crates/engine/src/colorspace.rs @@ -974,7 +974,7 @@ fn av1_color_config(b: &mut Bits, seq_profile: u32) -> Tags { mod tests { use super::*; use crate::demux::Demuxer; - use std::path::{Path, PathBuf}; + use std::path::PathBuf; fn asset(name: &str) -> PathBuf { PathBuf::from(env!("CARGO_MANIFEST_DIR")) @@ -1225,17 +1225,13 @@ mod tests { /// A real HDR film: BT.2020 non-constant-luminance, PQ, limited range, all /// three off the Matroska `Colour` element. Gated on the file being here -- - /// it is a 25 GB download, not a fixture. + /// it is a 25 GB remux, not a fixture (`crate::real_library`). #[test] fn real_hdr_film_reads_bt2020_pq() { - let path = Path::new( - "/path/to/a-real-4k-hdr10-film.mkv", - ); - if !path.exists() { - eprintln!("skipped: {} is not on this machine", path.display()); + let Some(path) = crate::real_library::film("hevc_4k_hdr") else { return; - } - let (meta, _) = Demuxer::open(path).expect("open the HDR film"); + }; + let (meta, _) = Demuxer::open(&path).expect("open the HDR film"); assert_eq!( meta.color, ColorDescription { @@ -1251,14 +1247,10 @@ mod tests { /// HD material. Gated for the same reason as the one above. #[test] fn real_untagged_hd_film_reads_bt709() { - let path = Path::new( - "/path/to/a-real-h264-dual-audio-film.mkv", - ); - if !path.exists() { - eprintln!("skipped: {} is not on this machine", path.display()); + let Some(path) = crate::real_library::film("h264_dual_audio") else { return; - } - let (meta, _) = Demuxer::open(path).expect("open the untagged film"); + }; + let (meta, _) = Demuxer::open(&path).expect("open the untagged film"); assert_eq!( meta.color, ColorDescription { @@ -1575,14 +1567,10 @@ mod tests { /// 50/10000). Skipped, loudly, on a machine without the film. #[test] fn a_real_hdr_film_reports_the_peak_ffprobe_reports() { - let film = Path::new( - "/path/to/a-real-4k-hdr10-film.mkv", - ); - if !film.exists() { - eprintln!("skipped: {} is not on this machine", film.display()); + let Some(film) = crate::real_library::film("hevc_4k_hdr") else { return; - } - let (_, demuxer) = Demuxer::open(film).expect("open the film"); + }; + let (_, demuxer) = Demuxer::open(&film).expect("open the film"); same_light( demuxer.light(), ContentLight { diff --git a/crates/engine/src/demux.rs b/crates/engine/src/demux.rs index a436803..665c4f0 100644 --- a/crates/engine/src/demux.rs +++ b/crates/engine/src/demux.rs @@ -1367,8 +1367,8 @@ enum MkvEntry { /// /// **`LanguageBCP47` wins**, which is the spec's own precedence and not a /// preference: a modern file states its languages there and leaves the legacy -/// element out, so reading only the old one lost them. A -/// dual-language remux carries 37 `LanguageBCP47` elements against 33 legacy +/// element out, so reading only the old one lost them. One real 4K web remux +/// carries 37 `LanguageBCP47` elements against 33 legacy /// ones and every English track of it is BCP-47 only -- they all used to come in /// as `und` and export with no language at all. /// diff --git a/crates/engine/src/lib.rs b/crates/engine/src/lib.rs index 6f493b7..ba03bab 100644 --- a/crates/engine/src/lib.rs +++ b/crates/engine/src/lib.rs @@ -17,6 +17,7 @@ pub mod limiter; pub mod mux; pub mod playback; pub mod project; +pub mod real_library; pub mod scale; pub mod scratch; pub mod silence; diff --git a/crates/engine/src/real_library.rs b/crates/engine/src/real_library.rs new file mode 100644 index 0000000..8db8ee3 --- /dev/null +++ b/crates/engine/src/real_library.rs @@ -0,0 +1,89 @@ +//! Where the real films are, on the machine that has them. +//! +//! A handful of tests are worth nothing against a fixture: a 4K HDR10 grade, a +//! header-stripped BluRay remux, a disc's PGS tracks. None of those can live in +//! this repository -- they are tens of gigabytes of somebody's library -- and +//! their paths are nobody's business but that machine's, so they are not in the +//! tree either. `real_library.toml` at the workspace root maps a logical key to +//! an absolute path; it is gitignored, and `real_library.toml.example` shows the +//! shape. Without it every test that asks here says so and passes. +//! +//! The format is the `key = "path"` subset of TOML, one per line, `#` comments: +//! enough for a path table and no dependency to parse. + +use std::path::PathBuf; + +/// The manifest, beside the workspace `Cargo.toml`. +const MANIFEST: &str = concat!(env!("CARGO_MANIFEST_DIR"), "/../../real_library.toml"); + +/// The file `key` names, if this machine is one that has it. +/// +/// [`None`] -- with the reason on stderr, in the skip wording the rest of these +/// tests use -- when the manifest is absent, when it does not name the key, or +/// when what it names is not there. A test's whole gate is therefore one line: +/// +/// ```no_run +/// let Some(film) = engine::real_library::film("hevc_4k_hdr") else { +/// return; +/// }; +/// ``` +pub fn film(key: &str) -> Option { + let Ok(text) = std::fs::read_to_string(MANIFEST) else { + eprintln!( + "skipped: no real_library.toml at the workspace root (copy real_library.toml.example)" + ); + return None; + }; + let Some(path) = text.lines().find_map(|line| entry(line, key)) else { + eprintln!("skipped: real_library.toml does not name `{key}`"); + return None; + }; + let path = PathBuf::from(path); + if !path.exists() { + eprintln!("skipped: `{key}` is not on this machine"); + return None; + } + Some(path) +} + +/// One `key = "value"` line, if it is this key's: comments and blank lines +/// answer [`None`], and so does any line whose value is not quoted. +fn entry(line: &str, key: &str) -> Option { + let line = line.trim(); + if line.starts_with('#') { + return None; + } + let (name, value) = line.split_once('=')?; + if name.trim() != key { + return None; + } + let path = value.trim().strip_prefix('"')?.strip_suffix('"')?; + Some(path.to_string()) +} + +#[cfg(test)] +mod tests { + use super::entry; + + /// The parser, against the lines a hand-written manifest really holds: the + /// key it was asked for and no other, quotes off, whitespace either side of + /// the `=`, and a commented-out line is not an entry however much it looks + /// like one. + #[test] + fn a_manifest_line_answers_for_its_own_key_only() { + assert_eq!(entry(r#"k = "/a/b.mkv""#, "k").as_deref(), Some("/a/b.mkv")); + assert_eq!( + entry(r#" k="/a/b.mkv" "#, "k").as_deref(), + Some("/a/b.mkv") + ); + // A path with an `=` in it survives: only the first one splits. + assert_eq!( + entry(r#"k = "/a/b=c.mkv""#, "k").as_deref(), + Some("/a/b=c.mkv") + ); + assert_eq!(entry(r#"other = "/a/b.mkv""#, "k"), None); + assert_eq!(entry(r#"# k = "/a/b.mkv""#, "k"), None); + assert_eq!(entry("k = /a/b.mkv", "k"), None); + assert_eq!(entry("", "k"), None); + } +} diff --git a/crates/engine/src/tonemap.rs b/crates/engine/src/tonemap.rs index 4edec43..d7e8574 100644 --- a/crates/engine/src/tonemap.rs +++ b/crates/engine/src/tonemap.rs @@ -904,8 +904,8 @@ mod tests { } /// The paid debt: the film's own declared peak is what the reference - /// rendition converts at. 1759 cd/m^2 is a real number -- the MaxCLL of the - /// HDR10 grade of *a real film*, which the container never says + /// rendition converts at. 1759 cd/m^2 is a real number -- the MaxCLL of a + /// real HDR10 grade, which the container never says /// and the HEVC SEI does -- and every anchor moves with it, downward, /// because a peak this far above the 1000 an undeclared file is assumed at /// is *headroom*: the same code is a smaller fraction of a brighter peak. diff --git a/crates/engine/tests/audio_streams.rs b/crates/engine/tests/audio_streams.rs index 0f84933..429a646 100644 --- a/crates/engine/tests/audio_streams.rs +++ b/crates/engine/tests/audio_streams.rs @@ -240,14 +240,9 @@ fn flag_default_on_a_later_track_is_still_stream_0() { /// the second one has to play. Existence-gated -- it is not in the repo. #[test] fn a_real_dual_audio_remux_lists_both_tracks_and_plays_the_second() { - let path = PathBuf::from( - "/path/to/\ -a-real-h264-dual-audio-film.mkv", - ); - if !path.exists() { - eprintln!("skipped: {} is not on this machine", path.display()); + let Some(path) = engine::real_library::film("h264_dual_audio") else { return; - } + }; let streams = AudioSession::probe_streams(&path).expect("probes"); assert_eq!(streams.len(), 2, "two audio tracks: {streams:?}"); for (index, info) in streams.iter().enumerate() { diff --git a/crates/engine/tests/bitrate.rs b/crates/engine/tests/bitrate.rs index dfa47da..226b46b 100644 --- a/crates/engine/tests/bitrate.rs +++ b/crates/engine/tests/bitrate.rs @@ -217,7 +217,7 @@ fn the_mp4_rows_are_what_the_encoder_was_asked_for() { #[test] fn a_dual_audio_file_names_the_track_it_would_play_and_says_there_are_others() { - // `test_multiaudio.mp4` is the shape an AC-3 5.1 mp4 has: + // `test_multiaudio.mp4` is the shape a real dual-audio mp4 has: // an AAC stereo track and a fatter AC-3 one in the same file. Whichever the // bitrate row names, it names *one* of three, and the danger is calling a // 0.13 Mb/s stereo track "sound" on a file whose selling point is the AC-3. diff --git a/crates/engine/tests/export_color.rs b/crates/engine/tests/export_color.rs index 57fc949..05ee489 100644 --- a/crates/engine/tests/export_color.rs +++ b/crates/engine/tests/export_color.rs @@ -488,13 +488,10 @@ fn an_hdr_clip_is_tone_mapped_before_it_is_graded() { /// double-applied conversion produces, and both are one mean away. #[test] fn a_real_hdr_film_exports_as_a_picture() { - let film = Path::new( - "/path/to/a-real-4k-hdr10-film.mkv", - ); - if !film.exists() { - eprintln!("skipped: {} is not on this machine", film.display()); + let Some(film) = engine::real_library::film("hevc_4k_hdr") else { return; - } + }; + let film = film.as_path(); let mut session = PlaybackSession::open(film).expect("open the film"); assert_eq!(session.meta().color.transfer, Transfer::Pq, "an HDR10 film"); // What this film declares about itself, and therefore what the reference diff --git a/crates/engine/tests/hw_decode.rs b/crates/engine/tests/hw_decode.rs index 86c2d34..23405f3 100644 --- a/crates/engine/tests/hw_decode.rs +++ b/crates/engine/tests/hw_decode.rs @@ -234,13 +234,10 @@ fn range_stops_at_end() { fn the_hdr_film_renders_tone_mapped() { // Two minutes in: past the studio logos, inside lit footage. const TARGET: u32 = 3000; - let path = Path::new( - "/path/to/a-real-4k-hdr10-film.mkv", - ); - if !path.exists() { - eprintln!("skipped: {} is not on this machine", path.display()); + let Some(path) = engine::real_library::film("hevc_4k_hdr") else { return; - } + }; + let path = path.as_path(); // SAFETY: --test-threads=1. There is no software HEVC decoder, so a pinned // VE_SW from another test in this binary would refuse the file outright. unsafe { std::env::remove_var("VE_SW") }; diff --git a/crates/engine/tests/mkv_encodings.rs b/crates/engine/tests/mkv_encodings.rs index 3e8cbf9..3e201fa 100644 --- a/crates/engine/tests/mkv_encodings.rs +++ b/crates/engine/tests/mkv_encodings.rs @@ -393,13 +393,10 @@ fn what_cannot_be_undone_is_refused_by_name() { /// proves is a picture on the timeline and not a well-shaped byte string. #[test] fn the_stripped_bluray_remux_decodes_a_picture() { - let path = Path::new( - "/path/to/a-real-h264-dual-audio-film.mkv", - ); - if !path.exists() { - eprintln!("skipped: {} is not on this machine", path.display()); + let Some(path) = engine::real_library::film("h264_dual_audio") else { return; - } + }; + let path = path.as_path(); let mut session = engine::PlaybackSession::open(path).expect("open the remux"); assert_eq!(session.meta().codec, Codec::H264); let deadline = std::time::Instant::now() + std::time::Duration::from_secs(60); @@ -431,13 +428,10 @@ fn the_stripped_bluray_remux_decodes_a_picture() { /// `AudioSession`, which is what the timeline opens it with. #[test] fn the_laced_eac3_remux_decodes_sound() { - let path = Path::new( - "/path/to/a-real-4k-hdr10-film.mkv", - ); - if !path.exists() { - eprintln!("skipped: {} is not on this machine", path.display()); + let Some(path) = engine::real_library::film("hevc_4k_hdr") else { return; - } + }; + let path = path.as_path(); let (meta, rx) = engine::AudioSession::open(path) .expect("open the sound") .expect("the film has an E-AC-3 track"); diff --git a/crates/engine/tests/pgs_bitmaps.rs b/crates/engine/tests/pgs_bitmaps.rs index 8e63459..6fb20bc 100644 --- a/crates/engine/tests/pgs_bitmaps.rs +++ b/crates/engine/tests/pgs_bitmaps.rs @@ -2,8 +2,8 @@ //! the session lists the track, maps its cues onto the timeline and hands over //! the picture of one -- which is what the window draws over the film. //! -//! Gated on the film being there: it is a 4K remux in a local folder and no -//! fixture in this repository, so on a machine without it this says so and +//! Gated on the film being there: it is a 4K remux named by the local +//! `real_library.toml` and no fixture in this repository, so without it this says so and //! passes. What it guards is what a hand-made display set cannot -- that a real //! disc's blocks come whole out of the demuxer and decode, and that the map a //! repaint asks for is cheap enough to ask sixty times a second. @@ -12,19 +12,15 @@ //! cargo test -p engine --release --test pgs_bitmaps -- --nocapture //! ``` -use std::path::Path; use std::time::Instant; -/// A remux with `S_TEXT/UTF8` + 4x `S_HDMV/PGS`. -const FILM: &str = "/path/to/a-real-4k-pgs-film.mkv"; - #[test] fn the_session_maps_a_pgs_track_onto_the_timeline_and_draws_it() { - let film = Path::new(FILM); - if !film.exists() { - eprintln!("skipped: {FILM} is not on this machine"); + // A remux with `S_TEXT/UTF8` + 4x `S_HDMV/PGS`. + let Some(film) = engine::real_library::film("hevc_4k_pgs") else { return; - } + }; + let film = film.as_path(); let opened = Instant::now(); let mut session = engine::PlaybackSession::open(film).expect("the film opens"); session.set_gain(0.0); diff --git a/crates/engine/tests/subtitles.rs b/crates/engine/tests/subtitles.rs index 31d4cba..02a80c4 100644 --- a/crates/engine/tests/subtitles.rs +++ b/crates/engine/tests/subtitles.rs @@ -190,17 +190,13 @@ fn a_block_holding_the_erase_after_the_picture_still_draws_the_picture() { /// The film that reported the bug: four PGS tracks beside one `S_TEXT/UTF8` /// one, none of them refused any more. Skipped where the file is not -- it is -/// a 4K remux and lives in a local folder, not in this repository. +/// a 4K remux named by the local `real_library.toml`, not in this repository. #[test] fn the_remux_that_reported_the_bug_reads_all_five_of_its_tracks() { - let film = std::path::Path::new( - "/path/to/a-real-4k-pgs-film.mkv", - ); - if !film.exists() { - eprintln!("skipped: {} is not here", film.display()); + let Some(film) = engine::real_library::film("hevc_4k_pgs") else { return; - } - let tracks = subtitle::of_matroska(film).expect("the walk"); + }; + let tracks = subtitle::of_matroska(&film).expect("the walk"); assert_eq!(tracks.len(), 5); assert!( tracks.iter().all(|t| t.refused.is_none()), @@ -604,8 +600,8 @@ fn a_matroska_that_is_the_subtitles_alone_imports_like_any_other() { /// `LanguageBCP47` and no legacy `Language` element at all -- keeps that /// language, where it used to come in as `und`. /// -/// The shape of every English track of a dual-language remux and all four -/// of the 17-track library file ones: they read as `und` while the file said `en`, +/// The shape of every English track of one real 4K web remux and all four +/// of another film's: they read as `und` while the file said `en`, /// and the loss survived into the exported file's track list. #[test] fn a_track_that_states_its_language_the_modern_way_keeps_it() { diff --git a/real_library.toml.example b/real_library.toml.example new file mode 100644 index 0000000..306082b --- /dev/null +++ b/real_library.toml.example @@ -0,0 +1,20 @@ +# The films a few tests need and this repository cannot hold: tens of gigabytes +# each, and every one of them somebody's own library. Copy this file to +# `real_library.toml` beside it (gitignored) and put your own absolute paths in. +# Every test that asks for a key this file does not name, or names at a path that +# is not there, says so on stderr and passes. +# +# `key = "path"`, one per line, `#` comments. See `engine::real_library`. + +# 4K HDR10, HEVC Main 10 in Matroska, whose grade lives only in the bitstream +# (MaxCLL/MaxFALL in the HEVC SEI, four code points in the `Colour` element), +# with a fixed-laced 5.1 E-AC-3 track and BCP-47-only subtitle languages. +hevc_4k_hdr = "/path/to/a-4k-hdr10-web-remux.mkv" + +# A 720p dual-audio Blu-ray rip: H.264 with its video track header stripped, +# two AAC tracks, no colour tags anywhere in container or SPS. +h264_dual_audio = "/path/to/a-dual-audio-bluray-rip.mkv" + +# A 4K Blu-ray x265 remux carrying four PGS subtitle tracks beside one +# `S_TEXT/UTF8` one. +hevc_4k_pgs = "/path/to/a-4k-bluray-remux-with-pgs.mkv" diff --git a/scripts/gen_fixtures.sh b/scripts/gen_fixtures.sh index 7e2e18a..c8aaac1 100755 --- a/scripts/gen_fixtures.sh +++ b/scripts/gen_fixtures.sh @@ -223,8 +223,8 @@ ffmpeg -y -i crates/engine/tests/data/test_subs.srt \ -f matroska assets/test_subs.mks # ...and the same file stating its languages the way a modern muxer does: in # `LanguageBCP47` (0x22B59D) and *not* in the legacy `Language` (0x22B59C), -# which is the shape of every English track of a dual-language remux and -# `a 17-track library file`. ffmpeg writes only the legacy element (8.1.2 does not read +# which is the shape of every English track of two real Blu-ray-sourced films. +# ffmpeg writes only the legacy element (8.1.2 does not read # the BCP-47 one either), so the element is swapped in place afterwards: the # 4-byte id, then the length as a two-byte VINT (`40 02`, a legal non-minimal # encoding) so the tag is two bytes and the element stays the eight bytes it