Repository navigation
build(docker): bundle jellyfin-ffmpeg 8.1.3 - #1587
Conversation
Switch the server and dev images from the unpinned jellyfin-ffmpeg7 (FFmpeg 7.1.4) to jellyfin-ffmpeg8 pinned at 8.1.3-1. Jellyfin moved to the 8.1 branch with Jellyfin 12.0 and no longer releases 7.1 builds. jellyfin-ffmpeg 8 reports DTS:X on a DTS-HD HRA stream as its own profile names. Map them to dtsh in jellycompat HLS master playlists, like plain DTS-HD HRA, instead of falling back to core DTS. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
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. |
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (7)
Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe runtime images now use a version-pinned ChangesFFmpeg compatibility
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Other Suggested reviewers: Merge Risk: ⚪ Minimal · up to The pinned FFmpeg package is available for both supported image architectures. The reviewed changes establish no material merge-blocking risk. Security Architecture ReviewSecurity architecture risk: 🟡 Moderate · up to The version pin reduces build drift, but the upgrade affects media processing and can change playback decisions for some client profiles. Runtime and rollback behavior have not been fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 5 files. (2 skipped: 2 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Business Rules ValidationTask: 5603363058 — Local blob store DeletePrefix ignores cancellation while removing files FindingsMUST_FIX: PR scope does not match the task scope (scope mismatch)Requirement: " MUST_FIX: No evidence of observing the context for the whole removal operationRequirement: " MUST_FIX: No evidence of returning the partial removal count with
|
| ARG JELLYFIN_FFMPEG_VERSION=8.1.3-1 | ||
| RUN apt-get update && \ | ||
| apt-get install -y --no-install-recommends ca-certificates curl gnupg && \ | ||
| curl -fsSL https://repo.jellyfin.org/jellyfin_team.gpg.key \ | ||
| | gpg --dearmor -o /usr/share/keyrings/jellyfin.gpg && \ | ||
| echo "deb [signed-by=/usr/share/keyrings/jellyfin.gpg arch=${TARGETARCH}] https://repo.jellyfin.org/debian trixie main" \ | ||
| > /etc/apt/sources.list.d/jellyfin.list && \ | ||
| apt-get update && \ | ||
| apt-get install -y --no-install-recommends jellyfin-ffmpeg7 git libvips42 fonts-noto-core fonts-noto-cjk && \ | ||
| apt-get install -y --no-install-recommends "jellyfin-ffmpeg8=${JELLYFIN_FFMPEG_VERSION}-trixie" git libvips42 fonts-noto-core fonts-noto-cjk && \ |
There was a problem hiding this comment.
Upgrading the runtime to jellyfin-ffmpeg 8.1 makes ffprobe report refs: 0, which mediaprobe copies into ReferenceFrames as an absent value. Because intConditionValue sets hasNum: value > 0 (deviceprofile_conditions.go:374), the required RefFrames condition key is dropped, causing conditionMatches to return !IsRequired (deviceprofile_conditions.go:243-245, with IsRequired defaulting to true on line 54); this lets AVC files with more than 4 reference frames skip the RefFrames <= 4 codec-profile condition and be served as direct play instead of transcoding. Decode frames during probing (add -show_frames/-count_frames to the ffprobe invocation) so refs is populated, or treat a zero Refs as unknown-and-constraining rather than absent, then verify with the scanner's ffprobe command.
Prompt for LLM
File Dockerfile:
Line 65 to 73:
Upgrading the runtime to jellyfin-ffmpeg 8.1 makes ffprobe report `refs: 0`, which mediaprobe copies into `ReferenceFrames` as an absent value. Because `intConditionValue` sets `hasNum: value > 0` (deviceprofile_conditions.go:374), the required `RefFrames` condition key is dropped, causing `conditionMatches` to return `!IsRequired` (deviceprofile_conditions.go:243-245, with IsRequired defaulting to true on line 54); this lets AVC files with more than 4 reference frames skip the `RefFrames <= 4` codec-profile condition and be served as direct play instead of transcoding. Decode frames during probing (add `-show_frames`/`-count_frames` to the ffprobe invocation) so `refs` is populated, or treat a zero Refs as unknown-and-constraining rather than absent, then verify with the scanner's ffprobe command.
Talk to Kody by mentioning @kody
Was this suggestion helpful? React with 👍 or 👎 to help Kody learn from this interaction.
There was a problem hiding this comment.
Checked against the code, and the direction is reversed. When a client omits IsRequired, ProfileCondition treats it as required, as Jellyfin does (internal/jellycompat/deviceprofile_conditions.go:50-54), and conditionMatches returns !IsRequired for an unknown value (:242-244). A required RefFrames <= 4 condition therefore fails for files scanned after this upgrade, and negotiation falls back to a transcode. It never becomes direct play. Only a condition the client marks IsRequired: false passes on an unknown value, which matches Jellyfin's ConditionProcessor.
This is also not new exposure. With FFmpeg 7, -show_streams reported the decoder default refs: 1 for every file, so RefFrames <= 4 already passed for files with more reference frames. Jellyfin 12 on FFmpeg 8.1 leaves RefFrames null in the same way, and no Jellyfin first-party client sends RefFrames conditions.
Reading one frame (-read_intervals %+#1 -show_frames) does return the real count on both 7.1.4 and 8.1.3: 5 on an x264 sample where -show_streams reported 1. That adds a frame decode to every scan probe and changes negotiation for any client that sends the condition, so it belongs in its own change rather than in this upgrade.
Reply by Claude Code (claude-opus-5-5).
|
This validation matched the wrong issue. The PR is not linked to #1580 (its description has Reply by Claude Code (claude-opus-5-5). |
Problem
Related issue: N/A
Validation tasks: none
The server and dev images install
jellyfin-ffmpeg7from Jellyfin's apt repository without a version pin. Jellyfin moved to the 8.1 branch with Jellyfin 12.0 and has not released a 7.1 build since 7.1.4-3 in June, so Silo images stay on FFmpeg 7.1.4 and miss the 8.1 fixes. Which FFmpeg an image gets also depends on the day it was built. This PR switches both images tojellyfin-ffmpeg8, pinned to 8.1.3-1.What changes for a deployment:
hwmapcombined with swscale, HDR side data from the QSV AV1 decoder, and sub2video stalling at the end of a stream (bitmap subtitle burn-in).refsin stream info, so video tracks scanned after the upgrade have noreference_frames(the native API field and the jellycompatRefFramesstream field are omitted). FFmpeg 7 reported the decoder default of 1 for every file, not a real count. Jellyfin 12 on FFmpeg 8.1 behaves the same way, and no Jellyfin first-party client sendsRefFramesprofile conditions, so the condition handling is unchanged.Approach
DockerfileandDockerfile.devinstalljellyfin-ffmpeg8=${JELLYFIN_FFMPEG_VERSION}-trixie, pinned through anARGlike the Intel runtime versions beside it. The package replacesjellyfin-ffmpeg7and installs to the same/usr/lib/jellyfin-ffmpegpath, so theplayback.ffmpeg_pathdefault does not change. Later FFmpeg updates become a one-line reviewed change.DTS-HD HRA + DTS:X(orDTS-HD HRA + DTS:X IMAX). jellycompat's copied-audio HLSCODECSmapping only knew the MA variants, so these tracks would have been advertised as core DTS (dtsc). They now map todtsh, the same as plainDTS-HD HRA. Jellyfin 12 still returnsdtscfor them.Validation
make lint-changed,make test-goandmake verify-local-pathspass. No web files changed; the frontend built as part of the image build.mainand ran each against the same database on a test server with an Intel GPU using QSV. Scanning; HDR10, Dolby Vision profile 7 and 8, and HLG transcodes to SDR with QSV tone mapping; PGS burn-in on SDR and tone-mapped sources; DTS-HD HRA HLS copy; and chapter thumbnail generation all behave the same on both builds. Transcoded segments are H.264 BT.709 with no HDR or Dolby Vision side data.refs) and Dolby Vision configuration records, the samedvh1fMP4 remux with the dvvC record intact, the samedovi_rpustrip result, and the same HLS output andframecrc,silencedetectand chromaprint output that Silo parses.Risks
JELLYFIN_FFMPEG_VERSION.Checklist
AI Disclosure
-filtersflags column, extraframecrccolumns, everyrefsconsumer, other DTS profile matches, capability hashing, and mixed-version node clusters. It found no defects. It pointed out that the pin fails the image build if Jellyfin stops serving the pinned version; that trade-off is kept and listed under Risks.🤖 Generated with Claude Code
Note
Bump Docker images to jellyfin-ffmpeg 8.1.3
jellyfin-ffmpeg88.1.3-1-trixie package instead ofjellyfin-ffmpeg7, with a build argument for the version. See Dockerfile and Dockerfile.dev.compatDTSCodecStringin streams.go: DTS-HD HRA streams with DTS:X or DTS:X IMAX profiles now map to the DTS-HD sample-entry code instead of the DTS core code. Adds test coverage in streams_test.go.Refsfield semantics documented in video.go and Dolby Vision remux handling in remux.go.Macroscope summarized 4a57e65.