Flussonic Media Server documentation

Export of EPG from MPEG-TS Streams

About getting EPG with Flussonic

EPG (Electronic Program Guide) is an important part of any TV service. There are many ways to provide it to subscribers. For example, satellite TV transmits EPG data together with broadcasts in MPEG-TS streams.

Flussonic can extract EPG from the metadata of MPEG-TS streams received from a satellite receiver by UDP multicast. It imports EPG data to files that you can get via HTTP API. It then updates the EPG as it extracts new EPG data while receiving a stream, and you can get the updated EPG upon notification.

You can then export it to your IPTV middleware for providing it to subscribers. Also, the EPG in the JSON format is great for integration with web sites. This means that subscribers will receive EPG via the Internet as part of your paid services.

Flussonic exports EPG into two formats, each serving different goals:

  • XMLTV. The standard format for describing TV broadcasts that is mostly used in IPTV middleware. It allows viewing the TV program and creating links to certain recorded broadcasts in the archive.
  • JSON. These files have a structure specific to Flussonic. By using JSON files you can integrate with a web site and display the program on web pages.

Flussonic creates EPG for individual channels, for all channels, or a group of channels like Sport.

How to get EPG

Starting from version 20.03, you will need to explicitly enable EPG collection for a stream in the stream settings, with the option epg on:

stream channel5 {
  url tshttp://trancoder-5:9000/;
  udp 239.0.4.4:1234;
  epg on;
}

Alternatively, to turn on collection of the EPG via the UI:

EPG

  1. Click the stream name in Media
  2. Go to the EPG tab in the stream settings
  3. Select the check box EPG and click Save.

With the EPG turned on, you can:

  • Get EPG as an XMLTV or JSON file and then use these files in your services for subscribers.

  • Subscribe to the event mpegts_epg_changed to know when the EPG is updated and to receive updates.

    Updating the EPG means getting a newer file. Learn more in Events API about how to subscribe to events.

Important. Starting from Flussonic version 20.03, it is enough to access the stream at a special URL in order to get the EPG. The IPTV plugin is no longer used for this.

To get the EPG in the XMLTV format, use this URL:

  • /CHANNEL_NAME/epg.xml — loads the EPG for a channel with the specified name.

  • (deprecated) /tv/channel/CHANNEL_NAME/epg.xml — loads the EPG for a channel with the specified name (in versions prior to 20.03).

  • (deprecated) /tv/all/epg.xml — loads the EPG for all channels (in versions prior to 20.03).

Format of the link for downloading an XMLTV file with EPG:

http://FLUSSONIC-IP/CHANNEL_NAME/epg.xml

To get the EPG in the JSON format, use the following URL:

  • /CHANNEL_NAME/epg.json — loads the EPG for the channel with the specified name.

  • (deprecated) /tv/channel/CHANNEL_NAME/epg.json — loads the EPG for the channel with the specified name (in versions prior to 20.03).

  • (deprecated) /tv/all/epg.json — loads the EPG for all channels (in versions prior to 20.03).

Format of the link for downloading a JSON file with EPG:

http://FLUSSONIC-IP/CHANNEL_NAME/epg.json