Repository navigation
Description
What happened
After the API server restarts during a Jellyfin-client HLS stream that copies video, the admin activity view reports the negotiated encode targets for that stream: a target resolution and a stream bitrate that ffmpeg never applies. Before the restart, the same session shows no target, and the view falls back to the source's resolution and bitrate.
Example: a Jellyfin client whose bitrate limit negotiates 720p / 3608 kbps gets an HLS remux. Video is copied at the source's resolution and bitrate. Once the server restarts and the next segment request rebuilds the session, the admin view shows 720p and 3608 kbps for that stream.
This was found in source review and confirmed with a focused test. It was not reproduced on a live deployment.
Steps to reproduce
Not reproduced live. The trigger, traced in source:
- A Jellyfin-compatible client starts HLS playback that copies video (remux), with a bitrate limit that makes negotiation fill
TargetResolutionandTargetBitrateKbps. - The jellycompat start path persists the recipe card with those negotiated targets. The card keeps them because they identify the negotiated stream.
- The API server restarts mid-stream.
- The next segment request rebuilds the playback session from the card (
LoadOrReconstructTranscodeWithError→reconstructSessionininternal/playback/transcode_manager.go). That code copiescard.TargetResolutionandcard.TargetBitrateKbpsonto the session whatevercard.TargetCodecVideois. Nothing on the segment path records the copy decision again. - The reconciler persists those values, and
enrichPlaybackSessionRowshowstarget_bitrate_kbpsas the stream bitrate because jellycompat sessions never setstream_bitrate_kbps.
A focused test on main (3f486c9) calls TranscodeManager.ReconstructSession with a recipe card built from TargetCodecVideo: "copy", TargetResolution: "720p", TargetBitrateKbps: 18808. It returns a session with TargetResolution "720p" and TargetBitrateKbps 18808.
Expected behavior
A session that copies video reports no encode target after a restart, the same as before it. The admin view should keep showing the source's resolution and bitrate for that stream.
Silo version / commit
main at 3f486c9
Deployment
Local dev build
Area
Jellyfin-compatible clients
Clients affected
- Web UI
- Android
- iOS/tvOS/macOS
- Jellyfin-compat client (Infuse, Findroid, ...)
- Other/not client-specific
Client app and device
Any Jellyfin-compatible client that gets an HLS remux under a bitrate limit.
Media and playback details
HLS with video copied (remux), audio copied or encoded, under a client bitrate limit.
Diagnostics report reference
None.
Relevant logs
No logs available.
Technical notes
- PR fix(jellycompat): report the actual transcode target resolution/bitrate to admin sessions #921 makes jellycompat record encode targets on the session, and clears them when video is copied (
recordTranscodeStreamDetails). The rebuild after a restart still restores them from the card, so the copy rule holds only until the server restarts. The same rebuild already happens onmain. - Possible fixes: apply the copy rule where
reconstructSessionderives the session fields, or record the stream details again after the jellycompat segment path rebuilds the session.reconstructSessionis shared with native playback, and native sessions also setStreamBitrateKbps, which the card does not carry. Check the native admin view after a restart before changing the shared path. - A fix at the shared boundary would overlap the copy check that fix(jellycompat): report the actual transcode target resolution/bitrate to admin sessions #921 adds, so it should follow that PR.
AI harness
Claude Code
AI tool(s)
Claude Code subagents (read-only review), Codex CLI
AI model(s)
claude-opus-5-5, gpt-6.1-sol
AI involvement
AI-assisted
Independent or adversarial review
Found while reviewing #921. Two read-only review agents flagged the restart path independently. A focused test on main confirmed the restored targets. A cross-provider review of the PR diff found nothing new.
Confirmations
- I searched open and recently closed issues and pull requests, and this is not already reported
- I reproduced this myself on a real deployment
- Any logs provided are raw apart from marked redactions and are not AI-summarized; if none were available, I said so above
Source: found in review of #921
Activity
Rhainland commentedon Nov 11, 2026
Reproduced on
origin/mainat 48748d9 on a local build. A Jellyfin client played a 1080p H.264 MKV under a 4 Mbps limit, which gives an HLS remux. I fetched a few segments, restarted the server and requested the next segment./api/v2/admin/sessionsthen showedtarget_resolution: "720p"for the copied stream. Before the restart it showed no target.Cause: the recipe card keeps the negotiated resolution and bitrate so the stream can be matched and rebuilt. When the session was rebuilt after a restart, those values were copied onto it even though the video is only copied.
Fix in #3982: a session rebuilt from a video-copy card no longer reports encode targets, so the admin view shows the same thing before and after a restart. Checked on a local build of the fix with the same steps and data: after the restart the remux reports no target, and an HLS encode still reports its 540p / 1233 kbps target. A test at the rebuild step covers both the copy and the encode case.
AI disclosure: reproduced and fixed by Claude Code (claude-opus-5-5) at the maintainer's direction.
fix(playback): stop reporting encode targets for copy sessions rebuil…