Repository navigation
Quality ceiling: judge every version on its video bitrate, as Media[0] is - #1423
Merged
GLinnik21 merged 2 commits intoNov 17, 2026
Merged
Conversation
…bitrate `MediaVersion::video_kbps` and `PlayingItem::video_kbps` hold the first video stream's own bitrate, 0 when the server sent none; `kbps` and `bitrate` stay the whole file's. The cached playing item takes it from the detail's video stream. The version field is serialized only when set, so recorded details round-trip unchanged. The test literals of `PlayingItem` in plx_media, plx_screens and the app gain the field. Signed-off-by: Filippo Scatigna <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
…] is `source_kbps` judges Media[0] against a rung on its video stream's bitrate, because the rung ships as `maxVideoBitrate`. A fetched version (picked by hand, or substituted for one the set cannot decode) was judged on its whole file instead, and so was every version on the facts row and in the URI preflight's quality check. All three now go through `ceiling_kbps`, the video bitrate with the whole file as fallback, and so does `src_measure`. Transport headroom, the URI request's source rate and `transport_kbps` keep the whole file. The `ResolveEnv::src_kbps` and `cur_transport_kbps` docs say so. Signed-off-by: Filippo Scatigna <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.
An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.
Collaborator
|
Thank you! This is a clean follow-up: one Generated by Claude Code |
nphil
added a commit
to nphil/Marquee
that referenced
this pull request
Nov 18, 2026
Play starts a version the TV can decode when the first one listed is one it cannot (a codec the set lacks, a resolution above it, or a Dolby Vision Profile 5 copy when the set shows none), instead of leaving the server to convert it. Forced Direct Play still tries the first copy. A substituted default and a version picked by hand are measured from the fetch that names them, and the quality limit judges every version on its own video bitrate, as the first copy always was. A retry that moves to another file keeps its audio and subtitle choice only while it stays on the same file. Ported from upstream 6131d5c (Default to a playback version the TV can decode (plxnative#1245)). Ported from upstream 301811e (Version choice: measure a version picked by hand from its own fetch (plxnative#1333)). Ported from upstream a056817 (Version choice: judge each version's Dolby Vision as the direct-play gate does (plxnative#1421)). Ported from upstream 3878e4f (Quality ceiling: judge every version on its video bitrate, as Media[0] is (plxnative#1423)).
nphil
added a commit
to nphil/Marquee
that referenced
this pull request
Nov 18, 2026
The resolution badge, facts row and HDR warning read the first version listed even when Play starts another one. They now read the file Play starts, with its own Dolby Vision, bitrate and audio. On a show page that is the episode Play starts (the one being resumed, else the first one shown), whose streams and versions come from its own full item; a card launch picks the same episode. Ported from upstream aa0407f (Detail: the facts row and the badge describe the version Play starts (plxnative#1379)). Ported from upstream a056817 (Version choice: judge each version's Dolby Vision as the direct-play gate does (plxnative#1421)). Ported from upstream 3878e4f (Quality ceiling: judge every version on its video bitrate, as Media[0] is (plxnative#1423)). Ported from upstream 247aa86 (Share the video facts of the file Play starts (plxnative#1457)).
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.
Follow-up 2 from #1245 (comment), as a separate PR. It follows the rule
plan::source_kbpsalready documents: a rung ships asmaxVideoBitrate, so the source is judged on its video stream's bitrate, with the whole file as the fallback.Before, only Media[0] on the Standard path got that rule:
src_kbpsfromPlayingItem::bitrate, the whole file.quality_allows_originalandsrc_measuretook the whole file for every version, Media[0] included.quality_policythe whole-filefile.kbps, for Media[0] too.For example, take a 1080p file with 7.9 Mbps of video and a 640 kbps track, under "1080p · 8 Mbps". As Media[0] it direct-played (7900 ≤ 8000), as a substituted version it was re-encoded (8540 > 8000), and the page said it converts in both cases.
MediaVersion::video_kbpsandPlayingItem::video_kbpshold the first video stream's bitrate, 0 when the server sent none.cached_playingtakes it fromDetail::video.plan::ceiling_kbps(video, whole)is the one rule, andsource_kbpsuses it. A fetched version'ssrc_kbps, the URI preflight's quality check andsrc_measure, and the preview'squality_policyinput go through it. Transport keeps the whole file, asPlayingItem::bitrate's doc says:source_transport_kbps, the URI request'ssource_kbps,transport_kbpsandpart_kbps.ResolveEnv::src_kbpsandcur_transport_kbpsdocs now describe that figure.MediaVersionis recorded insideDetail, so the field isserde(default, skip_serializing_if = "crate::metadata::is_zero"), nowpub(crate).Two commits:
each_version_and_the_playing_item_carry_their_own_video_bitrate. ThePlayingItemliterals in the tests of plx_media, plx_screens and the app takevideo_kbps: 0.decision_version_tests:a_fixed_quality_judges_the_substituted_version_on_its_video_bitrateanda_version_picked_by_hand_is_judged_on_its_video_bitrate, with a 4K version first and the 1080p file above second, anda_fixed_quality_qualifies_a_uri_original_on_its_video_bitrate. Preview testthe_preview_judges_a_quality_rung_on_the_video_bitrate_play_judges, for Media[0] and for a substituted version. With the whole-file figures back, all four fail.Based on
mainafter #1421, so it builds onMediaVersion::doviand the show page's on-deck versions from the episode's full read.Checks
On be90e05, WSL2 x86_64:
make check: clean in 497 s. Everytest result:line in the log is ok: 22472 passed, 0 failed, 239 ignored. Python: all 140 steps ok.tools/tv-lock.sh selftest: threerun_boundedcases found asleepPID still alive while other steps ran beside it. Alone it passed three times out of three, and this branch touches nothing undertools/.make check-nodef: clean.cargo check --lib --target armv7-unknown-linux-gnueabi -p plx_data -p plx_media -p plx_screens: clean.cargo check --tests --workspaceis clean and itsplx_datatests pass.pr-reviewer: three MINOR. The URI preflight still judged the whole file: fixed in be90e05, with its test. The show page's on-deck versions: covered by Version choice: judge each version's Dolby Vision as the direct-play gate does #1421, which this branch is based on. Two stale docs: fixed.doc-claim-auditor: theResolveEnv::src_kbpsandcur_transport_kbpsdocs, fixed.Not covered
🤖 Generated with Claude Code