Playout Service: multi-channel + shared broadcast loop #11

Closed
opened 2026-07-12 05:49:08 +00:00 by GKaszewski · 0 comments
Owner

Parent

#2

What to build

Extend the Playout Service from single-channel to multi-channel. The service should manage concurrent playout for all active channels, each with its own FFmpeg pipeline, segment sliding window, and HLS endpoint.

The main loop: poll all channels with active schedules, start/stop playout pipelines as channels are created/deleted/enabled/disabled. Each channel gets its own endpoint namespace (e.g., /playout/:channel_id/).

The auto-scheduler self-healing (user story 20) should be verified here: the Worker's auto-scheduler ensures schedules always exist N days ahead, and the Playout Service reads them. If a schedule expires and gets regenerated, the playout transitions seamlessly.

Acceptance criteria

  • Playout Service manages N concurrent channel pipelines
  • New channels start playout automatically when they have an active schedule
  • Channels without active schedules don't get a playout pipeline
  • Each channel has its own HLS endpoint
  • Slot transitions across channels are independent
  • Schedule regeneration by the Worker is picked up by the Playout Service without restart
  • Configurable max concurrent channels via env
  • Graceful shutdown stops all FFmpeg processes

Blocked by

  • #9 (Playout Service core — single-channel must work first)
## Parent #2 ## What to build Extend the Playout Service from single-channel to multi-channel. The service should manage concurrent playout for all active channels, each with its own FFmpeg pipeline, segment sliding window, and HLS endpoint. The main loop: poll all channels with active schedules, start/stop playout pipelines as channels are created/deleted/enabled/disabled. Each channel gets its own endpoint namespace (e.g., `/playout/:channel_id/`). The auto-scheduler self-healing (user story 20) should be verified here: the Worker's auto-scheduler ensures schedules always exist N days ahead, and the Playout Service reads them. If a schedule expires and gets regenerated, the playout transitions seamlessly. ## Acceptance criteria - [ ] Playout Service manages N concurrent channel pipelines - [ ] New channels start playout automatically when they have an active schedule - [ ] Channels without active schedules don't get a playout pipeline - [ ] Each channel has its own HLS endpoint - [ ] Slot transitions across channels are independent - [ ] Schedule regeneration by the Worker is picked up by the Playout Service without restart - [ ] Configurable max concurrent channels via env - [ ] Graceful shutdown stops all FFmpeg processes ## Blocked by - #9 (Playout Service core — single-channel must work first)
GKaszewski added the ready-for-agent label 2026-07-12 05:49:08 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GKaszewski/k-tv#11