You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] jellycompat ignores MaxStreamingBitrate and resolution caps in PlaybackInfo, causing clients to direct play at native file bitrate #873
When connecting to Silo Server with a Jellyfin-compatible client (such as the native Jellyfin Android app or Findroid) and selecting a lower playback quality preset (e.g. 720p 4 Mbps or 1080p 10 Mbps) for a high-bitrate/4K media item, playback continues at the media file's native resolution and bitrate instead of downscaling/transcoding.
Steps to reproduce
Connect the Jellyfin Android app to a Silo Server instance.
Select and play a video item that has high bitrate (e.g., 4K or 1080p Remux at 20+ Mbps).
In the playback player settings, select a lower quality profile (e.g., 720p - 4 Mbps).
Observe that the stream continues to direct play the source file at native resolution and bitrate without downscaling or transcoding.
Expected behavior
Selecting a lower quality profile should instruct the server to transcode/downscale to the requested bitrate/resolution caps (e.g. MaxStreamingBitrate), rather than advertising SupportsDirectPlay: true and serving the full-bitrate static direct stream URL.
In internal/jellycompat/handlers_playback.go (buildPlaybackSource), SupportsDirectPlay is computed purely via container and codec matching (profile.SupportsDirectPlayForAudioStream).
In internal/jellycompat/deviceprofile.go and internal/jellycompat/deviceprofile_conditions.go, p.MaxStreamingBitrate and playbackInfoRequest.MaxStreamingBitrate are not compared against the source file's version.Bitrate or dimensions.
Consequently, mediaSourceDTO returns SupportsDirectPlay: true and a DirectStreamUrl pointing to /Videos/{id}/stream?static=true..., prompting the client to choose Direct Play.
In internal/jellycompat/streams.go (ensureTranscodeSessionWithToneMapMode), playback.TranscodeOpts is created without setting TargetResolution or TargetBitrateKbps from client query parameters (videoBitRate, maxWidth, maxHeight).
If the video codec matches the device profile, compatHLSCopiesVideo is set to true, forcing opts.TargetCodecVideo = "copy" (video stream remux) regardless of client bandwidth limits.
AI harness
none
AI tool(s)
none
AI model(s)
n/a
AI involvement
Human-written, AI-reviewed
Independent or adversarial review
n/a
Confirmations
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
Most of this is fixed on main now. Checked against 365e3d4:
PlaybackInfo compares the requested MaxStreamingBitrate (body, query, device profile and the account's server cap) with the version's bitrate. Over the cap, or with an unknown bitrate, direct play and direct stream are off and the response carries a TranscodingUrl (3313763).
One part is still open: a device profile's Width/Height limit, for example Width LessThanEqual 1280, never makes the transcode smaller. The output height comes only from the bitrate ladder, so with no bitrate cap or a high one, a required width condition rules the transcode out and the client gets no compatible stream. The "known width exceeds constraint" case in playback_output_conditions_test.go locks that in. videoBitRate, maxWidth and maxHeight on the HLS URL are ignored on purpose, since the limits are frozen at PlaybackInfo.
It might be worth narrowing the title to the width/height case.
Rechecked against current main: the remaining width/height case is fixed by #2987 (07b4df0).
A device profile's Width/Height limits now feed the encode target. compatFitResolution lowers the transcode height until the scaled frame fits both, so a required Width LessThanEqual 1280 no longer rules out the transcode when there is no bitrate cap or a high one. TestRoku1080pProfileEncodesWithinItsLimits covers it (a 4K source with a 1920-wide limit encodes at 1080p, a 3840x1608 scope source at 804p). The "known width exceeds constraint" case in playback_output_conditions_test.go now expects the transcode to be allowed.
Together with the bitrate-cap work listed above, that covers everything in this issue, so closing it as completed.
Activity
blurbery commentedon Oct 19, 2026
Most of this is fixed on main now. Checked against 365e3d4:
MaxStreamingBitrate(body, query, device profile and the account's server cap) with the version's bitrate. Over the cap, or with an unknown bitrate, direct play and direct stream are off and the response carries aTranscodingUrl(3313763).One part is still open: a device profile's
Width/Heightlimit, for exampleWidth LessThanEqual 1280, never makes the transcode smaller. The output height comes only from the bitrate ladder, so with no bitrate cap or a high one, a required width condition rules the transcode out and the client gets no compatible stream. The "known width exceeds constraint" case inplayback_output_conditions_test.golocks that in.videoBitRate,maxWidthandmaxHeighton the HLS URL are ignored on purpose, since the limits are frozen at PlaybackInfo.It might be worth narrowing the title to the width/height case.
rangoDJ commentedon Oct 26, 2026
Rechecked against current main: the remaining width/height case is fixed by #2987 (07b4df0).
A device profile's
Width/Heightlimits now feed the encode target.compatFitResolutionlowers the transcode height until the scaled frame fits both, so a requiredWidth LessThanEqual 1280no longer rules out the transcode when there is no bitrate cap or a high one.TestRoku1080pProfileEncodesWithinItsLimitscovers it (a 4K source with a 1920-wide limit encodes at 1080p, a 3840x1608 scope source at 804p). The "known width exceeds constraint" case inplayback_output_conditions_test.gonow expects the transcode to be allowed.Together with the bitrate-cap work listed above, that covers everything in this issue, so closing it as completed.