The stream check refuses streams that parallel downloads could keep pace with #63

Closed
opened 2026-10-31 10:28:08 -04:00 by cmoriarty · 3 comments
Owner

What happens

verify.verify times the download of one segment on one connection. It refuses the stream when that takes longer than the segment's duration, with the reason "segment slower than real time" (backend/app/verify.py). The rule predates #56. A channel now downloads three segments at once (CHANNEL_FETCH_CONCURRENCY, three by default), so a stream at 1.2× real time per connection keeps pace easily, with about 1.6 s of download per 4 s of video. That's the per-connection-limited CDN #56 was built for. The check now refuses streams the channel could play.

Seen live

2026-10-31 14:24 UTC, Chelsea vs. Man Utd: the standby search refused topsurge.st with "segment slower than real time: 4.9s for a 4.0s segment". topsurge.st was the best stream of the game (1152×648 at 29.97 fps), and it had played on the same channel an hour earlier. On the card it was the "1 other" in "5 refused".

How often: this is the only refusal by this rule in the event log, which goes back to 2026-10-26: 229 checks, 458 refused links, one of them by speed. So it's rare, but when it fires it can refuse the best stream on offer.

The idea

Let the check accept a segment up to about twice real time when downloads run in parallel. The limit could follow the number of download slots with a margin, or simply be 2×. A segment slower than that still refuses.

What stays covered: a source that can't really keep up is still caught after it lands, for example one whose CDN answers parallel downloads with 429 and drops to one download at a time. The channel's own rules from #57 catch it: game skipped makes it Falling behind, and dry spells make it Stalling.

Optional: the check could download two segments at once, to catch a 429 before the stream is used rather than after.

Not part of this: the "no stream found" refusals. On this game givemestreams.cfd, buff-streams.buzz and resports.cfd refused that way on every check from noon on. That's a separate question: the hubs list hosts that don't carry the game, or a player our reader doesn't recognise.

## What happens `verify.verify` times the download of one segment on one connection. It refuses the stream when that takes longer than the segment's duration, with the reason "segment slower than real time" (`backend/app/verify.py`). The rule predates #56. A channel now downloads three segments at once (`CHANNEL_FETCH_CONCURRENCY`, three by default), so a stream at 1.2× real time per connection keeps pace easily, with about 1.6 s of download per 4 s of video. That's the per-connection-limited CDN #56 was built for. The check now refuses streams the channel could play. ## Seen live **2026-10-31 14:24 UTC, Chelsea vs. Man Utd:** the standby search refused topsurge.st with "segment slower than real time: 4.9s for a 4.0s segment". topsurge.st was the best stream of the game (1152×648 at 29.97 fps), and it had played on the same channel an hour earlier. On the card it was the "1 other" in "5 refused". **How often:** this is the only refusal by this rule in the event log, which goes back to 2026-10-26: 229 checks, 458 refused links, one of them by speed. So it's rare, but when it fires it can refuse the best stream on offer. ## The idea Let the check accept a segment up to about twice real time when downloads run in parallel. The limit could follow the number of download slots with a margin, or simply be 2×. A segment slower than that still refuses. **What stays covered:** a source that can't really keep up is still caught after it lands, for example one whose CDN answers parallel downloads with 429 and drops to one download at a time. The channel's own rules from #57 catch it: game skipped makes it Falling behind, and dry spells make it Stalling. **Optional:** the check could download two segments at once, to catch a 429 before the stream is used rather than after. **Not part of this:** the "no stream found" refusals. On this game givemestreams.cfd, buff-streams.buzz and resports.cfd refused that way on every check from noon on. That's a separate question: the hubs list hosts that don't carry the game, or a player our reader doesn't recognise.
Author
Owner

Decided 2026-10-31 (operator): the check doesn't assume parallel downloads work, because some CDNs refuse them (givemestreams.cfd answered 429 on Lakers vs. Warriors). It tests them first.

The test: download the newest segments at once, as many as the channel downloads at once (CHANNEL_FETCH_CONCURRENCY, three by default). The operator chose three over two so the test matches playback: a CDN that allows two but refuses three would otherwise pass the check and fail on landing.

  • If any download is refused: today's rule applies, so one download must beat real time. The stream is also marked one-at-a-time, so the channel starts that way rather than meeting the 429 after it lands.
  • If all arrive: the stream passes when they arrive together within their combined play time, with a margin.

The extra cost is two more segments per full check; the 150 s re-checks don't change.

**Decided 2026-10-31 (operator):** the check doesn't assume parallel downloads work, because some CDNs refuse them (givemestreams.cfd answered 429 on Lakers vs. Warriors). It tests them first. **The test:** download the newest segments at once, as many as the channel downloads at once (`CHANNEL_FETCH_CONCURRENCY`, three by default). The operator chose three over two so the test matches playback: a CDN that allows two but refuses three would otherwise pass the check and fail on landing. - **If any download is refused:** today's rule applies, so one download must beat real time. The stream is also marked one-at-a-time, so the channel starts that way rather than meeting the 429 after it lands. - **If all arrive:** the stream passes when they arrive together within their combined play time, with a margin. The extra cost is two more segments per full check; the 150 s re-checks don't change.
Author
Owner

Refined in the design (openspec/changes/parallel-pace-check): the parallel test runs only when it's needed.

  1. The newest segment downloads alone first, as today. If it beats real time, the check moves on and downloads nothing more. That's nearly every link: one refusal by speed in five days.
  2. Only if it's slower than real time: the newest segments are downloaded together, three as the operator chose. The link passes when none is refused and they all land within four fifths of their combined play time.
  3. A 429 or any other failure in the parallel test fails the link, with a reason saying the source refused parallel downloads. Such a source would be read one at a time, and its single download was already too slow.

So there's no need to mark a stream one-at-a-time. A fast stream keeps pace even after a 429 sends it to one download at a time, and a slow stream only passes if three at once worked.

**Refined in the design (`openspec/changes/parallel-pace-check`):** the parallel test runs only when it's needed. 1. **The newest segment downloads alone first, as today.** If it beats real time, the check moves on and downloads nothing more. That's nearly every link: one refusal by speed in five days. 2. **Only if it's slower than real time:** the newest segments are downloaded together, three as the operator chose. The link passes when none is refused and they all land within four fifths of their combined play time. 3. **A 429 or any other failure in the parallel test fails the link,** with a reason saying the source refused parallel downloads. Such a source would be read one at a time, and its single download was already too slow. So there's no need to mark a stream one-at-a-time. A fast stream keeps pace even after a 429 sends it to one download at a time, and a slow stream only passes if three at once worked.
Author
Owner

Closing: deployed 2026-10-31 17:44 UTC (PR #67, merged as 1938e97), with the design refined in the comment above.

Tests:

  • A per-connection-limited source (7.5 s for a 6 s segment alone) passes on three at once.
  • A per-address limit fails, with "even 3 at once: 22.5s for 18.0s".
  • A 429 on the parallel test fails, with "refused 3 downloads at once".
  • A fast segment downloads nothing more.

How to tell live: a pass by the parallel test isn't logged; the link simply verifies. A refusal by this rule now reads "even 3 at once" or "refused 3 downloads at once" in a check's history. Reopen if a stream that passed this way can't keep pace once it plays.

Closing: deployed 2026-10-31 17:44 UTC (PR #67, merged as 1938e97), with the design refined in the comment above. **Tests:** - A per-connection-limited source (7.5 s for a 6 s segment alone) passes on three at once. - A per-address limit fails, with "even 3 at once: 22.5s for 18.0s". - A 429 on the parallel test fails, with "refused 3 downloads at once". - A fast segment downloads nothing more. **How to tell live:** a pass by the parallel test isn't logged; the link simply verifies. A refusal by this rule now reads "even 3 at once" or "refused 3 downloads at once" in a check's history. Reopen if a stream that passed this way can't keep pace once it plays.
Sign in to join this conversation.
No labels
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
cmoriarty/sports-breaker#63
No description provided.