Adding the EPG to MPTS¶
Flussonic 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). Flussonic can populate EIT in the output stream.
There are two ways for Flussonic 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. The EIT is included into the transport stream both for the current multiplexer (Actual) and for other multiplexers in a network (Other). The EPG is packed into the target bitrate, and a stream with a ready-made schedule goes to UDP multicast.
The description of the file format can be found at xmltv.org, and the broadcast schedule in this format is available at teleguide.info.
Copy EPG from the source¶
To copy EIT from the source MPEG-TS stream, add EIT options to the multiplexer configuration as follows:
transponder tp1 {
eit {
source copy://STREAMNAME;
}
}
Replace the STREAMNAME
with the name of the source stream in Flussonic configuration.
Import EPG from XMLTV¶
How to import EPG to a multiplexer:
- In the multiplexer settings, add EIT options.
- Each time the data in the XMLTV file is updated, you must reload the file into the multiplexer with the dedicated API command.
- If you store the version number in a separate file, each time the data in the XMLTV file is updated, you may need to update the version number in the file.
Configuring the multiplexer to include the EPG¶
Consider the following configuration:
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;
}
}
where:
title
— sets the channel ID value from thechannel id
in the XMLTV file.eit_title
— sets the channel name. To associate the TV program from the XMLTV file with the MPTS, specify the value of thedisplay-name
from XMLTV in theeit_title
.xmltv_url
— sets the path to the directory with XMLTV files. It can be a single file name, for example,xmltv_url /path/to/xmltv.xml
.-
interval pf|schedule actual=<INTERVAL 1> other=<INTERVAL 2>
— sets how often the EIT tables will be sent. The EPG is transmitted in two tables: the present/following program (pf
) in one table and the schedule for several days (schedule
) in the other table.pf
— how often the EIT table for the present/following program will be sent, in seconds.schedule
— how often the EIT table for the schedule will be sent, in seconds.actual
— defines the interval for the EPG transmitted in the multiplexer that you edit (tp1
in the example).other
— defines the interval for the EPG transmitted in the multiplexer (tp2
in the example) that was specified in theother
option.
If you set
interval
to 0, the EIT table will not be transferred.By default,
actual
(present/following) is 2 seconds,other
(present/following) is 4 seconds,actual
(schedule) andother
(schedule) are 60 seconds.Note: To transfer a large amount of EPG data without cutting out any of it, you can try increasing the
interval
and/or decreasing the number of programs.
Reloading the EPG into the multiplexer¶
When the EPG data has been updated in the XMLTV file, it must be passed to the multiplexer.
To make Flussonic reload the updated XMLTV data from the xmltv_url
directory, run the API call Flussonic-API: POST /streamer/api/v3/multiplexers/{name}/xmltv_upload
For our example this call looks like:
/streamer/api/v3/multiplexers/tp1/xmltv_upload
EIT version¶
When the schedule is updated, the EIT version changes. The version is a number from 0 to 63.
Notes¶
The XMLTV file from teleguide.info might contain overlapping transmissions. If this occurs, then Flussonic includes the earlier transmission to the EPG, and excludes the later one.