EPG and XMLTV: how to add a TV guide to IPTV

Published:

An EPG (Electronic Program Guide) is the schedule of programmes with titles, descriptions and start times. Without it a player shows only a channel list; with it you see what is on now and what comes next.

The XMLTV format

Nearly all IPTV players read the guide in XMLTV format. It is an XML file with two parts:

  • a list of channels, each with a unique id and a display name;
  • a list of programmes, each tied to a channel by that id and carrying start and stop times.

The file is usually large, so it is distributed compressed as .xml.gz.

How a player links channels to the guide

The link is the tvg-id attribute in the playlist: its value must equal the channel id in the XMLTV file. If tvg-id is missing, many players try to match by tvg-name or the channel title, which is less reliable.

#EXTINF:-1 tvg-id="news24.uk" group-title="News",News 24

Where to set the guide address

There are two ways:

  1. In the first line of the playlist: #EXTM3U url-tvg="https://…/epg.xml.gz". The player picks it up automatically.
  2. In the player settings, under “TV guide” or “EPG”.

If you use Xtream Codes, the EPG address is built from the same server, username and password — our link generator shows it.

Why the guide does not show up

  • tvg-id does not match. The most common cause. Open the playlist in the editor and check the channel’s EPG ID field.
  • Time shift. Programmes appear hours early or late — fix the time zone in the player or the tvg-shift attribute.
  • Outdated file. An EPG usually covers a few days ahead; the player should refresh it at least daily.
  • File too large. On low-powered boxes a huge EPG loads slowly — keep only the channels you need in the playlist.

Guides and explainers