Multiplexer¶
The multiplexer assembles an MPTS stream from the individual SPTS streams of the node and produces a DVB multiplex: it generates the PSI/SI tables, maintains an output schedule based on the T-STD model and levels the bitrate by inserting NULL packets. With a target bitrate configured, the output conforms to TR 101 290 and is suitable for feeding modulators and DVB distribution networks.
Assembling the multiplex¶
Create a stream of the MPTS type (New stream).
Add a muxer input to it — there is exactly one such input, and it holds the settings of the whole multiplex (see below).
Bind the programmes in one of two ways:
from the programme editor of the multiplex: the “Edit programs…” button on the muxer input, then “Add program” and selection of the source stream;
from the source side: add a muxer output to the SPTS stream and specify the target MPTS stream.
A new binding is created in the paused state — the programme appears in the list with a pause icon; once its settings have been verified, it is taken off pause.
Repeat for all programmes of the multiplex.
The members of a multiplex are ordinary SPTS streams, so all processing (filtering, modification, transcoding, SPTS streams) is performed on the source stream before assembly. A single SPTS stream may be delivered directly and be part of a multiplex at the same time.
Multiplex parameters¶
Set on the muxer input of the MPTS stream (names as in the interface):
- Transport stream id, Network id, Network name
The transport stream and network identifiers and the network name. They are carried into the generated PAT/SDT/NIT tables.
- Country code (ISO 3166 alpha-3)
The country code. Used in the TOT table (time zone, local time offset) and in the regional NIT descriptors.
- Output bitrate (kbps)
The target bitrate of the multiplex. It is set with a margin above the combined bitrate of all programmes. The value 0 disables levelling: the aggregate bitrate changes along with the input streams, with no NULL-packet stuffing and no T-STD model.
- SDT provider name
The provider name — common to all services of the multiplex (an additional setting).
Programme parameters¶
Set on the muxer output of the source stream (names as in the interface); the programme editor controls the composition, the order, the pause state and, when automatic PID mapping is disabled, the editing of PIDs:
- SDT service name (empty = stream name)
The service name in the SDT table; an empty value means that the name of the source stream is used.
- PNR (0 = stream id)
The programme number within the multiplex; 0 means that the identifier of the source stream is used.
- Logical channel number (0 = PNR)
The logical channel number (LCN) for receivers; 0 means it matches the PNR.
- Service type (0 = auto, ETSI)
The service type according to the ETSI classification: 0 — determined automatically from the composition of the programme (SD/HD, codec, radio); otherwise set manually. With automatic detection, H.264 counts as HD from level 3.1.
The order of the programmes in the multiplex tables is changed by dragging the rows in the programme editor.
PID mapping¶
The PID mapping mode is selected with the “Automatic PID mapping” switch on the muxer input:
Enabled (default) — each programme is assigned new PIDs from the automatic range; collisions are impossible.
Disabled — the original PIDs of the source streams are preserved. This is required, for example, when migrating an operating multiplex, so that receivers do not have to rescan. Individual PIDs can be changed where necessary in the PID editor of the programme (the “PID” button in the programme editor): the PMT PID and the target PIDs of the elementary streams; duplicates within a programme are rejected by the editor. A zero in the PMT PID field means “keep the source PMT PID”, and that PID itself is shown under the field; it takes part in the duplicate check on equal terms with the rest, so moving an elementary stream onto the PMT PID in force is likewise rejected by the editor. In this mode PID uniqueness across programmes is the responsibility of the operator — on a collision the node writes a warning to the log, but the multiplex keeps running. Reserved source PIDs (below 32) cannot be preserved — such elementary streams are assigned a new PID, with a warning in the log.
If a participating stream has automatic PID arrangement enabled (Automatic PID arrangement), the programme PID editor shows the identifiers it has already assigned rather than the original ones, and says so: remapping pairs entered before the arrangement was switched on no longer match, and such elementary streams get their PID automatically. The risky moment is therefore switching the arrangement on for a stream that is already part of the multiplex, not configuring it from scratch.
A change of mode is applied on the fly, without restarting the stream.
Table generation¶
The multiplexer builds its own PSI/SI tables: PAT, the PMT of each programme, SDT (the service and provider names), NIT (the network identifier and name, the service list, LCN) and TDT/TOT (time stamps). The CAT table is built when the programmes carry conditional-access system data.
The multiplexer does not generate EIT tables (the programme guide); it carries them over from the source streams — including an EIT generated at the source from an external EPG (EIT generator).
Multiplex monitoring¶
The state of the assembled multiplex is shown in the statistics window of the MPTS stream (Stream statistics): the output, target and input rates, the number of programmes, a table of programmes with the bitrate and state of each, the TS and network identifiers, and the state of the scheduler and of the stuffing.
If the combined bitrate of the programmes exceeds the target, the warning “Bitrate overload — source programs exceed the target mux rate” is displayed. A multiplex with an insufficient target bitrate loses programme packets: the receivers get audio and video dropouts and continuity errors; under a prolonged overload PSI tables may be lost as well. Raise the target bitrate or reduce the bitrate of the programmes (for example, by transcoding the sources, Transcoders).
Conformance of the multiplex to TR 101 290 is monitored by the analyser monitor (Per-programme analysis).