Repository navigation
Image subtitles: build the bundled FFmpeg with zlib so compressed Matroska subtitle tracks decode - #235
Merged
Conversation
Image subtitles never rendered in direct play: playback was fine, the track menu selection landed, and not one `image cue` was ever decoded. The bundled FFmpeg is configured with `--disable-autodetect`, which also dropped zlib, and libavformat's Matroska demuxer only inflates a track's ContentCompression when built with it. Without it the demuxer logs "Unsupported encoding type" and passes the packets through still compressed. mkvmerge zlib-compresses every PGS and VobSub track by default, so on nearly every disc remux pgssubdec was handed `78 da ...`, found no display set and produced nothing. The synthetic harness media never showed it because ffmpeg's own muxer writes those tracks uncompressed. `--enable-zlib` is named explicitly, so configure fails if the library is absent rather than quietly rebuilding the old behaviour. It links the system libz.so.1, present on every firmware inventory (zlib 1.2.7 to 1.3.1) and on macOS. The regression test loads the host build of the same FFmpeg and runs the app's own decode path over an mkvmerge fixture carrying compressed and uncompressed PGS and VobSub tracks plus a compressed SRT. It needs that FFmpeg, so it is #[ignore]d in `make check` and run by the new `make check-ffmpeg`, which the macOS simulator CI job now runs. The host FFmpeg rule now depends on ci/build-ffmpeg.sh, as the cross rule already did, so a flag change rebuilds it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
rust-modules/.cargo/config.toml sets [unstable] build-std for every nightly cargo invocation, so the host test build needs rust-src exactly as ci.yml's host checks do. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
#234, #235, #236, #237 and #239 passed on the television on a debug build of 3a30a01, each with the log lines behind it; #238 stays pending (it needs real playback), and #237's new focus-on-Sign-out finding is pending its own fix. Records the second pass's harness results and marks the 0.6.6 -> 0.7.0 in-place upgrade as blocked, with what unblocks it and what was observed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
ci/build-ffmpeg.sh: the firmware database fwsym holds spans platform releases 1.2.0 to 11.2.0, not webOS 3 to 10; libz.so.1 is in every image. docs/trailer-ux-plan.md: the deferred just_finished proposal names the preview machine's current transitions, Machine::eos and Machine::stopped, as docs/TODOS.md already does. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
#234, #235, #236, #237 and #239 passed on the television on a debug build of 3a30a01, each with the log lines behind it; #238 stays pending (it needs real playback), and #237's new focus-on-Sign-out finding is pending its own fix. Records the second pass's harness results and marks the 0.6.6 -> 0.7.0 in-place upgrade as blocked, with what unblocks it and what was observed. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
… in the audit #235 gave libavformat-plx a DT_NEEDED on libz.so.1, and nothing graded it: the libraries are dlopen'd, webosbrew-ipk-verify grades only the app and service executables, and fwcompat on a bundled library reported every firmware FAIL for the sibling libav*-plx names no firmware carries. tools/fwcompat.py --shipped DIR takes DT_NEEDED names that are files in DIR off the firmware's list and counts what they export as resolved. Watched: bare, libavformat-plx FAILs everywhere on its siblings; with --shipped pkg all three pass from 4.4.2 to 11.2.0; against a copy of the 4.4.2 database with libz removed it FAILs on libz.so.1 (4 symbols) and exits 1. CI's firmware load matrix and the build's fwcompat gate now run it over each bundled library; the build appends the matrix to pkg/ipk-verify.md, which gen-release-audit.py embeds, and gen-release-audit.py lists each bundled library's DT_NEEDED. Review finding on #241: the zlib verdict is now read from the published package instead of typed into the audit. Co-Authored-By: Claude Opus 5.5 <[email protected]>
GLinnik21
added a commit
that referenced
this pull request
Sep 25, 2026
…brary firmware gate (#241) * docs: correct two claims #235 and #239 left stale ci/build-ffmpeg.sh: the firmware database fwsym holds spans platform releases 1.2.0 to 11.2.0, not webOS 3 to 10; libz.so.1 is in every image. docs/trailer-ux-plan.md: the deferred just_finished proposal names the preview machine's current transitions, Machine::eos and Machine::stopped, as docs/TODOS.md already does. Co-Authored-By: Claude Opus 5.5 <[email protected]> * 0.7.0 release note and audit: cover #234-#240 The note gains the image-subtitle fix, the trailer stop/reporting/redirect behaviour, the art-crop, library-seat and profiles read-out fixes, and a line for nightly users about BACK from the player. The audit records the seven changes as host-verified and pending the device pass, the bundled FFmpeg's new libz.so.1 dependency with its firmware evidence, and the https HLS cross-origin redirect gap as a known follow-up. Co-Authored-By: Claude Opus 5.5 <[email protected]> * ci: the audit lint refuses an unfilled placeholder in the authored half Nothing substitutes into a release audit's authored half; gen-release-audit only replaces the generated block, so a __PLACEHOLDER__ left there publishes literally. Watched red on the v0.7.0 audit's __GATES__ row before it was filled; every existing audit and the template pass. Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: record the gates run on the release-prep tree Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: fold in the second device pass over #234-#240 #234, #235, #236, #237 and #239 passed on the television on a debug build of 3a30a01, each with the log lines behind it; #238 stays pending (it needs real playback), and #237's new focus-on-Sign-out finding is pending its own fix. Records the second pass's harness results and marks the 0.6.6 -> 0.7.0 in-place upgrade as blocked, with what unblocks it and what was observed. Co-Authored-By: Claude Opus 5.5 <[email protected]> * 0.7.0 release note and audit: #242 fixes the device pass's Sign-out focus finding The audit lists #242 among the changes landed after the device pass, host-verified and pending the device, and marks #237's focus-on-Sign-out finding fixed by it. The note's smaller fixes gain the menu-focus line. Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: the gate row names the tree rebased onto #242 Co-Authored-By: Claude Opus 5.5 <[email protected]> * 0.7.0 note and audit: scope the trailer and library promises, record the pass's account writes Review findings on #241: - A trailer started with Play Trailer is an ordinary playback (request_play, preview: false) and reports a timeline; only the background preview, full-screen mode included, never reports. - The library DOWN fix holds only when the reader has not moved before the shelves load. - The device-pass summary counts #236 as passed only for shelves-first. - The pass wrote to the Guest profile: the explicit PGS pick's PUT /library/parts selection, and the harness's unscrobble, progress seeds and playback timelines. - The gate row states that every commit after b99e79f is note/audit only and which checks were re-run on the head. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fwcompat: grade the bundled FFmpeg libraries, and put their DT_NEEDED in the audit #235 gave libavformat-plx a DT_NEEDED on libz.so.1, and nothing graded it: the libraries are dlopen'd, webosbrew-ipk-verify grades only the app and service executables, and fwcompat on a bundled library reported every firmware FAIL for the sibling libav*-plx names no firmware carries. tools/fwcompat.py --shipped DIR takes DT_NEEDED names that are files in DIR off the firmware's list and counts what they export as resolved. Watched: bare, libavformat-plx FAILs everywhere on its siblings; with --shipped pkg all three pass from 4.4.2 to 11.2.0; against a copy of the 4.4.2 database with libz removed it FAILs on libz.so.1 (4 symbols) and exits 1. CI's firmware load matrix and the build's fwcompat gate now run it over each bundled library; the build appends the matrix to pkg/ipk-verify.md, which gen-release-audit.py embeds, and gen-release-audit.py lists each bundled library's DT_NEEDED. Review finding on #241: the zlib verdict is now read from the published package instead of typed into the audit. Co-Authored-By: Claude Opus 5.5 <[email protected]> * v0.7.0 audit: the zlib entry defers to the generated half; the gate row names the tooling commits Co-Authored-By: Claude Opus 5.5 <[email protected]> * fwcompat review: row() takes its cells, and --shipped says what it trusts Co-Authored-By: Claude Opus 5.5 <[email protected]> * build-package: the bundled-library matrix goes into ipk-verify.md unfenced gen-release-audit.py already wraps that whole file in one code fence; a nested fence closed it. Only the step summary fences the aligned columns now. Co-Authored-By: Claude Opus 5.5 <[email protected]> --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Image subtitles (PGS, VobSub) never showed during direct play. Video played normally and picking a track from the menu worked, but no bitmap cue was ever decoded (
image cuenever appears in the log). Thesubtitle_image_pgsharness case has failed like this in the v0.6.0 and v0.7.0 audits. A field report then showed the same thing on a different library.Root cause
ci/build-ffmpeg.shconfigures the bundled FFmpeg with--disable-autodetect, and that flag also drops zlib. libavformat's Matroska demuxer only inflates a track's ContentCompression when it is built with zlib. Without it, the demuxer logsUnsupported encoding typeand passes the packets on still compressed. mkvmerge zlib-compresses every PGS and VobSub track by default, so for almost every disc remux the decoder received78 da …, found no display set, and returned nothing. The selection path (track menu →sub_render_ordinal→request_subtitle→desired_sub_idx→decode_bitmap_cue) was traced and is correct.The synthetic harness media never caught this because ffmpeg's own muxer writes these tracks uncompressed.
Fix
--enable-zlibin the shared configure line. It is named explicitly, so configure fails if zlib is missing instead of silently building the old behaviour. The only change to the shipped libraries:libavformat-plx.so.63gainsDT_NEEDED libz.so.1and imports four unversioned symbols (inflate,inflateInit_,inflateEnd,uncompress). All four are present in all 14 firmware inventories (zlib 1.2.7 to 1.3.1). The firmware-compatibility review passed: no VERNEED entry, andplxnative's own DT_NEEDED is unchanged.ci/build-ffmpeg.sh, as the cross rule already did, so a flag change rebuilds it.THIRD-PARTY-NOTICES.mdlists the television's zlib. The v0.7.0 audit records the root cause; the audited item's compression is inferred, not read.Consumers: the fix is in the demuxer, so it applies to every compressed Matroska track, not just one call site. The test covers PGS, VobSub and a compressed text (SRT) track, each against an uncompressed control. The demuxer's zlib support also enables compressed-
moovMP4 and compressed ID3 tags; those are newly supported, not changed.Tests (RED → GREEN)
New
ff_image_subtitle_tests.rsloads the host build of the same FFmpeg (same component list) and runs the app's own decode path (open_sub_decoder→decode_bitmap_cue→push_subtitle_bitmap) overtests/fixtures/mkv_zlib_subs.mkv(13 KB, made by mkvmerge).make checkhas no FFmpeg, so the test is#[ignore]d there and runs under the newmake check-ffmpeg, which the macOS simulator CI job now runs.--enable-zlib):Unsupported encoding type×3;left: [] right: [(0, 8000000000, 1)];test result: FAILED. 0 passed; 1 failedtest result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 4353 filtered outGates (on the committed tree)
make check(RUST_TEST_THREADS=4; on an overloaded host, the three unthrottled runs each hit a different unrelated loopback-fixtureWouldBlockflake, and each failing test passes alone):test result: ok. 4352 passed; 0 failed; 2 ignored; 0 measured; 0 filtered outtest result: ok. 4405 passed; 0 failed; 2 ignored; 0 measured; 0 filtered outtest result: ok. 101 passed; 0 failed; 0 ignored; 0 measured; 0 filtered outcargo +nightly check --lib --no-default-features: cleanmake(ARM cross-build, including the zlib-enabled FFmpeg): successorigin/main: approve, no findings. An earlier run against a stale localmainflaggedroute/plan.rssidecar selection, which this branch does not touch.Still pending
TV verification:
subtitle_image_pgsplus a mid-playback image-subtitle pick on an mkvmerge-muxed remux, expectingimage cue […]lines.🤖 Generated with Claude Code