Skip to content

jellycompat sessions show source resolution/bitrate instead of actual transcode target in admin panel #920

Closed

Description

@rangoDJ

Summary

The admin sessions panel (/api/v1/admin/sessions, backed by internal/api/handlers/playback_sessions.go) shows the wrong "Delivered" video resolution and a null target_bitrate_kbps for Jellyfin-compatible (jellycompat) playback sessions that are actually being transcoded and downscaled.

Root cause

// internal/api/handlers/playback_sessions.go:402-403
if row.VideoDecision == "transcode" && strings.TrimSpace(row.TargetResolution) == "" {
    row.TargetResolution = row.SourceVideoResolution
}

This falls back to the source resolution whenever target_resolution wasn't recorded. The native app's playback path (playback_v3.go) explicitly threads TargetResolution/TargetBitrateKbps into the telemetry/recipe-card recording, but the jellycompat playback path (internal/jellycompat/streams.go, ensureTranscodeSessionWithToneMapMode) never writes those fields into that same telemetry table — so the admin panel always shows the source's own resolution/bitrate for jellycompat sessions currently being transcoded, never the actual encode target.

Reproduction

  1. Deploy a build with fix(jellycompat): honor MaxStreamingBitrate cap in PlaybackInfo negotiation #912 (MaxStreamingBitrate cap fix).
  2. Play a high-bitrate 1080p source through a Jellyfin-compatible client (e.g. Jellyfin Android app) and pick a low quality profile (e.g. "360p - 420 Kbps").
  3. Confirm via server logs that the actual ffmpeg command is correctly capped and downscaled (e.g. -b:v 420k -maxrate 420k ... scale_vaapi=h=480).
  4. Open the admin sessions panel for that session — it shows Delivered: H.264 · 1080p and no target bitrate, even though the real encode is 480p/420kbps.

Impact

Cosmetic/observability only — the actual transcode behavior is correct. But it makes verifying playback quality decisions from the admin UI unreliable for any jellycompat-driven session (misleads support/debugging), and was likely already broken before #912 for any jellycompat resolution/bitrate-limiting scenario (tone-map bitrate selection, 4K-disallowed downscales, etc.) — #912 just made it newly visible since jellycompat downscaling wasn't previously exercised.

Suggested fix

Have the jellycompat transcode-start path (ensureTranscodeSessionWithToneMapMode / wherever it records stream details, see recordTranscodeStreamDetails) also populate target_resolution and target_bitrate_kbps in the same telemetry table the native playback_v3.go path writes to, so the admin panel reflects the actual encode target for jellycompat sessions too.

Found while testing #912.

Activity

  1. added
    bug
    triaged
    and removed
    triaged
    on Sep 20, 2026
  2. added theissue type on Sep 20, 2026
  3. removed
    bug
    on Sep 20, 2026
  4. added a commit that references this issue on Oct 26, 2026
    a5754e5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions