Skip to content

MPEG-TS output

Sapsan muxes any stream into SPTS MPEG-TS and serves it over HTTP — convenient for set-top boxes, transcoders, and legacy systems.

Playback URL

http://server/streaming/mpegts/<stream>

What is produced

  • Correct PAT/PMT with continuous continuity counters; PIDs can be set explicitly, conflicting and reserved ones are reassigned automatically.
  • H264/HEVC video, AAC/AC3/EAC3 audio, track language descriptors, teletext (teletext descriptor with pages and languages).
  • JPEG screenshot tracks never enter the TS.

CBR

Sapsan can output a strictly constant bitrate — a requirement of professional receivers and modulators:

  • the target rate is derived from track bitrates (with ~5% growth headroom and a PSI budget);
  • sparse spots are filled with null packets (PID 0x1FFF);
  • PCR is placed from a drift-free global clock — PCR-to-DTS divergence does not accumulate even on hours-long looped content;
  • the decoder buffer model (HRD) is respected — overruns and underruns are tracked.

Note

TODO: how to enable CBR and set the bitrate in the config (currently the rate is derived from track bandwidth).

Sending over UDP

For sending MPEG-TS to multicast over UDP, see restreaming.

Next steps