Multiplexer¶
The multiplexer assembles an MPTS stream from the individual SPTS streams of the node and produces a complete 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 programs — in either of two ways:
from the program 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 program appears in the list with a pause icon; once its settings have been verified, it is taken off pause.
Repeat for all programs of the multiplex.
The members of a multiplex are ordinary SPTS streams: all processing (SPTS streams — filtering, modification, transcoding) 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 programs. The value 0 disables levelling — the aggregate bitrate simply follows 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).
Program parameters¶
Set on the muxer output of the source stream (names as in the interface); the program editor controls the composition, the order and 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 program 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 program (SD/HD, codec, radio); otherwise set manually.
The order of the programs in the multiplex tables is changed by dragging the rows in the program editor.
PID mapping¶
The PID mapping mode is selected with the “Automatic PID mapping” switch on the muxer input:
Enabled (default) — each program 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 program (the “PID” button in the program editor): the PMT PID and the target PIDs of the elementary streams; duplicates within a program are rejected by the editor. In this mode PID uniqueness across programs 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 program 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 program, 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 programs 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 programs, a table of programs 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 programs exceeds the target, the warning “Bitrate overload — source programs exceed the target mux rate” is displayed. An undersized multiplex drops program packets — audio and video dropouts and continuity errors at the receivers; under a prolonged overload PSI tables may be lost as well. Raise the target bitrate or reduce the bitrate of the programs (for example by transcoding the sources, Transcoders).
Conformance of the multiplex to TR 101 290 is monitored by the analyzer monitor (Per-program analysis).