The filler card shows what Sports Breaker is doing, in the brand and in the shape of the stream it covers #41

Closed
opened 2026-10-29 17:23:46 -04:00 by cmoriarty · 2 comments
Owner

Why

While a channel stalls or is still finding a stream, viewers see "Stream interrupted - reconnecting" in plain grey text on a dark card. That screen is Sports Breaker's own filler clip, not Emby's: backend/app/assets/filler.ts, made by backend/scripts/make_filler.py. It carries no brand and says nothing about what's happening or whether to wait.

What Changes

  • A branded card.
    • The mark and the Unbounded wordmark on the dark tile, in white and blue only: no amber or red, no all-caps.
    • The league, both teams' logos (the art routes) or their names, and the score and clock when the feed has them.
    • A plain headline, one line on what stopped and what the app is doing, and a progress bar with the step ("Link 4 of 9", "Standby ready").
    • A foot that says the game comes back here on its own.
  • Drawn live for the channel's state.
    • Three states: finding a stream on tune, switching to the standby, and looking for another stream when there is no standby.
    • Each card is re-rendered only when its message changes, and cached by message and shape.
  • In the shape of the stream it covers. Each card is encoded as a 4 s MPEG-TS segment matching the playing or about-to-play link: resolution, frame rate, and audio rate and channels. A media server then sees no change at the splice, which fixes the filler half of #39. When nothing is measured yet (a cold tune), the card uses the Ready link's measured shape, else a default.
  • No ticking seconds. Media servers play 10–20 s behind live, so the card says things that stay true for a while.

What we found (2026-10-29)

  • Encoding is fast. Turning a card PNG into a 4 s segment (libx264 ultrafast, -tune stillimage, silent AAC) on an Apple M3:

    Shape Time Size
    1280×720 at 30 fps, 48 kHz stereo 259 ms 339 KiB
    640×360 at 30 fps, 32 kHz mono 165 ms 140 KiB
    640×360 at 25 fps 147 ms 138 KiB
    1920×1080 at 30 fps 306 ms 657 KiB

    The VM that runs the app has 18 cores.

  • How the mockups were made. HTML with the frontend's own fonts (@fontsource-variable Unbounded and Archivo), rendered by Playwright at 1280×720. The layout is sized in vh, so it draws the same at any 16:9 shape. The source is below.

  • The renderer for the app is still open. Playwright is already in the image. Pillow would need TTF fonts, as art.py uses.

  • Open:

    • The app's game list carries no score. ESPN's scoreboard has it for feed games only, and the cups are hub-only today (#37).
    • Hub-only games without logos fall back to the teams' names.

Done when a channel that stalls, or is still finding a stream, shows the branded card with its real state in the shape of the stream it covers, and Emby keeps playing through the splice back to the game.

Mockups

Finding a stream on tune

Switching to the standby

Looking for another stream, no standby

The mockup card (HTML)
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Sports Breaker filler card</title>
<style>
  @font-face { font-family: "Unbounded"; font-weight: 200 900; src: url("unbounded-latin-wght-normal.woff2") format("woff2"); }
  @font-face { font-family: "Archivo"; font-weight: 100 900; src: url("archivo-latin-wght-normal.woff2") format("woff2"); }
  :root {
    --tile: #0f131a;
    --ink: #e8eaed;
    --muted: #8b95a3;
    --faint: #2a3340;
    --blue: #4ea1ff;
  }
  * { box-sizing: border-box; margin: 0; }
  html, body { width: 100%; height: 100%; }
  body {
    background:
      radial-gradient(ellipse 70% 60% at 50% 42%, #172231 0%, rgba(15, 19, 26, 0) 70%),
      var(--tile);
    color: var(--ink);
    font-family: "Archivo", sans-serif;
    overflow: hidden;
    position: relative;
  }
  /* Everything is sized in vh so the card draws the same at any 16:9 shape. */
  .brand { position: absolute; left: 5.6vh; top: 5.2vh; display: flex; align-items: center; gap: 1.6vh; }
  .brand svg { width: 4.6vh; height: 4.6vh; }
  .brand span { font-family: "Unbounded"; font-weight: 800; font-size: 3.1vh; letter-spacing: -0.03em; }
  .league { position: absolute; right: 5.6vh; top: 6vh; font-size: 2.6vh; color: var(--muted); }
  .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.4vh; padding-top: 2vh; }
  .match { display: flex; align-items: center; gap: 5vh; }
  .team { display: flex; flex-direction: column; align-items: center; gap: 1.4vh; width: 24vh; }
  .team img { width: 13vh; height: 13vh; object-fit: contain; filter: drop-shadow(0 0.6vh 1.4vh rgba(0, 0, 0, 0.45)); }
  .team span { font-size: 2.6vh; color: var(--muted); text-align: center; }
  .score { font-family: "Unbounded"; font-weight: 700; font-size: 7vh; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .score.vs { font-size: 3.4vh; font-weight: 500; color: var(--muted); }
  .clock { font-size: 2.4vh; color: var(--blue); text-align: center; margin-top: 0.6vh; font-variant-numeric: tabular-nums; }
  h1 { font-family: "Unbounded"; font-weight: 600; font-size: 4.6vh; letter-spacing: -0.02em; text-align: center; }
  .detail { font-size: 2.9vh; color: var(--muted); text-align: center; max-width: 120vh; line-height: 1.35; }
  .detail b { color: var(--ink); font-weight: 600; }
  .progress { width: 60vh; display: flex; flex-direction: column; gap: 1.2vh; }
  .bar { height: 0.7vh; border-radius: 0.35vh; background: var(--faint); overflow: hidden; }
  .bar i { display: block; height: 100%; background: var(--blue); border-radius: 0.35vh; }
  .steps { display: flex; justify-content: space-between; font-size: 2.3vh; color: var(--muted); font-variant-numeric: tabular-nums; }
  .foot { position: absolute; left: 0; right: 0; bottom: 5.6vh; display: flex; justify-content: center; align-items: center; gap: 1.2vh; font-size: 2.4vh; color: var(--muted); }
  .foot::before { content: ""; width: 1.1vh; height: 1.1vh; border-radius: 50%; background: var(--blue); }
</style>
</head>
<body>
  <div class="brand">
    <svg viewBox="0 0 32 32" aria-hidden="true">
      <g transform="translate(4 4) scale(0.75)">
        <polygon points="5,5 19.5,11.93 19.5,20.07 5,27" fill="#e8eaed" stroke="#e8eaed" stroke-width="2" stroke-linejoin="round"/>
        <circle cx="25.5" cy="16" r="3.6" fill="#4ea1ff"/>
      </g>
    </svg>
    <span>Sports Breaker</span>
  </div>
  <div class="league" id="league"></div>
  <div class="center">
    <div class="match">
      <div class="team"><img id="home-logo" alt=""><span id="home"></span></div>
      <div><div class="score" id="score"></div><div class="clock" id="clock"></div></div>
      <div class="team"><img id="away-logo" alt=""><span id="away"></span></div>
    </div>
    <h1 id="headline"></h1>
    <p class="detail" id="detail"></p>
    <div class="progress" id="progress"><div class="bar"><i id="fill"></i></div><div class="steps"><span id="step"></span><span id="elapsed"></span></div></div>
  </div>
  <div class="foot" id="foot"></div>
<script>
  const s = JSON.parse(decodeURIComponent(location.hash.slice(1)));
  const set = (id, v) => { document.getElementById(id).textContent = v ?? ""; };
  set("league", s.league); set("home", s.home); set("away", s.away);
  document.getElementById("home-logo").src = s.homeLogo;
  document.getElementById("away-logo").src = s.awayLogo;
  const score = document.getElementById("score");
  if (s.score) { score.textContent = s.score; } else { score.textContent = "vs"; score.classList.add("vs"); }
  set("clock", s.clock); set("headline", s.headline); set("foot", s.foot);
  document.getElementById("detail").innerHTML = s.detail;
  if (s.progress == null) { document.getElementById("progress").style.display = "none"; }
  else { document.getElementById("fill").style.width = `${s.progress * 100}%`; set("step", s.step); set("elapsed", s.elapsed); }
</script>
</body>
</html>

## Why While a channel stalls or is still finding a stream, viewers see "Stream interrupted - reconnecting" in plain grey text on a dark card. That screen is Sports Breaker's own filler clip, not Emby's: `backend/app/assets/filler.ts`, made by `backend/scripts/make_filler.py`. It carries no brand and says nothing about what's happening or whether to wait. ## What Changes - **A branded card.** - The mark and the Unbounded wordmark on the dark tile, in white and blue only: no amber or red, no all-caps. - The league, both teams' logos (the art routes) or their names, and the score and clock when the feed has them. - A plain headline, one line on what stopped and what the app is doing, and a progress bar with the step ("Link 4 of 9", "Standby ready"). - A foot that says the game comes back here on its own. - **Drawn live for the channel's state.** - Three states: finding a stream on tune, switching to the standby, and looking for another stream when there is no standby. - Each card is re-rendered only when its message changes, and cached by message and shape. - **In the shape of the stream it covers.** Each card is encoded as a 4 s MPEG-TS segment matching the playing or about-to-play link: resolution, frame rate, and audio rate and channels. A media server then sees no change at the splice, which fixes the filler half of #39. When nothing is measured yet (a cold tune), the card uses the Ready link's measured shape, else a default. - **No ticking seconds.** Media servers play 10–20 s behind live, so the card says things that stay true for a while. ## What we found (2026-10-29) - **Encoding is fast.** Turning a card PNG into a 4 s segment (libx264 `ultrafast`, `-tune stillimage`, silent AAC) on an Apple M3: | Shape | Time | Size | |---|---|---| | 1280×720 at 30 fps, 48 kHz stereo | 259 ms | 339 KiB | | 640×360 at 30 fps, 32 kHz mono | 165 ms | 140 KiB | | 640×360 at 25 fps | 147 ms | 138 KiB | | 1920×1080 at 30 fps | 306 ms | 657 KiB | The VM that runs the app has 18 cores. - **How the mockups were made.** HTML with the frontend's own fonts (`@fontsource-variable` Unbounded and Archivo), rendered by Playwright at 1280×720. The layout is sized in `vh`, so it draws the same at any 16:9 shape. The source is below. - **The renderer for the app is still open.** Playwright is already in the image. Pillow would need TTF fonts, as `art.py` uses. - **Open:** - The app's game list carries no score. ESPN's scoreboard has it for feed games only, and the cups are hub-only today (#37). - Hub-only games without logos fall back to the teams' names. **Done when** a channel that stalls, or is still finding a stream, shows the branded card with its real state in the shape of the stream it covers, and Emby keeps playing through the splice back to the game. ## Mockups ![Finding a stream on tune](https://forgejo.underthere.xyz/attachments/45bf1faf-9879-4524-80bd-953c49496d77) ![Switching to the standby](https://forgejo.underthere.xyz/attachments/0f6022f6-4ce6-41e9-bccd-36b4989c7de6) ![Looking for another stream, no standby](https://forgejo.underthere.xyz/attachments/b2408007-2090-4182-83d4-799b8675c484) <details><summary>The mockup card (HTML)</summary> ```html <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>Sports Breaker filler card</title> <style> @font-face { font-family: "Unbounded"; font-weight: 200 900; src: url("unbounded-latin-wght-normal.woff2") format("woff2"); } @font-face { font-family: "Archivo"; font-weight: 100 900; src: url("archivo-latin-wght-normal.woff2") format("woff2"); } :root { --tile: #0f131a; --ink: #e8eaed; --muted: #8b95a3; --faint: #2a3340; --blue: #4ea1ff; } * { box-sizing: border-box; margin: 0; } html, body { width: 100%; height: 100%; } body { background: radial-gradient(ellipse 70% 60% at 50% 42%, #172231 0%, rgba(15, 19, 26, 0) 70%), var(--tile); color: var(--ink); font-family: "Archivo", sans-serif; overflow: hidden; position: relative; } /* Everything is sized in vh so the card draws the same at any 16:9 shape. */ .brand { position: absolute; left: 5.6vh; top: 5.2vh; display: flex; align-items: center; gap: 1.6vh; } .brand svg { width: 4.6vh; height: 4.6vh; } .brand span { font-family: "Unbounded"; font-weight: 800; font-size: 3.1vh; letter-spacing: -0.03em; } .league { position: absolute; right: 5.6vh; top: 6vh; font-size: 2.6vh; color: var(--muted); } .center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3.4vh; padding-top: 2vh; } .match { display: flex; align-items: center; gap: 5vh; } .team { display: flex; flex-direction: column; align-items: center; gap: 1.4vh; width: 24vh; } .team img { width: 13vh; height: 13vh; object-fit: contain; filter: drop-shadow(0 0.6vh 1.4vh rgba(0, 0, 0, 0.45)); } .team span { font-size: 2.6vh; color: var(--muted); text-align: center; } .score { font-family: "Unbounded"; font-weight: 700; font-size: 7vh; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; } .score.vs { font-size: 3.4vh; font-weight: 500; color: var(--muted); } .clock { font-size: 2.4vh; color: var(--blue); text-align: center; margin-top: 0.6vh; font-variant-numeric: tabular-nums; } h1 { font-family: "Unbounded"; font-weight: 600; font-size: 4.6vh; letter-spacing: -0.02em; text-align: center; } .detail { font-size: 2.9vh; color: var(--muted); text-align: center; max-width: 120vh; line-height: 1.35; } .detail b { color: var(--ink); font-weight: 600; } .progress { width: 60vh; display: flex; flex-direction: column; gap: 1.2vh; } .bar { height: 0.7vh; border-radius: 0.35vh; background: var(--faint); overflow: hidden; } .bar i { display: block; height: 100%; background: var(--blue); border-radius: 0.35vh; } .steps { display: flex; justify-content: space-between; font-size: 2.3vh; color: var(--muted); font-variant-numeric: tabular-nums; } .foot { position: absolute; left: 0; right: 0; bottom: 5.6vh; display: flex; justify-content: center; align-items: center; gap: 1.2vh; font-size: 2.4vh; color: var(--muted); } .foot::before { content: ""; width: 1.1vh; height: 1.1vh; border-radius: 50%; background: var(--blue); } </style> </head> <body> <div class="brand"> <svg viewBox="0 0 32 32" aria-hidden="true"> <g transform="translate(4 4) scale(0.75)"> <polygon points="5,5 19.5,11.93 19.5,20.07 5,27" fill="#e8eaed" stroke="#e8eaed" stroke-width="2" stroke-linejoin="round"/> <circle cx="25.5" cy="16" r="3.6" fill="#4ea1ff"/> </g> </svg> <span>Sports Breaker</span> </div> <div class="league" id="league"></div> <div class="center"> <div class="match"> <div class="team"><img id="home-logo" alt=""><span id="home"></span></div> <div><div class="score" id="score"></div><div class="clock" id="clock"></div></div> <div class="team"><img id="away-logo" alt=""><span id="away"></span></div> </div> <h1 id="headline"></h1> <p class="detail" id="detail"></p> <div class="progress" id="progress"><div class="bar"><i id="fill"></i></div><div class="steps"><span id="step"></span><span id="elapsed"></span></div></div> </div> <div class="foot" id="foot"></div> <script> const s = JSON.parse(decodeURIComponent(location.hash.slice(1))); const set = (id, v) => { document.getElementById(id).textContent = v ?? ""; }; set("league", s.league); set("home", s.home); set("away", s.away); document.getElementById("home-logo").src = s.homeLogo; document.getElementById("away-logo").src = s.awayLogo; const score = document.getElementById("score"); if (s.score) { score.textContent = s.score; } else { score.textContent = "vs"; score.classList.add("vs"); } set("clock", s.clock); set("headline", s.headline); set("foot", s.foot); document.getElementById("detail").innerHTML = s.detail; if (s.progress == null) { document.getElementById("progress").style.display = "none"; } else { document.getElementById("fill").style.width = `${s.progress * 100}%`; set("step", s.step); set("elapsed", s.elapsed); } </script> </body> </html> ``` </details>
Author
Owner

Decided 2026-10-29 for the batch: Pillow with bundled fonts.

  • The card is drawn the way art.py draws the channel art, with the Unbounded and Archivo TTFs shipped in the app (both OFL). That keeps a browser out of the playback path.
  • The layout ports the mockup.
  • The score and clock come from #43.
**Decided 2026-10-29 for the batch: Pillow with bundled fonts.** - The card is drawn the way `art.py` draws the channel art, with the Unbounded and Archivo TTFs shipped in the app (both OFL). That keeps a browser out of the playback path. - The layout ports the mockup. - The score and clock come from #43.
Author
Owner

Closing: deployed 2026-10-29. The branded card is drawn live with Pillow, in the playing stream's size and H.264 settings. On 2026-10-30 at 18:51, Emby's VAAPI→QSV transcode crossed game → card → game (seq 40, 41, 42, Wizards vs. Hornets) without an error. Emby surviving a swap between streams of different shapes stays in #39.

Closing: deployed 2026-10-29. The branded card is drawn live with Pillow, in the playing stream's size and H.264 settings. On 2026-10-30 at 18:51, Emby's VAAPI→QSV transcode crossed game → card → game (seq 40, 41, 42, Wizards vs. Hornets) without an error. Emby surviving a swap between streams of different shapes stays in #39.
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#41
No description provided.