1500 kbps
Four cameras share one link. In rgb mode a trigger (a rule firing on that camera, or the button on a tile) gives that camera most of the budget, forces a keyframe so the switch is immediate, and publishes the last 6 s in HD as a separate, lower-priority track paced out of the same budget, arriving behind the live stream. After the hold it rebalances. In even mode the budget is split equally, which is what a plain stream does. This is the demo that needs the transport to be MoQ.
HD pre-roll arriving behind the live stream:
link = session.link(cams, budget_bps=1_500_000, mode="rgb", share=0.8, hold_s=20)
@session.watch_all(alerts)
def on_event(e):
if link.prioritize(session.sources[e["camera_id"]], reason=e["rule"]):
session.spawn(hot.backfill(seconds=6, to_ts_us=e["event_ts"], link=link))