The electronic programme guide, or EPG, is the grid that tells viewers what is on now and next. It looks simple on screen, but behind it sits a pipeline of XML files, channel identifiers, time zone conversions and caching rules. When any part of that pipeline breaks, the guide goes blank or shows the wrong programme. This article walks through how EPG data actually reaches an IPTV app.
The XMLTV format
Most IPTV services distribute guide data in XMLTV, a plain XML format that has been around since the early 2000s. A minimal file has two kinds of elements: channels and programmes.
<tv>
<channel id="bbc1.uk">
<display-name>BBC One</display-name>
</channel>
<programme start="20261127200000 +0000" stop="20261127210000 +0000" channel="bbc1.uk">
<title>Evening News</title>
<desc>National and international news.</desc>
</programme>
</tv>
Each programme points to a channel through its channel attribute, and carries a start and stop time with an explicit UTC offset. Real files often contain thousands of channels and seven days of listings, so they are usually served gzip-compressed and can reach tens of megabytes.
Matching guide data to streams
The guide and the video streams arrive separately. In an M3U playlist, each stream line can carry a tvg-id attribute:
#EXTINF:-1 tvg-id="bbc1.uk" tvg-name="BBC One HD" group-title="UK",BBC One HD
http://example.com/live/user/pass/12345.ts
The app joins the two datasets on that identifier. If the playlist says bbc1.uk and the XMLTV file says bbcone.uk, the channel plays perfectly but its guide stays empty. This mismatch is the single most common cause of missing listings.
With the Xtream Codes API, the player requests the EPG from an endpoint on the same server, usually xmltv.php with the account credentials, and the provider is responsible for keeping IDs aligned.
Time zones: where guides go wrong
XMLTV timestamps include an offset, so in theory every app can convert them correctly. In practice, three things break:
- Wrong source offsets. Some generators write local time with a +0000 offset, shifting every programme by the broadcaster's UTC difference.
- Daylight saving changes. Files generated a week ahead may use the old offset after a clock change.
- Device time zone. If the streaming box is set to the wrong region, every listing appears shifted.
That is why most players offer an "EPG time shift" setting in hours: it is a manual patch for upstream errors.
Caching and update intervals
Downloading and parsing a large XMLTV file is expensive, especially on low-power streaming sticks. Players therefore cache the parsed guide in a local database and refresh it on a schedule, often every 12 or 24 hours. Two problems follow. If the refresh fails silently, the guide slowly runs out of data and goes blank after a few days, one of the issues covered in this IPTV troubleshooting guide. And if the cache keeps too many days, the database grows and the interface slows down. Limiting storage to three to five days is a sensible default on modest hardware.
A troubleshooting checklist
- Guide empty for all channels: force an EPG update and check the source URL is reachable.
- Guide empty for some channels: compare the tvg-id values with the XMLTV channel IDs.
- Listings shifted by whole hours: check the device time zone, then adjust the time shift.
- Guide stops updating: clear the app cache and confirm the refresh interval.
- Slow interface after loading: reduce the number of stored days and hide unused channel groups.
Providers usually document their own setup. For instance, the Strong 8K EPG guide explains how its listings load in players like TiviMate and IPTV Smarters and how to fix an empty or shifted guide.
Conclusion
An EPG is a data integration problem disguised as a TV feature. Two independent sources, a stream list and a schedule file, must agree on identifiers and time. Understanding the XMLTV format, the tvg-id join and the role of time offsets turns a frustrating blank guide into a problem you can diagnose in minutes.
