Skip to content

Adding the EPG to MPTS

This page describes how to add the EPG to output MPTS streams.

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.

Flussonic takes the EPG from files in the XMLTV format and converts it into EIT (service information tables) of the output transport stream. The EIT is included into the transport stream both for the current transponder (Actual) and for other transponders 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 (http://www.teleguide.info/download/new3/xmltv.xml.gz).

How to import the EPG to a transponder:

  1. In the transponder settings, add EIT options.

  2. Each time the data in the XMLTV file is updated, you must reload the file into the transponder with the dedicated API command.

  3. 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 transponder to include the EPG

transponer 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;
  }
}

Here:

  • eit_title — sets the program name in the XMLTV file (if it differs from 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 transponder that you edit (tp1 in the example).
    • other — defines the interval for the EPG transmitted in the transponder (tp2 in the example) that was specified in the other 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) and other (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 transponder

When the EPG data has been updated in the XMLTV file, it must be passed to the transponder.

To make Flussonic reload the updated XMLTV data from the xmltv_url directory, run the HTTP API call:

/flussonic/api/transponder/reload_xmltv/TRANSPONDER_NAME

For our example this call looks like:

/flussonic/api/transponder/reload_xmltv/tp1

EIT version

When the schedule is updated, the EIT version changes. The version is a number from 0 to 63.

If the version is not specified inside the XMLTV file, then you can specify it yourself in the version.txt file. The version.txt file must be located in the directory you specified in the xmltv_url option.

$ cat xmltv_dir1/version.txt
55

Notes

The XMLTV file from teleguide.info (http://www.teleguide.info/download/new3/xmltv.xml.gz) might contain overlapping transmissions. If this occurs, then Flussonic includes the earlier transmission to the EPG, and excludes the later one.