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

This functionality automatically starts to work if you turn on the IPTV plugin (a small Flussonic's built-in middleware that can help in a variety of tasks).

To enable the IPTV plugin via the web interface, go to IPTV and click Enable IPTV.

With the IPTV plugin enabled, you can:

  • Use the API to get EPG as an XMLTV or JSON file and then use these files in your services for subscribers (see later on this page).
  • Subscribe to the event mpegts_epg_changed to know when the EPG is updated and receive updates.

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

IPTV API for getting EPG

After you have enabled the IPTV plugin, you can:

  • Import EPG to a file
  • Update EPG upon receiving the event mpegts_epg_changed

The IPTV API, which is used to get the EPG, is a part of our HTTP API related to the IPTV plugin.

To get the EPG in the XMLTV format, use these URLs:

  • /tv/all/epg.xml

    EPG for all channels available for a subscriber.

  • /tv/channel/CHANNEL NAME/epg.xml

    EPG for a channel with the specified name.

  • /tv/group/GROUP NAME/epg.xml

    EPG for a group of channels with the specified name.

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

  • /tv/all/epg.json

    EPG for all channels available for a subscriber.

  • /tv/channel/CHANNEL NAME/epg.json

    EPG for a channel with the specified name.

  • /tv/group/GROUP NAME/epg.json

    EPG for a group of channels with the specified name.

Example of a link for downloading an XMLTV file with EPG: