edith
Clone
https://git.tahinli.com/Tahinli/edith.git
0 watching0 forksRust18.3 MiB33ae7d9Tahinli3 months ago699 commits
| 1 | #!/usr/bin/env bash |
| 2 | # Regenerates the gitignored test fixtures under assets/. |
| 3 | # Needs the ffmpeg CLI (dev tool only — the app itself never uses ffmpeg). |
| 4 | |
| 5 | |
| 6 | |
| 7 | |
| 8 | |
| 9 | |
| 10 | |
| 11 | # A/V fixture: video + stereo AAC. Left channel 440 Hz, right 880 Hz, so |
| 12 | # channel mapping mistakes are audible; 1 Hz volume pulse makes drift visible. |
| 13 | |
| 14 | |
| 15 | |
| 16 | |
| 17 | |
| 18 | |
| 19 | # Second A/V fixture for multi-file import: same properties as test_av.mp4 |
| 20 | # (1280x720@30 baseline, AAC-LC 44.1k stereo) but plainly different content — |
| 21 | # testsrc pattern, 4 s, an octave up (660/1320 Hz) with the same 1 Hz pulse. |
| 22 | |
| 23 | |
| 24 | |
| 25 | |
| 26 | |
| 27 | |
| 28 | # Multi-audio fixture: one video and three audio streams, so stream selection |
| 29 | # has something to select. Stream 0 is AAC 44.1k stereo (440 Hz left, 880 Hz |
| 30 | # right), stream 1 is AAC 22.05k mono 220 Hz tagged French — different rate, |
| 31 | # layout and content, so a test can tell which stream it was handed — and |
| 32 | # stream 2 is AC-3, the codec we cannot decode and must still list. |
| 33 | |
| 34 | |
| 35 | |
| 36 | |
| 37 | |
| 38 | |
| 39 | |
| 40 | |
| 41 | |
| 42 | |
| 43 | |
| 44 | |
| 45 | # Unsupported-audio fixture: an AC-3 track, which we cannot decode at all. The |
| 46 | # file plays as picture with silence, and the point is that it says so. |
| 47 | |
| 48 | |
| 49 | |
| 50 | |
| 51 | # The shape a BluRay remux has: 48 kHz 5.1 AC-3, which the decoder downmixes to |
| 52 | # stereo for the timeline. The mono fixture above is the other end of the same |
| 53 | # path — no downmix at all — and both have to work. |
| 54 | |
| 55 | |
| 56 | |
| 57 | |
| 58 | # Multi-language fixture: the shape real media has — one video and two AAC |
| 59 | # streams that *agree* on rate and layout (44.1k stereo) and differ only in |
| 60 | # language and content, 440/880 Hz undefined and 220/330 Hz French. One |
| 61 | # timeline means one set of audio parameters, so this is the file where the |
| 62 | # second stream can actually be put on the timeline; test_multiaudio.mp4 is the |
| 63 | # file where it cannot, and both cases have to be shown. |
| 64 | |
| 65 | |
| 66 | |
| 67 | |
| 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | |
| 73 | |
| 74 | |
| 75 | # VP9 fixture: the same A/V shape as test_av.mp4 (1280x720@30, AAC-LC 44.1k |
| 76 | # stereo) with a VP9 picture, so what the tests measure is the codec and |
| 77 | # nothing else. 2 s, because VP9 only ever decodes on the hardware path. |
| 78 | |
| 79 | |
| 80 | |
| 81 | |
| 82 | |
| 83 | |
| 84 | # The same VP9 stream in Matroska, which is where a yt-dlp download and every |
| 85 | # other VP9 file in the wild actually arrives: `V_VP9` used to fall through the |
| 86 | # mkv track dispatch and be refused by name while the mp4 twin above decoded. |
| 87 | # Opus audio because that is what a .webm carries -- the sound decodes here now |
| 88 | # (`ruopus`), and this is the webm cell of the Opus row in `capability_matrix`. |
| 89 | |
| 90 | |
| 91 | |
| 92 | |
| 93 | # ...and profile 2, 10-bit, which no container states: an mkv `TrackEntry` |
| 94 | # carries no configuration record for VP9 at all and the `vpcC` in an mp4 is |
| 95 | # optional, so the depth is read off the keyframe's uncompressed header |
| 96 | # (`demux::vp9_bit_depth`) -- the difference between a P010 surface pool and a |
| 97 | # picture of garbage. |
| 98 | |
| 99 | |
| 100 | |
| 101 | # One Matroska file per audio codec the refusal string in `audio.rs` claims is |
| 102 | # decodable, as five tracks of one file: FLAC, MP3, Vorbis, ALAC and PCM. The |
| 103 | # string said "AAC and AC-3 only" long after every one of these decoded, which is |
| 104 | # the shape of refusal this suite exists to stop (`tests/capability_matrix.rs`). |
| 105 | |
| 106 | |
| 107 | |
| 108 | |
| 109 | |
| 110 | |
| 111 | # ...and the codec that really is refused, so the other half of the refusal is |
| 112 | # testable too: DTS, which no decoder in this tree has (symphonia has none at any |
| 113 | # version and there is no pure-Rust one to reach for, unlike AC-3 and Opus). The |
| 114 | # notice must name *this* track and go on naming what would have worked. |
| 115 | |
| 116 | |
| 117 | |
| 118 | |
| 119 | # Two video tracks in one mp4, at different sizes so a test can tell which one |
| 120 | # the demuxer picked. `Mp4Reader::tracks()` is a HashMap and iterating it made |
| 121 | # "the video track" a different one from one run to the next; the pick comes out |
| 122 | # of `moov.traks` (file order) and this is what holds it there. |
| 123 | |
| 124 | |
| 125 | |
| 126 | |
| 127 | # HEVC fixture: the same A/V shape again, so the tests measure the codec and |
| 128 | # nothing else. 8-bit Main profile, because the plugin's NV12 read-back cannot |
| 129 | # carry Main 10. |
| 130 | |
| 131 | |
| 132 | |
| 133 | |
| 134 | |
| 135 | |
| 136 | # The same HEVC stream tagged hvc1, which is what Apple and ffmpeg's mov muxer |
| 137 | # write in practice: mp4 0.14 recognises only a hev1 sample entry, so this one |
| 138 | # is found by demux.rs reading the stsd fourcc itself (`tests/hevc_hvc1.rs`). |
| 139 | |
| 140 | |
| 141 | |
| 142 | |
| 143 | |
| 144 | |
| 145 | # AV1 fixture, and the only Matroska one: `mp4 0.14` has no `av01` sample entry |
| 146 | # at all, so AV1 is read out of an mkv (`demux::MkvDemuxer`). Same A/V shape as |
| 147 | # the others so the tests measure the codec and nothing else -- but `-g 30` is |
| 148 | # not a preference: it puts a second keyframe at frame 30, which is what the |
| 149 | # sync index and the seek test are checked against. 8-bit Main profile here; the |
| 150 | # 10-bit twin is below. Its AAC track is deliberate too: it is the AAC a Matroska |
| 151 | # file's sound is read out of through symphonia, beside the AC-3 fixtures further |
| 152 | # down that no symphonia version decodes. |
| 153 | |
| 154 | |
| 155 | |
| 156 | |
| 157 | |
| 158 | |
| 159 | # ...and an AV1 file that asks for film grain, which no other fixture here does. |
| 160 | # A frame with `apply_grain` set is *displayed* from a second surface the driver |
| 161 | # synthesizes the grain into, and a decoder that hands it none is refused the |
| 162 | # picture outright (radeonsi: VA_STATUS_ERROR_INVALID_SURFACE out of |
| 163 | # `vaEndPicture`) -- which is how AV1 decode died at frame 49 of a real film |
| 164 | # while every fixture above sailed through. Three seconds rather than two so the |
| 165 | # surface pool wraps several times, `noise` on the source because SVT-AV1 reads |
| 166 | # the grain parameters it signals *off the source* (a clean testsrc2 yields grain |
| 167 | # with no amplitude at all, measured), and `film-grain-denoise=1` so the coded |
| 168 | # picture is the smooth one and the grain is really the decoder's own work. |
| 169 | |
| 170 | |
| 171 | |
| 172 | |
| 173 | |
| 174 | |
| 175 | |
| 176 | # ...and the same file 10-bit, which is what an `av1C` with `high_bitdepth` set |
| 177 | # reads as and what the P010 surface pool is picked by -- the AV1 seat of the |
| 178 | # pair test_hevc.mkv/test_hevc10.mkv already make for HEVC. libaom rather than |
| 179 | # SVT-AV1 because it is the encoder that writes a 10-bit `av1C` here. |
| 180 | |
| 181 | |
| 182 | |
| 183 | |
| 184 | |
| 185 | |
| 186 | # H.264 in Matroska: the same stream the mp4 fixtures carry, in the container |
| 187 | # that used to refuse it. Baseline profile so `rusty_h264` reads it with nothing |
| 188 | # installed, `-g 30` for the second keyframe the sync index is checked against, |
| 189 | # and the AAC track for the sound an mkv's audio path reads back. |
| 190 | |
| 191 | |
| 192 | |
| 193 | |
| 194 | |
| 195 | |
| 196 | # Subtitles in Matroska: the two text codecs a film carries, muxed out of the |
| 197 | # hand-written files the tests also parse standalone |
| 198 | # (`crates/engine/tests/data/`), so the embedded cues and the external ones can |
| 199 | # be compared to each other and both to the source. Track 2 is S_TEXT/UTF8 and |
| 200 | # track 3 is S_TEXT/ASS -- the same three cues, one of them with markup, which |
| 201 | # is what makes "the markup is resolved, not carried" measurable. |
| 202 | # |
| 203 | # No bitmap track here: ffmpeg cannot encode text subtitles into pictures, so |
| 204 | # the PGS refusal is checked against a Matroska file the test writes itself |
| 205 | # (`crates/engine/tests/subtitles.rs`). |
| 206 | |
| 207 | |
| 208 | |
| 209 | |
| 210 | |
| 211 | |
| 212 | |
| 213 | |
| 214 | # The same two tracks with no picture and no sound at all: `.mks`, the Matroska |
| 215 | # extension that is the subtitles alone (what a subtitle release ships beside |
| 216 | # the film). Refused by name until the container gate learned every Matroska |
| 217 | # extension rather than the two that carry a film -- the very reader that walks |
| 218 | # a `.mkv` walks this. |
| 219 | |
| 220 | |
| 221 | |
| 222 | |
| 223 | |
| 224 | # ...and the same file stating its languages the way a modern muxer does: in |
| 225 | # `LanguageBCP47` (0x22B59D) and *not* in the legacy `Language` (0x22B59C), |
| 226 | # which is the shape of every English track of two real Blu-ray-sourced films. |
| 227 | # ffmpeg writes only the legacy element (8.1.2 does not read |
| 228 | # the BCP-47 one either), so the element is swapped in place afterwards: the |
| 229 | # 4-byte id, then the length as a two-byte VINT (`40 02`, a legal non-minimal |
| 230 | # encoding) so the tag is two bytes and the element stays the eight bytes it |
| 231 | # was -- every enclosing size in the file survives untouched. |
| 232 | |
| 233 | |
| 234 | |
| 235 | |
| 236 | |
| 237 | |
| 238 | |
| 239 | |
| 240 | |
| 241 | # HEVC in Matroska: the shape a film off a disc arrives in. Same A/V shape as |
| 242 | # test_hevc.mp4 so the tests measure the container and nothing else, `-g 30` for |
| 243 | # the same reason test_av1.mkv has it (a second keyframe to seek to), and the |
| 244 | # AAC track is read out of the mkv now rather than named as unsupported. |
| 245 | |
| 246 | |
| 247 | |
| 248 | |
| 249 | |
| 250 | |
| 251 | # ...and the same file in the shape the ask came from: HEVC **Main 10** with a |
| 252 | # 5.1 AAC track, which is a 4K BluRay remux in miniature. The picture decodes |
| 253 | # through a P010 surface pool and the sound is folded to stereo, so both halves |
| 254 | # of that file have a fixture. One tone per channel -- 440 FL, 880 FR, 220 FC, |
| 255 | # 60 LFE, 1320 BL, 1760 BR as written, whatever the encoder's own element order |
| 256 | # does with them -- so a test can say which channel reached which output. |
| 257 | |
| 258 | |
| 259 | |
| 260 | |
| 261 | |
| 262 | |
| 263 | |
| 264 | |
| 265 | |
| 266 | |
| 267 | # Matroska sound: the two Dolby codecs that arrive in one and are read straight |
| 268 | # out of its blocks (`demux::MkvAudio`). Stereo AC-3 for the plain syntax and |
| 269 | # **5.1 E-AC-3** for Annex E -- the shape a remux has, and the one that must |
| 270 | # come down to stereo through the same A/52 7.8 downmix the mp4 path uses. |
| 271 | # 48 kHz both, which is the only rate E-AC-3 is written at in practice. Small |
| 272 | # H.264 picture on purpose: these two are about the sound, and the software |
| 273 | # decoder reads that one, so an audio test needs no VA-API plugin to open a |
| 274 | # session on them. |
| 275 | |
| 276 | |
| 277 | |
| 278 | |
| 279 | |
| 280 | |
| 281 | |
| 282 | |
| 283 | |
| 284 | |
| 285 | # Dual audio in Matroska: the shape an anime remux has -- one picture and two |
| 286 | # AAC tracks that differ in language and content and *agree* on rate and layout |
| 287 | # (44.1k stereo), so either one can go on the same timeline. Stream 0 is |
| 288 | # 440/880 Hz English, stream 1 is 220/330 Hz French; the tones are what a test |
| 289 | # tells the two apart by, and getting the mapping wrong plays the other |
| 290 | # language. test_multilang.mp4 is this file's mp4 twin. |
| 291 | |
| 292 | |
| 293 | |
| 294 | |
| 295 | |
| 296 | |
| 297 | |
| 298 | |
| 299 | |
| 300 | |
| 301 | |
| 302 | |
| 303 | # Colour-tag fixtures. The picture is irrelevant here -- what is measured is |
| 304 | # what the file *says* its numbers mean (`engine::colorspace`), so these are |
| 305 | # one-second clips with nothing in them. |
| 306 | # |
| 307 | # First pair: SMPTE 170M (BT.601) tagged in the container, at 720 lines, where |
| 308 | # the resolution heuristic would have said BT.709. That is the point: it is the |
| 309 | # fixture that shows the container tags being read and outranking the guess. |
| 310 | # Both containers, because the `colr` box and the Matroska `Colour` element are |
| 311 | # parsed by different code. |
| 312 | for; do |
| 313 | |
| 314 | |
| 315 | |
| 316 | |
| 317 | done |
| 318 | # ...and the tier below it: BT.709 written into the *bitstream* by the encoder |
| 319 | # and nowhere else. Passing the codes through `-x264-params`/`-x265-params`/ |
| 320 | # `-svtav1-params` rather than through ffmpeg's stream tags leaves the muxer |
| 321 | # with nothing to write, so these files have no `colr` box at all -- checked by |
| 322 | # the test. 480 lines, so the heuristic would say BT.601 and a pass means the |
| 323 | # VUI (or AV1 `color_config`) was really read. The HEVC one asks for |
| 324 | # `scaling-lists=default` on purpose: a set of scaling lists sits between the |
| 325 | # SPS header and its VUI, and a walk that counts them wrongly reads the colour |
| 326 | # out of the middle of a coefficient. (x264 writes its quant matrices into the |
| 327 | # PPS instead, so the H.264 side of that is a synthetic SPS in the unit tests.) |
| 328 | |
| 329 | |
| 330 | |
| 331 | |
| 332 | |
| 333 | |
| 334 | |
| 335 | |
| 336 | |
| 337 | |
| 338 | |
| 339 | |
| 340 | # The HDR fixture, and the one place in this set where the *picture* is the |
| 341 | # point: four flat patches written straight into the planes by `geq`, so a test |
| 342 | # can name the code it feeds the tone map (`engine::tonemap`) and the code it |
| 343 | # expects back. Top left is BT.2408 diffuse white -- 203 cd/m^2 is PQ signal |
| 344 | # 0.584, limited-range code 144 -- top right the 1000 cd/m^2 the grade is |
| 345 | # mastered against (code 181), and the bottom half a saturated BT.2020 red, |
| 346 | # which is what a grey-washed render loses. H.264 rather than HEVC so the |
| 347 | # software decoder can read it on a machine with no VA-API plugin: the tone map |
| 348 | # is fed by the tags, not by the codec. `-qp 1` on flat patches is exact to the |
| 349 | # code, so the numbers a test names are the numbers that arrive; the tags go on |
| 350 | # through `setparams` rather than through the encoder's own `-colorspace`, |
| 351 | # because that one makes ffmpeg *convert* into BT.2020 and the patches would no |
| 352 | # longer be the codes written above. |
| 353 | |
| 354 | |
| 355 | |
| 356 | # The HDR *metadata* fixtures: the same grade written three ways, so the three |
| 357 | # places a film's real peak brightness can live each have a file with known |
| 358 | # numbers in it. MaxCLL 1000, MaxFALL 400, mastering display 1000 nits down to |
| 359 | # 0.005 (which is what x265's `L(10000000,50)` means: ten-thousandths of a nit). |
| 360 | # |
| 361 | # Two passes, and the second one is not optional: `-x265-params master-display` |
| 362 | # only writes the SEI messages *inside the bitstream*, and ffmpeg's muxers write |
| 363 | # a container's own MaxCLL/`mdcv` off stream side data, which exists only once a |
| 364 | # decode has extracted those SEIs. Remuxing with `-c copy` does not do it -- |
| 365 | # verified, the `Colour` element comes back out with the code points and nothing |
| 366 | # else. So: encode HEVC with the SEIs, then transcode into each container, which |
| 367 | # is also what leaves test_hdr_sei.mkv carrying the SEI tier *alone* (H.264 |
| 368 | # writes no such SEI, so the transcoded pair carry the container tier alone). |
| 369 | |
| 370 | |
| 371 | |
| 372 | |
| 373 | |
| 374 | |
| 375 | |
| 376 | |
| 377 | # ...and one whose declared peak is a number nothing assumes: the three above |
| 378 | # say 1000, which is exactly what a file that declared *nothing* is assumed at, |
| 379 | # so no picture made from them can show that the metadata was read. This one is |
| 380 | # mastered at 4000 (`L(40000000,50)`, MaxCLL 4000) over the same four patches |
| 381 | # `test_pq.mp4` carries -- ten-bit codes here, four times the eight-bit ones -- |
| 382 | # so a tone map told 4000 lands them visibly elsewhere than one told 1000. |
| 383 | # |
| 384 | # Same two passes for the same reason, and the H.264 second one is what makes it |
| 385 | # software-decodable: the render tests that read it must not need a VA-API |
| 386 | # plugin. `-qp 1` on flat patches so the codes arrive as written (measured: 144, |
| 387 | # 181 and 100 come back exactly). |
| 388 | bright_sei="" |
| 389 | |
| 390 | |
| 391 | |
| 392 | |
| 393 | |
| 394 | |
| 395 | |
| 396 | # Sync fixture: one flash and one beep, at the same instant. Black picture with |
| 397 | # a white frame from t=1.0 to t=1.1, silence with a 1 kHz tone over exactly that |
| 398 | # stretch — so a test can find each of them and say how far apart they came out. |
| 399 | # What it is for is *speed*: a re-timed clip that drifts puts the beep somewhere |
| 400 | # the flash is not, and nothing else in the fixture set has a mark to measure |
| 401 | # that against. Same 30 fps / 44.1k stereo shape as test_av.mp4, so it can share |
| 402 | # a timeline with the rest. |
| 403 | # The beep is silence-then-tone-then-silence rather than a gated tone: lavfi's |
| 404 | # `sine` comes out at an eighth of full scale, and a mark a test looks for has |
| 405 | # to be plainly louder than anything around it. |
| 406 | |
| 407 | |
| 408 | |
| 409 | |
| 410 | |
| 411 | |
| 412 | |
| 413 | # Mismatch fixture: different resolution and no audio track at all, so import |
| 414 | # has something concrete to refuse. |
| 415 | |
| 416 | |
| 417 | # Frame-rate fixture: test_av.mp4 in every respect a timeline is held to -- same |
| 418 | # codec, same profile, same 44.1k stereo AAC -- except that it runs at 25 fps, |
| 419 | # so a timeline of 30 fps clips has one at another rate to read through `Rate`. |
| 420 | |
| 421 | |
| 422 | |
| 423 | |
| 424 | |
| 425 | |
| 426 | # ...and the same again at 23.976 fps (24000/1001), the rate whose ratio to a |
| 427 | # 30 fps timeline does not terminate: what the frame mapping's rounding is |
| 428 | # actually tested against. |
| 429 | |
| 430 | |
| 431 | |
| 432 | |
| 433 | |
| 434 | |
| 435 | # Standalone audio fixtures: the same 440/880 Hz tone with the 1 Hz pulse the |
| 436 | # A/V fixture carries, at test_av.mp4's own 44.1k stereo -- so an imported song |
| 437 | # can share a timeline with the video clips and the peaks tests can reuse the |
| 438 | # dip pattern. One per container we claim to read. |
| 439 | tone="[0:a][1:a]join=inputs=2:channel_layout=stereo,volume='0.5+0.5*sin(2*PI*t)':eval=frame[a]" |
| 440 | for; do |
| 441 | case in |
| 442 | mp3) codec=(-c:a libmp3lame -b:a 128k) ;; |
| 443 | wav) codec=(-c:a pcm_s16le) ;; |
| 444 | flac) codec=(-c:a flac) ;; |
| 445 | ogg) codec=(-c:a libvorbis) ;; |
| 446 | # ALAC in mp4, and raw AAC in ADTS -- the two the mp4/AAC packet-copy |
| 447 | # path cannot claim: one is not AAC, the other is not in an mp4. |
| 448 | m4a) codec=(-c:a alac) ;; |
| 449 | aac) codec=(-c:a aac -b:a 128k -f adts) ;; |
| 450 | esac |
| 451 | |
| 452 | |
| 453 | |
| 454 | |
| 455 | done |
| 456 | # The two Opus fixtures, which cannot join the loop above: Opus decodes at 48 kHz |
| 457 | # and nothing else, so these are the 48k twins of the tone rather than 44.1k ones. |
| 458 | # First the standalone `.opus`, an Ogg file `crate::is_audio` now admits. |
| 459 | |
| 460 | |
| 461 | |
| 462 | |
| 463 | # ...and 5.1 Opus in an `.mka`, which is the shape a film soundtrack has: four |
| 464 | # Opus streams with the Vorbis channel mapping, folded to stereo on the way to |
| 465 | # the timeline. The tone sits in **FL and BR only**, both silent in between, so |
| 466 | # the fold's channel order is checkable without an FFT: done right, 440 Hz comes |
| 467 | # out left and 880 Hz right; read in the decoder's own Vorbis order (FL, FC, FR, |
| 468 | # BL, BR, LFE) instead of the film order the fold wants (FL, FR, FC, LFE, BL, BR), |
| 469 | # BR lands on the left with FL and the right channel comes out silent. |
| 470 | # `join` needs every output channel mapped and assigns them by *name*, not by |
| 471 | # input order: without the explicit `map=` the two tones land in FC and BR |
| 472 | # instead, and the fixture stops testing what its comment says. |
| 473 | |
| 474 | |
| 475 | |
| 476 | |
| 477 | |
| 478 | # ...and **7.1 Opus**, which is a large film's soundtrack in miniature: five |
| 479 | # Opus streams, three coupled, and the widest layout the fold has a table for. |
| 480 | # One frequency per channel, four of the eight carrying anything, so the whole |
| 481 | # downmix is checkable by picking those four out of the folded pair |
| 482 | # (`tests/audio_multi.rs`): 440 in FL is left only, 880 in FC is both sides at |
| 483 | # -3 dB, 1320 in the LFE must be *gone*, and 1760 in SR is right only. Get the |
| 484 | # Vorbis-to-film permutation wrong at this width and every one of those moves. |
| 485 | |
| 486 | |
| 487 | |
| 488 | |
| 489 | |
| 490 | |
| 491 | |
| 492 | # Still-image fixture: the source with a picture and no timeline in it. Two |
| 493 | # bands rather than one colour, so a test can tell top from bottom (a flipped |
| 494 | # decode) and red from blue (a swapped channel order); 640x360, which is 16:9 |
| 495 | # like the video fixtures, so a Fit onto 1280x720 covers the canvas with no |
| 496 | # bars and every pixel of the exported frame is the image. |
| 497 | |
| 498 | |
| 499 | |
| 500 | |
| 501 | # The refusal fixture: same tone at 48k, which one output device cannot mix |
| 502 | # with a 44.1k timeline. |
| 503 | |
| 504 | |
| 505 | |
| 506 | |
| 507 | # A file long enough to have a *cue table*, whose audio says where in it you |
| 508 | # are: a 30 s chirp from 200 Hz rising 160 Hz a second, so the frequency of any |
| 509 | # quarter second of it names the second it came from. That is what makes a seek |
| 510 | # landing measurable without a reference decode (`tests/audio_seek.rs`), and the |
| 511 | # length is the point -- symphonia's Matroska seek goes through the cues, and on |
| 512 | # a two-second fixture there are none to go wrong. Opus in an mkv because that |
| 513 | # is the film the desync was measured on, keyframes every five seconds because |
| 514 | # that is what writes a cue point per cluster. |
| 515 | |
| 516 | |
| 517 | |
| 518 | |
| 519 | # The lopsided container: 2 s of picture under 60 s of sound, which is what a |
| 520 | # still with a song over it or a botched remux looks like from the outside. The |
| 521 | # point is the *denominator* -- a file 60 s long whose video track is 2 s long |
| 522 | # reports thirty times its real byte rate if the bitrate row divides by the |
| 523 | # picture rather than by the file (`crates/engine/tests/bitrate.rs`). Nothing |
| 524 | # else here has this shape, which is exactly why it is here. |
| 525 | |
| 526 | |
| 527 | |
| 528 | |
| 529 |