DVB adapters¶
Perfect Streamer supports any DVB adapter installed in the system. Supported standards: DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C, ATSC. Additionally implemented: T2-MI decapsulation (ETSI TS 102 773) and BISS-1 / BISS-E descrambling.
The main requirement is a correctly installed and working adapter driver in the system.
The DVB section appears only if the system has valid DVB adapters present. On-the-fly reconfiguration is not supported; a restart of the streamer is required.
Adapter connection¶
To add a new DVB adapter, go to the corresponding section and add the adapter:
Set the adapter name.
Select an adapter from the list of those available in the system.
Select Stream mode.
Specify the delivery system type: DVB-S, DVB-S2, DVB-T, DVB-T2, DVB-C.
Specify reception parameters: Carrier Frequency, Polarization, Symbol Rate, FEC, Modulation, DVB Stream ID, Heterodyne Frequency, High Band Heterodyne, High Band Range, DiSEqC 1.0 Mode and other parameters depending on the type.
Optionally, recording EIT into the EPG database can be enabled (Write EIT to EPG database).
Repeat the addition for each adapter present in the system.
DVB scanning¶
To avoid entering reception parameters (frequency, polarization, symbol rate, FEC, modulation) manually, Perfect Streamer includes a built-in transponder scanner. The scanner iterates over the transponders of the selected satellite (DVB-S/S2) or regional band (DVB-C, DVB-T/T2), tunes and locks each one, collects PSI/SI tables (PAT, PMT, SDT), and produces a final list of multiplexes with their programs. Any discovered multiplex can be added to the DVB adapter list with a single click.
The scanner uses the entire physical adapter; to start a scan, an adapter is required that is in use neither by the operating-system kernel nor by any active DVB adapter entry in Perfect Streamer.
Available adapters¶
When the scanning screen is opened in the admin panel, a list of the system’s physical DVB adapters is shown together with their occupancy status:
free — the adapter is available for scanning.
kernel — the device is held by another operating-system process.
pss-id-N — the adapter is already used by a DVB adapter entry in Perfect Streamer with the indicated identifier. The scanner cannot be started on it while that entry is active. To free the adapter temporarily, the existing DVB adapter entry must be paused (the Pause flag in its settings).
Transponder reference data¶
The scanner relies on Enigma2-format reference data: the satellite list satellites.xml and the regional lists cables.xml / terrestrial.xml. Each file contains a set of transponders for a known orbital position or a regional DVB-T/C band (for details, see the project site oe-alliance-tuxbox-common).
The files are located in the sat/ directory relative to pss.json (by default /etc/pss/sat/). They are shipped with the Perfect Streamer distribution and are loaded when the scanning screen is opened. They can be updated when needed by replacing the corresponding XML file.
In the admin panel the reference data is presented as three lists:
Satellite — orbital positions (for example, Hot Bird 13.0°E, Astra 19.2°E).
Cable region — country or DVB-C provider.
Terrestrial region — DVB-T/T2 region.
If the required satellite or region is not present in the reference data, the XML can be updated or blind scan can be used instead (see below).
Starting a scan¶
In the scan dialog the following are specified in order:
A free physical adapter.
Delivery system type: DVB-S, DVB-S2, DVB-T, DVB-T2 or DVB-C.
Source:
for DVB-S/S2 — an orbital position from the satellite list and LNB parameters (local-oscillator frequencies LO1 and LO2, upper-band threshold, DiSEqC port);
for DVB-C — a cable region;
for DVB-T/T2 — a terrestrial region.
After Start is pressed, the scan runs in the background. Progress is displayed in the admin panel:
the completion percentage based on the number of transponders processed;
the current frequency and polarization;
the Multiplexes found and Programs found counters;
a tree of the multiplexes found so far, expandable down to the programs.
The scanner is a resource shared across the entire streamer: no more than one scan runs at a time. If a new scan is started while another is in progress, the previous one is automatically cancelled. The Cancel button aborts the scan and clears the accumulated list.
The scan duration depends on the number of transponders in the selected reference data (typically up to 5 seconds per transponder: up to 2 seconds to lock the signal and up to 5 seconds to collect the PSI). Typical values:
DVB-S Hot Bird 13.0°E — about 2 minutes (44 transponders).
DVB-S Astra 19.2°E — about 1.5 minutes.
DVB-T European region — less than a minute.
Result¶
The scan result is displayed as a multiplex → programs tree.
Multiplex parameters:
frequency, polarization, symbol rate;
FEC, modulation, delivery system;
transport-stream identifier (TSID);
the frontend readings at the moment PSI collection finishes — SNR, Signal, BER;
the pmt-total / pmt-recv counters — how many PMT tables were announced by the PAT and how many were actually collected within the timeout.
Service parameters:
PNR (program_number) — the service identifier within the multiplex;
Name and Provider — taken from the SDT table, in UTF-8;
scrambled — the scrambling indicator. Its source is determined in the following order: the
free_CA_modebit from SDT (the broadcaster’s declaration) → the transport-scrambling flags from PMT. If neither SDT nor PMT arrives within the timeout, the default value is 0 (“not scrambled”); the actual state is determined when reception is attempted;video-pid, audio-pid, pcr-pid — the main elementary streams of the service.
Applying the result¶
The multiplex selected in the tree is added to the DVB adapter list with a single button. A new entry is created with parameters taken from the scan result (frequency, polarization, symbol rate, FEC, modulation, delivery system) along with the LNB parameters and the adapter/device pair specified at the start of the scan. The adapter name is set by the user; additional parameters (BISS keys for scrambled channels, T2-MI, shared LNB, etc.) are filled in once the entry is created, via its settings.
Programs from the discovered multiplexes are applied separately — by creating a stream (Stream) with a demuxer input source addressed by PNR (see the section Connecting an SPTS stream to a DVB multiplex service).
Blind scan¶
Blind mode is used when:
the required satellite is not in the reference data (a non-standard orbital position, a local uplink);
the regional DVB-T/C reference data is insufficient or is outdated for a specific location;
a band segment needs to be rechecked independently of the list of known transponders.
In this mode the scanner does not consult the reference data; it synthesises a list of transponders from a frequency grid. By default the following typical ranges are used:
DVB-S/S2 Ku — 10700..12750 MHz, 4 MHz step, both polarizations (H and V), typical symbol rates 22000 / 27500 / 30000 ksym/s.
DVB-C — 47000..862000 kHz, 8000 kHz step, QAM-64 and QAM-256, typical symbol rates 6875 / 6900 / 6952 ksym/s.
DVB-T/T2 — 174000..862000 kHz, 8000 kHz step.
A full blind sweep of the Ku band takes on the order of 100 minutes (several thousand tuning points). In practice the range is narrowed manually in the admin panel — the minimum/maximum frequency and the grid step. For example, a sweep of 11700..11800 MHz with a 4 MHz step for a single LNB band takes about 5 minutes.
The result format of a blind scan is identical to that of a normal one. Specifics:
the FEC and Modulation fields of the discovered multiplexes are fixed at the value AUTO — the scanner does not determine their exact values;
the delivery system equals the one requested (DVB-S, DVB-S2, …). For mixed networks it is recommended to perform two passes — DVB-S and DVB-S2 separately.
Applying a multiplex from a blind scan is performed in the same way as from a normal one — via the button that adds it to the DVB adapter list. The FEC and Modulation fields are usually left at AUTO and, if necessary, refined once a stable signal lock is obtained on the specific transponder.
Kernel reception buffer size¶
The buffer-size parameter (integer, default 512) sets the size of the kernel DVB demux ring buffer in 65536-byte blocks.
512(32 MB) — recommended default. Covers full-transponder DVB-S/S2 scenarios (>= 33 Mbit/s) with one or several MPTS consumers. Chosen based on bench testing with a TBS adapter under full transponder load.8..64(512 KB .. 4 MB) — acceptable for embedded systems with limited RAM or for adapters in Scanner / Femon modes where traffic is low.0— keep the driver default (usually 8…32 KB). Suitable only for very lightly loaded scenarios. On streams above 10 Mbit/s losses will occur.
When a message of the following form appears in the log:
DVB adapter X/Y dvr buffer overflow (NN so far, KK pids);
raise 'buffer-size' or reduce pid filter
increase buffer-size or reduce the number of PIDs passing through the filter (e.g. drop the MPTS output if not needed).
Memory cost: value N consumes N × 64 KB of kernel memory per adapter. With many adapters (8 or more) this is worth considering (8 × 32 MB = 256 MB).
Connecting an SPTS stream to a DVB multiplex service¶
When adding a new SPTS channel to the stream’s input, select:
Type: demuxer.
Source: DVB adapter.
Multiplex created on the DVB adapter, by adapter name.
PNR — selected from the popup list of services detected in the multiplex, or entered manually.
DVB device permissions¶
If DVB adapters are not displayed in Perfect Streamer, do the following:
sudo nano /etc/udev/rules.d/99-dvb-permissions.rules
SUBSYSTEM=="dvb", GROUP="video", MODE="0660"
sudo usermod -aG video pss
sudo chown -R root:video /dev/dvb/*
sudo reboot
T2-MI decapsulation¶
T2-MI (T2-Modulator Interface, ETSI TS 102 773) is a format for transporting DVB-T2 streams over DVB-S2 multistream. The outer DVB-S/S2 transponder carries one or more T2-MI carrier-PIDs, each encapsulating BBFRAMEs with one or more PLPs (Physical Layer Pipe). After decapsulation, the inner MPEG-TS containing programs and PSI/SI tables is extracted from the BBFRAME.
The Perfect Streamer implementation works in multi-carrier mode: a single physical adapter simultaneously serves the outer DVB-S/S2 multiplex and all decapsulated T2-MI carriers (one per each carrier-PID found in the outer stream’s PMT).
Configuration parameters¶
t2mi-mode (Int, 0..2, default 0) — decapsulation mode:
0— Disabled. The outer MPEG-TS is passed through unchanged. If a T2-MI descriptor (tag 0x51) is detected in the PMT, a one-time hint is logged.1— Manual. Decapsulation is always on. Ift2mi-pidis non-zero, a carrier is pre-created on that PID at startup. Additional carriers continue to be discovered from the PMT automatically.2— Auto. Carriers are discovered automatically from the outer multiplex PMT for all ES that look like T2-MI (descriptor 0x51, or a single ES with stream_type=0x06 on a service with no other A/V ES). If no carriers are found, the adapter works as a regular DVB multiplex.
t2mi-pid (Int, 0..8191, default 0) — PID for pre-creating a carrier at startup, before PMT arrives:
0— no pre-creation. Carriers are discovered from the PMT (recommended for auto mode2).1..8191— pre-create a carrier on this PID. Additional T2-MI ES found in the PMT still get their own carriers.
In multi-carrier mode the t2mi-pid parameter is not a single-carrier selector — each detected T2-MI ES gets its own carrier with its own decapsulator. The parameter provides early initialization for a known PID.
t2mi-plp (Int, 0..255, default 0) — identifier of the PLP extracted from each T2-MI carrier on the adapter. Applied to all carriers — per-carrier override is not supported in the current version. If in production different carriers carry different PLPs, you should:
specify a PLP common to all carriers, or
configure separate adapters for different PLPs using
lnb-sharing.
This is the identifier of the BBFRAME plp_id field, not the DVB-S2 multistream ISI (which is set by the dvb-stream-id parameter). These are different identifiers at different layers.
PLP selection diagnostics:
Five seconds after a carrier starts, if no BBFrame has been received for the configured PLP but other PLPs are seen, a warning is logged with the list of observed
plp_idvalues.
t2mi-tsid (Int, -1..255, default -1) — reserved for future use. Selector of the T2-MI stream identifier when several T2-MI streams share one carrier-PID. Ignored in the current version.
Composite PNR — connecting SPTS from T2-MI¶
One adapter can expose several logical multiplexes:
carrier-id = 0— outer DVB-S/S2 multiplex (regular A/V services).carrier-id = 1..N— decapsulated T2-MI carriers (one per outer T2-MI ES).
BISS descrambling¶
Descrambling of encrypted DVB streams using BISS-1 (mode E1) and BISS-E (mode E2) is supported. Applicable to delivery systems DVB-S, DVB-S2, DVB-T, DVB-T2.
The implementation allows several descramblers to be active on a single adapter simultaneously:
By PNR in the outer multiplex (regular service).
By
plp_idfor decrypting T2-MI carrier-PID before decapsulation (required for encryptedmultistreamstreams — otherwise the decapsulator drops every scrambled packet, see counter<t2mi scrambledDropped>).