Skip to content

Outgoing MPEG-TS

The receiver on the other end is not a player: it looks for a service by its program number, for the tracks by their PIDs and for the service name in the SDT. Until those tables are the ones it expects, the signal does not exist for it, however correct the video inside may be.

All MPEG-TS outputs of one stream — HTTP output, SRT, destinations over UDP, SRT and RIST — are produced by one multiplexer. The Outgoing MPEG-TS section on the Egress tab sets its service tables; the same section on an individual destination overrides them for that destination alone.

The stream's tables

The section says so right in the panel: it applies to every MPEG-TS output of the stream until a push or SRT play overrides it. Empty fields show the defaults as hints.

Field What it sets Default
Program number (PNR) the PAT entry, program_number in the PMT and service_id in the SDT 1
PMT table PID the PID of the PMT table auto
Track PIDs explicit track PIDs: a "Track" + "PID" row per track auto
Service name (SDT) the service name in the SDT the stream name
Provider name (SDT) the provider name in the SDT empty
Transport stream ID transport_stream_id in the PAT and the SDT header 1
Original network ID original_network_id in the SDT header 1

The rules are checked on save, not on air:

  • PIDs are in the 32–8190 range: below that is reserved for service tables, above it for null packets;
  • duplicate PIDs inside the section are forbidden, including a track PID equal to the PMT table PID;
  • the program number is never zero — number zero in the PAT is reserved for the NIT;
  • the service and provider names together are limited so that the SDT fits into one TS packet.

A PID may be set for a track that is not there right now: it takes effect when the track appears. If an explicit PID collides with the automatically assigned PID of another track, the explicit one wins and the displaced track deterministically moves to a free PID — with a warning in the log.

The stream's outgoing MPEG-TS section

SDT

Along with the PAT and the PMT the output carries an SDT table (PID 0x11): one service of the digital television type, service_id equal to the program number, the service and provider names taken from the same section.

The strings are encoded per DVB: Latin goes as is, everything else as UTF-8 with the encoding declared, so Cyrillic names are read correctly by receivers.

When the settings change, the versions of the affected PAT/PMT/SDT tables are incremented and receivers pick the new ones up as they should. The edit is applied on the fly: delivery destinations and connected clients do not reconnect.

Own tables per destination

An individual destination has an Outgoing MPEG-TS override section with the same fields — this is the answer to a standard headend task, where the same signal is handed to different receivers under different numbers. It is available for:

  • a push over UDP, RTP, SRT or RIST — RTMP has no transport stream, so the section is absent there;
  • SRT serving from the stream's dedicated port.

Empty fields are inherited from the stream's section — the inherited values are visible as placeholders. A value set on the destination overrides the stream's one. The exception is Track PIDs: it is a single field, and a non-empty destination map replaces the stream's one entirely — there is no per-track merge.

HTTP MPEG-TS output and the server's shared SRT listener have no override: they always serve the stream's shared output.

An override on a delivery destination

Why this is cheap

No second multiplexer is started for a destination with its own tables. The destination receives a copy of the shared output in which only the service tables and the packet PIDs are rewritten: the packet layout in time, the PCR and the continuity counters of the shared multiplex are preserved.

Two practical consequences follow:

  • the CBR properties of the output hold for overridden destinations too — rewriting the tables does not break the constant bitrate;
  • destinations with identical effective settings share one byte-identical stream: a hundred identical destinations cost as much as one.

The table version of a rewritten output is kept from its own history of changes rather than copied from the shared output.

What next