Multiplexer¶
Multiplexer is the most important element of the entire system for delivering television to DVB networks.
Main Tasks¶
It covers the following tasks:
- Preparing MPEG-TS stream in compliance with DVB standard requirements for CBR, PCR accuracy, HRD buffer, etc.
- Packaging multiple TV channels into MPTS while maintaining uniform channel interleaving
- Forming all service tables: PAT, PMT, SDT, EIT, NIT necessary for a full DVB service
Configuration Example¶
transponder plp0 {
provider "Central TV";
bitrate 22600k;
ts_stream_id 1;
network 0x3578 original=0x2283 name="DTT - National TV";
time_offset RUS:10 time_of_change=2018-03-23T03:00:00Z local_time_offset=+0300 next_time_offset=+0300;
version psi 25;
ts_descriptor 0x7F 040022830325;
push udp://streaming0@238.238.31.1:1111 multicast_loop tos=0;
program 1010 {
source Switcher_1010_ort;
title "01 ORT";
eit_title Ort_(+0);
lcn 1;
service_type digital_tv_avc_sd;
pid 1010 pmt;
pid 1011 v1 pcr bitrate=2720 ;
pid 1012 a1 ;
pid 1014 l1 codec=ttxt ;
pid 1015 l1 codec=scte35 ;
pid 1016 bypass es_info=6F030010E1 stream_type=5;
pid 1017 bypass es_info=140D000B00000080000000FFFFFFFF52010B130500002F520066020123 stream_type=11;
pid 1018 bypass es_info=52010D stream_type=12;
}
program 1040 {
source Switcher_1040_04_Uchebniy;
title "04 Educational";
eit_title Uchebniy_(+0);
lcn 4;
service_type digital_tv_avc_sd;
pid 1040 pmt;
pid 1041 v1 pcr bitrate=2750 ;
pid 1042 a1;
pid 1044 l1 codec=ttxt ;
pid 1045 l1 codec=scte35 ;
pid 1046 bypass es_info=6F030010E1 stream_type=5;
pid 1047 bypass es_info=140D000B00000080000000FFFFFFFF52010B130500002F520066020123 stream_type=11;
pid 1048 bypass es_info=52010D stream_type=12;
}
other @plp1;
eit {
source bypass://EIT_source_MUX1_plp0;
max_bitrate 300;
}
}
Configuration Details¶
Program Sections¶
In the multiplexer configuration, program
sections are specified - these are individual TV channels. They must reference a stream configured in Mcaster.
Program Parameters¶
- title - TV channel name
- eit_title - optional title that goes to EPG (Electronic Program Guide)
- lcn (Logical Channel Number) - sequential number in the program list, transmitted in NIT table
- service_type - service type, specified in SDT table
PID Configuration¶
The PID list is rigid, fixed, not dynamic and will not change depending on the source.
PID Options¶
- pmt - PMT table will go in this PID
- pcr - PCR (Program Clock Reference) will be marked on this PID
- codec - you can separately specify the PID codec
- bitrate - you can force the PID bitrate
- bypass - PIDs that are passed through without demultiplexing at the input
Bypass PID Parameters¶
For bypass PIDs, you can specify MPEG-TS packaging parameters:
- es_info - elementary stream information
- stream_type - stream type
Additional Parameters¶
- other - allows referencing other multiplexers for SDT formation
- eit - EIT table formation:
- From file
- From stream where program schedule is captured
Monitoring Parameters¶
The module provides the following parameters for monitoring:
Main Metrics¶
- payload - payload bytes count (multiplexer_payload)
- encoded - encoded bytes count (multiplexer_encoded)
- fillers - filler packets count (multiplexer_fillers)
- stuffing - stuffing packets count (multiplexer_stuffing)
Additional Metrics¶
- trimmed_bytes - trimmed bytes count (multiplexer_trimmed_bytes)
- trimmed_frames - trimmed frames count (multiplexer_trimmed_frames)
- ts_overflow - TS stream overflow (boolean)
Service Tables¶
Multiplexer forms all necessary DVB service tables:
- PAT (Program Association Table) - program association table
- PMT (Program Map Table) - program map table
- SDT (Service Description Table) - service description table
- EIT (Event Information Table) - event information table
- NIT (Network Information Table) - network information table
DVB Standard Requirements¶
The module ensures compliance with the following requirements:
- CBR (Constant Bit Rate) - constant transmission rate
- PCR accuracy - Program Clock Reference accuracy
- HRD buffer - hypothetical decoder buffer requirements
- Uniform channel interleaving in multiplex
Electronic Program Guide (EPG)¶
Mcaster can generate MPTS streams with an embedded electronic program guide (EPG). You no longer need to use an additional EPG generator and remultiplexer to add EPG to TV channels.
In MPEG-TS streams, the EPG is stored in the Event Information Tables (EIT). Mcaster can populate EIT in the output stream.
Two Ways to Add EPG¶
There are two ways for Mcaster to add EPG to the output MPTS:
- Copy EIT from source if the program guide in it is satisfiable
- Take the EPG from XMLTV files and convert it into EIT for both current multiplexer (Actual) and other multiplexers in a network (Other)
Copy EPG from Source¶
To copy EIT from the source MPEG-TS stream, add EIT options to the multiplexer configuration:
transponder tp1 {
eit {
source copy://STREAMNAME;
}
}
Replace the STREAMNAME
with the name of the source stream in Mcaster configuration.
Import EPG from XMLTV¶
To import EPG from XMLTV files, configure the multiplexer as follows:
transponder tp1 {
program 100 {
title "program1";
eit_title "example_title";
};
other @tp2;
eit {
xmltv_url xmltv_dir1;
interval pf actual=1 other=2;
interval schedule other=20;
}
}
Configuration Parameters¶
title
— sets the channel ID value from thechannel id
in the XMLTV fileeit_title
— sets the channel name from thedisplay-name
in XMLTVxmltv_url
— sets the path to the directory with XMLTV files (can be a single file)interval pf|schedule actual=<INTERVAL 1> other=<INTERVAL 2>
— sets how often EIT tables will be sent
EPG Reloading¶
When EPG data is updated in the XMLTV file, reload it using the API:
POST /streamer/api/v3/multiplexers/{name}/xmltv_upload
Important Notes¶
- The EPG is packed into the target bitrate
- EIT version changes when schedule is updated (number from 0 to 63)
- XMLTV files might contain overlapping transmissions - Mcaster includes the earlier one
- Default intervals:
actual
(present/following) is 2 seconds,other
(present/following) is 4 seconds,actual
(schedule) andother
(schedule) are 60 seconds
Note
The description of the XMLTV file format can be found at xmltv.org, and broadcast schedules in this format are available at teleguide.info.