edith_codecs
Clone
0 watching0 forksRust370.3 MiB9b67700Tahinli3 days ago4021 commits
edith lane edithgaps1: report
Branch lane-edithgaps1 (worktree ~/.cache/wt/edith-edithgaps1), base codecs-integration at 466b849.
Commit 025ed7b ("✅ test(engine): ..."). Nothing pushed. The main edith checkout was not touched.
Status
Tasks 1 to 3 are done in code. Task 4 (Vorbis routing) was tried and backed out. The verify
requirement (cargo test -p engine green, clippy) is not met: the suite was run, but some
tests failed under heavy load, and I did not finish the run or get a clean baseline.
Changes (commit 025ed7b)
- Dead refusals (task 1).
engine/src/demux.rsCodec::needs_pluginnow returnsOption<String>and isSomeonly for AV1, the one codec export still refuses (its decoder is chunked, soPulledhas no seat). The HEVC, VP8, VP9 arms and the generic "there is no software {name} decoder" text are removed.export.rsAV1Nonearm: uses the AV1 text, else "{name} has no export seat" (unreachable in practice).decode.rshw_decodes: the plugin-missing branch now says "the VA-API plugin did not open this {name} stream" (its Err is discarded byprobe, so no user sees it).tests/playback.rsimport_refuses_what_does_not_match: the VP9Errarm usedCodec::Vp9.needs_plugin(); it is now apanic!(VP9 must join through its software seat). Comment updated.
- Gate 5 for ec-ass (task 2). New
crates/engine/tests/ass_subtitles.rs. It writes an.asswith two styles (Default,Sign) and override tags (\i,\b,\an8,\c,\pos,\N) in the test and drives it throughsubtitle::open(path, None)(the standalone-file call site,subtitle.rs:556/:608). It asserts the exact cue list (start/end us and resolved text) and that no style name or tag leaks into text. Both tests pass. - PGS strictness (task 3).
tests/pgs_bitmaps.rs: whenreal_library::film("hevc_4k_pgs")isNoneit printsSKIP pgs_bitmaps: ...and returns; withEC_REQUIRE_FIXTURES=1it panics instead. Note: cargo captures stderr of passing tests, so the SKIP line shows only under--nocapture. No ffmpeg PGS sample:ffmpeg -encodershas no PGS encoder (pgssubis decode-only, ffmpeg 8.1.3), so no generated PGS test was added. A.sup/PGS Matroska sample would need a hand-written encoder, andsubtitle::opendoes not read.supat all. - Vorbis decode (task 4). Edith decodes Vorbis with symphonia (
audio.rsTrack::decoder, the genericSymDecoder::Sym). I routed it toec-vorbis(aSymDecoder::Vorbisarm, with theextra_datasplit into ident (30 bytes) + setup and an empty comment header). Result:- Full decode of Ogg and Matroska Vorbis matched ffmpeg with correlation 1.000000 per channel, aligned at the start.
- But
ec-vorbisdoes not trim the final granule: the decoded Ogg ran 440 frames (2 s stereo file) and about 1640 frames (the audio_export fixture) longer than ffmpeg/symphonia. Two existing testsaudio_export::exports_the_timeline_as_an_ogg_vorbisand::a_mono_timeline_exports_as_dual_mono_oggfailed on length (266240 vs 264600; 45056 vs 44100). Symphonia matches exactly. - Decision: backed out (
audio.rs,caps.rsreverted). After the revert,audio_exportis 15/15. - Kept:
tests/audio_vorbis.rs, 3 tests (stereo Ogg, stereo Matroska, mono Ogg) comparing edith's decode to ffmpeg. They pass on symphonia, which matched ffmpeg's length exactly (gap 0 in the earlier experiment). The file header documents the backout. - Pre-existing seek fault, found while testing: a seek into an Ogg Vorbis file (
open_at(1.0)) yields samples 1025 frames off the full run's timeline (constant across seek targets 0.5 s and 1.0 s, correlation 1.000000 at shift -1025). It happens with symphonia as well as withec-vorbis, so it is in the shared seek/window path, not the decoder. Not fixed here; a follow-up for the audio owner. - ec-vorbis side (edith_codecs, not this lane): trim the final granule so the decode length matches the container, then route Vorbis.
Verify commands and results
Run through scripts/remote-run.sh edithgaps1 --with-edith from the edith_codecs checkout, with
EDITH_TREE=~/.cache/wt/edith-edithgaps1. Hosts were heavily loaded by other users (load average 15 to 60 on c,
up to 31 on a), which made the export-heavy tests time out.
cargo test -p engine --test ass_subtitles: 2 passed, 0 failed.cargo test -p engine --test audio_vorbis(ec-vorbis routed): 3 passed; after backout (symphonia): 3 passed.cargo test -p engine --test audio_exportafter backout: 15 passed.cargo test -p engine --test anamorphic(alone): 5 passed.cargo test -p engine --lib playback::tests::a_rate_undo(alone): 1 passed.cargo test -p engine --no-fail-fast, first run on host c (routing still in, before backout): failedaudio_exportVorbis x2 (the length regression above),anamorphic(120 s export limit under load), andplayback::tests::a_rate_undo_reseeks...anda_single_paused_tick_inside...("no frame within 20s").- Second full run on host c (after backout), partial, killed at load 60: failures recorded:
playback::tests::a_single_paused_tick_inside_the_dissolve_window_is_already_blended: "no frame within 20s of the seek". Not re-run alone at the time of writing.an_av1_export_reopens_through_our_own_demuxer(av1.rs:589): "export did not finish in limit" (900 s total).export_subs.rstestsa_cut_moves_the_cues_with_the_pictures,a_caption_past_the_last_picture_is_cut_off_with_the_file,a_lane_is_a_track_and_the_lanes_order_the_file,a_lane_of_pictures_is_refused_in_words_and_written_nowherereported FAILED. Their panic messages were not read (the run was killed before the failures section printed).
- Third full run on host a (detached, log
~/tmp/edithgaps1/fulla.logon a): still insideexport_subsafter about 60 minutes at load 20 to 31. Not finished; no final count.
Not verified:
- Whether the export_subs and playback/av1 failures are caused by this change or by load. The changed code paths
(AV1-only
needs_plugin, the AV1Nonearm in export) are not exercised by H.264/HEVC exports, so I believe they are load timeouts, but I did not prove it. A baseline run oncodecs-integrationis needed. cargo clippy -p engine -- -D warnings: not run. Baseline cleanliness unknown.rustfmt --checkon the edited pre-existing files reports drift that predates this lane; I formatted only the new files.
Not done / left
- Vorbis routing to
ec-vorbis(needs the ec-vorbis final-granule trim first, and the seek fault above). - Seek fault in
open_atfor Vorbis (1025 frames), shared by symphonia and ec-vorbis. - PGS end-to-end test without real_library (no ffmpeg PGS encoder).
- Stale comments that still say "no software decoder":
tests/hevc_export.rs:173andtests/export_color.rs:482. Left as-is (comments only). - Full suite to green on a quiet host, and clippy baseline.