DVB receiver

Perfect Streamer works with the DVB adapters installed in the system: the DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C and ATSC standards are supported. T2-MI decapsulation (ETSI TS 102 773) and BISS-1 / BISS-E and CI/CAM descrambling are implemented on top of that. The main prerequisite is a correctly installed and working adapter driver; the “DVB adapters” screen (DVB adapters) is available once DVB devices are detected in the system. DVB-ASI devices are connected differently — through a file stream input pointing at the device path, without a DVB adapter record.

Adapters

An adapter is a record binding a physical tuner (the adapter/device pair in the system) to reception parameters; once the signal is locked, the adapter delivers the MPTS multiplex of the transponder. An adapter is added in the “Add DVB adapter” window (DVB adapter editor):

  • Mode: Stream — stream reception; Frontend monitor — signal monitoring only, without reading the stream (the legacy Scanner value is not used). The mode and the “Delivery system” are set at creation time and cannot be changed.

  • Hardware — the tuner is picked from the list of the tuners detected in the system; busy ones are marked.

  • Tuning parameters — depend on the delivery system: frequency (in MHz for satellite, in kHz for terrestrial and cable), “Symbol rate, ksym/s”, “FEC”, “Modulation”, “Spectral inversion”, “Stream id (ISI/PLP)” — the DVB-S2 multistream stream identifier or the DVB-T2 PLP at tuner level; for terrestrial reception — “Bandwidth”, “Transmission mode”, “Guard interval”, “Hierarchy”.

For satellite systems the “LNB” section is configured: the local oscillator frequencies (universal Ku — 9750/10600, switch at 11700 MHz; circular polarization and the C band have their own values), “Polarization” (the adapter controls the LNB supply: 18 V — horizontal, 13 V — vertical), “DiSEqC port” and “Force 22 kHz tone”.

“LNB sharing” disables the control of supply voltage, polarization and tone — they are set by another receiver that owns the LNB. The mode is used when several tuners are connected to one LNB through a splitter (only the polarization and band selected by the owner can be received), and also to spread different PLPs of the same transponder across separate adapters.

Descrambling keys and the CAM programme list are applied on the fly; changes to the tuning parameters re-tune the frontend. The “Export EPG” setting writes the programme guide of the multiplex into the node’s EPG database (EPG/XMLTV import).

Connecting to streams

The received multiplex is used in two ways:

  • as a whole — a dvb input on an MPTS stream: the entire transponder goes to pass-through or to remultiplexing (MPTS streams);

  • as individual programmes — a demultiplexer input on SPTS streams (Demultiplexer): the programme is selected by PNR from the list of discovered services.

The programme list of the adapter shows which programmes are already consumed: the “Active” mark with a qualifier — extracted as a single programme (SPTS) or read as part of the full multiplex (MPTS). As long as at least one stream references the adapter, it cannot be deleted.

Scanning

To avoid entering the reception parameters by hand, a transponder scanner is built in (the “DVB scan” window, DVB scan). The scanner walks the transponders of the selected satellite or regional band, locks each of them, collects the PSI/SI tables and builds a list of multiplexes with their programmes: PNR, service name, provider, the scrambling flag and the main PIDs. Any multiplex found is turned into a configured adapter with a single button; several of them may be selected and added at once.

Specifics:

  • the frequency source is “Catalog” (the satellite and regional band reference lists) or “Blind scan” over a synthesised frequency grid with an optional range and step;

  • for satellite an “LNB preset” is selected (universal Ku, circular polarization, C band) or custom local oscillator frequencies;

  • the scanner occupies the physical tuner exclusively — a tuner used neither by the system nor by other active records is required; a paused record releases its tuner, so a running adapter may be paused temporarily and scanned; free and busy tuners are shown in the list;

  • the scanner does not descend into T2-MI: the decapsulation parameters are set later, in the settings of the created adapter.

T2-MI decapsulation

T2-MI (T2-Modulator Interface, ETSI TS 102 773) is a format for carrying DVB-T2 streams over distribution links, normally satellite DVB-S/S2 (multistream included): the outer transponder carries one or several T2-MI carriers, each of which encapsulates BBFRAMEs with one or several PLPs. Decapsulation extracts the inner MPEG-TS with its programmes and PSI/SI tables.

Perfect Streamer operates in multi-carrier mode: a single adapter delivers the outer multiplex and all decapsulated T2-MI carriers at the same time. The settings (the “T2-MI” section):

“T2-MI mode”

Off — decapsulation is disabled, the outer stream is passed on as is (when T2-MI is detected in the multiplex, the node hints at it in the log); Manual — decapsulation is always enabled; Auto — the carriers are detected automatically from the PMT tables, and without them the adapter behaves as an ordinary multiplex.

«T2-MI PID»

Pre-creation of a carrier on a known PID before the tables arrive; the remaining carriers are still detected automatically.

«T2-MI PLP»

The PLP number extracted from every carrier; there is no per-carrier value — for different PLPs, separate adapters with LNB sharing are configured. If no BBFRAMEs with the specified PLP arrive, the node writes the list of observed PLPs to the log; the same list is shown in the adapter statistics. The “T2-MI TSID filter (−1 = any)” field is reserved.

The programmes of the inner multiplexes appear in the common programme list of the adapter marked with their PLP. To connect such a programme to an SPTS stream, a composite PNR is used — the carrier number × 65536 + the PNR inside it (Demultiplexer); carrier 0 is the outer multiplex. Service duplicates and test feeds inside the carriers are marked “[test]” automatically and do not affect the health check.

Descrambling

BISS. A software BISS-1 / BISS-E descrambler (the “BISS descrambling” section). Pairs of “slot — key” are defined; several descramblers may be active on one adapter:

  • slot — the programme number (PNR) in the outer multiplex: all PIDs of the programme are decrypted;

  • slot — the PLP of a T2-MI carrier: the key is applied to the whole carrier before decapsulation. This is mandatory for encrypted multistream streams — without the key the decapsulator discards every encrypted packet.

The key format is determined by its length: 12 hexadecimal digits — BISS-1 (the check bytes are computed automatically), 16 — BISS-E. Keys are applied on the fly, without restarting the adapter. Whether a key works is visible from the counters in the adapter statistics: a growing “descrambled” — the key works; a growing “key missing” — the key is not set, or is set at the wrong level; a growing “err” — the key is wrong.

CI/CAM. An adapter with a CAM module installed descrambles the selected programmes through the Common Interface (the “CI/CAM descrambling” section): the programme numbers are listed and the module decrypts them directly in the reception path. The list is applied on the fly and does not depend on the delivery system. The module state, the supported CA systems and the decryption status of every programme are shown in the adapter statistics and on the “Hardware” screen (Hardware); module removal, a missing subscription and CA errors raise alerts (Alert code catalog).

“Clean CA from descrambled output” (advanced setting) strips the CAS tables and messages from the already decrypted programmes — as does the stream filter “Delete CAT / ECM / EMM” (MPEG-TS filtering).

Signal monitoring

The adapter list shows the signal lock, strength, SNR, BER and input bitrate of every adapter. The adapter statistics window (Adapter statistics) shows the signal history (strength, SNR, BER, uncorrected blocks), the current frontend metrics, the programme list with media data, the counters of the T2-MI carriers and of the descramblers, the state of the CAM module and the log; the cumulative counters are cleared with the “Reset statistics” button. To monitor the antenna without reading the stream, the adapter is created in Frontend monitor mode.

Loss of lock, a drop of signal strength or quality, a rise of BER errors and of uncorrected blocks raise alerts with configurable thresholds (Alerts (alerter), the thresholds are in the alerter settings).

Reception buffer. “Demux buffer (blocks)” (advanced setting) sets the size of the reception ring buffer in blocks of 64 KB. The default value of 512 (32 MB) covers full-transponder DVB-S/S2 scenarios with several consumers; on lightly loaded or embedded systems it may be reduced. On buffer overflows (the counter is shown in the statistics, the message in the log) increase the buffer or reduce the volume of the received data — for example, give up reading the full multiplex if it is not needed. Take memory into account: every adapter reserves “blocks × 64 KB”.

Device access permissions

If the DVB adapters are not shown in Perfect Streamer while they are present in the system, grant the service the permissions on the DVB devices. Create the file /etc/udev/rules.d/99-dvb-permissions.rules with the line:

SUBSYSTEM=="dvb", GROUP="video", MODE="0660"

Then add the service user to the video group and apply the permissions:

sudo usermod -aG video pss
sudo chown -R root:video /dev/dvb/*
sudo systemctl restart pss

After a system reboot the udev rule sets the permissions automatically.