---
title: DVB receiver
url: https://doc2.pstreamer.tv/en/manual/streamer/dvb.html
lang: en
product: Perfect Streamer
version: 2.0.2.362
---

# 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](../webui/monitor.md#webui-dvb-monitor)) 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](../webui/monitor.md#webui-dvb-adapter)):

- **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)” (see below); for terrestrial reception — “Bandwidth”, “Transmission mode”, “Guard interval”, “Hierarchy”.

The hardware is mandatory in both modes — the frontend monitor also watches a particular tuner — and for DVB-S, DVB-S2 and DVB-C in Stream mode the frequency and the symbol rate are mandatory as well. The node declares these keys with a default value below its own lower bound and validates them when the adapter is created, so the default cannot be relied on: the creation and editing dialogs refuse to save the adapter until the values are set ([DVB adapter editor](../webui/monitor.md#webui-dvb-adapter)).

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”.

An adapter in Stream mode must be given the polarization explicitly: there is no automatic mode, none is selected by default, and with the polarization unselected the adapter does not tune — it stays in the error state and reports that the polarization has not been set. The adapter creation and editing windows do not allow a satellite adapter in Stream mode to be saved until horizontal or vertical has been chosen. It has to be chosen under “LNB sharing” as well: there the value has no effect, because the supply is controlled by the owner of the LNB, but without it the adapter will still not tune.

“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 — the number of each one is set in the “Stream id (ISI/PLP)” field.

“Stream id (ISI/PLP)” picks, at tuner level, one stream out of a multistream transponder: the ISI for DVB-S2 multistream, the PLP for DVB-T2. From 2.0.2.291 the field has three distinguishable states, and they are not synonyms:

**`-1`**
  “Auto” — no filter is applied, the tuner takes the driver’s default stream. That is what the hint under the field says; the field itself holds a number. A new adapter is created with this value.

**0**
  An explicit selection of stream number zero. This is a real filter, not “not set”.
**1 and up**
  The stream with the number given.

The interface accepts values from -1 to 255: a PLP number is eight bits wide, and this bound is a limit of the interface and the scanner, not of the node. Before 2.0.2.291 there was no “auto” value: zero was both the minimum and the default, and it meant “not set” — no filter was applied. After the node is upgraded, a saved zero becomes a real filter, so an adapter with 0 in its settings will start receiving only stream zero; if no filter is wanted, set -1. On a node older than 2.0.2.291 the interface does not offer “auto” and states in which version it appears; a -1 entered there is saved as 0.

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](epg/xmltv.md#streamer-epg-xmltv)).

## 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](mpts.md#streamer-mpts));
- **as individual programmes** — a demultiplexer input on SPTS streams ([Demultiplexer](demux.md#streamer-demux)): 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](../webui/monitor.md#webui-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. The catalogs run to hundreds of rows, so they are sorted by name and a search box sits above the list ([DVB scan](../webui/monitor.md#webui-dvb-scan));
- 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; busy tuners are shown in the list with the reason and cannot be selected;
- there is one scan per node — shared by all adapters. Starting a new pass ends the previous one and takes its place; the node refuses only when the previous pass has not released the tuner within the time allowed — the start is then repeated a few seconds later;
- a pass is ended with the “Stop” button; it also ends when the scan window is closed — by any means, including adding a multiplex that has been found. Stopping does not erase the results: the multiplexes found stay on screen until they are cleared with the “New scan” button or the window is closed;
- there is no need to wait for the pass to end in order to bring an adapter up on the same tuner: a configured adapter takes the tuner. Meeting the scanner, it asks the scanner to release the tuner; for one attempt the adapter goes into error with a device-busy message and comes up on the next one — about a second later. The scan then ends as cancelled, while its results remain available. The priority here is one-way: it is always the scan that is interrupted, even if it started first and has already been through most of the transponders. This concerns only adapters in Stream mode — Frontend monitor mode reads the tuner without occupying it and never meets the scanner;
- by default the scanner goes through a transponder once: on the PLP the catalog gives for it, or, if none is given, with no filter, on whichever one the tuner locked to. The “Probe PLP up to” field adds a sweep: the scanner additionally tunes to the PLPs from the first up to the number given and stops at the first one where there is nothing. Only DVB-T2 transponders are swept; every non-existent PLP costs about five seconds of waiting, so the sweep is off by default. Every PLP found becomes a separate row of results with its own program list, and its number is carried into the “Stream id (ISI/PLP)” of the adapter created. Separate rows on one frequency also appear without a sweep — where the catalog itself lists different PLPs;
- the scanner does not descend into T2-MI: the decapsulation parameters are set later, in the settings of the created adapter. The PLP sweep described above has nothing to do with T2-MI — those are PLPs at tuner level, one layer below the carriers.

## 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, in the “T2-MI carriers” section. The “T2-MI TSID filter (-1 = any)” field is reserved.

  This is a different PLP from the one in “Stream id (ISI/PLP)”: here the number is chosen inside the carrier, after decapsulation, whereas there it is chosen at tuner level, before it. The meaning of -1 differs too: for the TSID filter it is “any”, for “Stream id (ISI/PLP)” it is “auto”.

The programs of inner multiplexes appear in the adapter’s common program list with a PLP mark. To attach such a program to an SPTS stream the composite PNR is used — the carrier number × 65536 + the PNR within it ([Demultiplexer](demux.md#streamer-demux)); carrier 0 is the outer multiplex. Programs within one carrier that share the same set of media PIDs are treated by the node as mirrors of one another and marked “[test]” — every one of them, with no “real” one among them; test feeds recognised by name are marked the same way (English names of the “test card” and “feeds” kind are recognised). A marked program raises no alarms about its own state: a duplicate that, because of the shared PIDs, gets none of its own packets would otherwise look unverified. But the mark does not hide the program — it can be attached on equal terms with the rest, and in the program selector such rows come last.

## 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 slot is picked from the “Program / PLP” list: rows are marked `· BISS ·` for a program with a BISS ECM, `· CA ·` for the other encrypted ones, `· T2-MI ·` for carriers and `· clear ·` for clear programs — the clear ones come last. They are in the list on purpose: a key is often entered in advance, an event feed is in the clear between events, and on a multiplex without a single encrypted program the list would otherwise come up empty. The list is taken from a live snapshot of the adapter, so a new adapter and a stopped one do not have it — the field is then called “Slot id (PNR ≥ 0, or -(plp+1))” and the number is typed in by hand.

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](../webui/administration.md#webui-hardware)); module removal, a missing subscription and CA errors raise alerts ([Alert code catalog](../meshwork/alerts.md#meshwork-alert-codes)).

“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](spts.md#streamer-spts-filter)).

## Signal monitoring

The adapter list shows the signal lock, strength, SNR, BER and input bitrate of every adapter. The adapter statistics window ([Adapter statistics](../webui/monitor.md#webui-dvb-stats)) 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)](../meshwork/alerts.md#meshwork-alerts), 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:

```sh
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.
