Guide· legacy
Xtream UI to a hosted panel: a realistic migration plan
Move from Xtream UI to a hosted panel without an importer: export, rebuild channels via M3U import, recreate lines, run in parallel, cut DNS over, roll back.
Guide· beginner
How an IPTV EPG works: XMLTV sources (.xml, .xml.gz), priorities, matching channels by name and country, time offsets, how apps fetch the guide, and fixes.
An IPTV EPG, the programme guide your customers scroll through, is the feature that turns a list of streams into television. It also generates the vaguest tickets: “the guide is empty”, “the guide shows yesterday”, “the times are wrong”.
This guide explains where the data comes from (XMLTV) and how a panel attaches it to your channels. It covers why time offsets exist and how player apps fetch the guide. Then it walks through the common failures, so you stop guessing.
Short version: EPG data arrives as XMLTV, an XML file (often gzipped) listing channels and programmes with start and stop times. Your panel imports one or more sources on a schedule, matches each of your channels to a channel ID in a source, applies time offsets where a source’s times are wrong, and serves the result to apps through xmltv.php, the url-tvg header of your M3U or the player API. Almost every EPG problem is one of four things: no match, wrong match, wrong offset or a stale import.
XMLTV is a plain XML format from the early 2000s that nearly every IPTV panel, PVR and player understands. A file has two parts. First, a list of channels, each with an id attribute and one or more display names. Second, a list of programmes, each referring to a channel ID and carrying a start time, a stop time, a title and optional description, category, episode number and icon.
The time stamps look like 20261112203000 +0100: date and time to the second, then the offset from UTC. That trailing offset is the part that matters later.
Sources publish the file either as .xml or compressed as .xml.gz. A guide for a few hundred channels over seven days is tens of megabytes uncompressed and a few megabytes gzipped. Panels import both; most also serve the guide gzipped to apps that accept it. If a source offers both, take the compressed one.
Broadcasters publish schedules. EPG data vendors collect, clean and license them. Community projects scrape public listings into XMLTV and share the result, with uneven quality and uncertain legal footing. Hardware operators sometimes capture the over-the-air EIT guide from satellite or DVB-T and export it.
Whichever you use, the data has an owner. Copyright or database rights cover schedule listings in many countries. A licensed vendor is part of running a legitimate service, alongside the stream rights themselves (see how to start an IPTV business).
The panel fetches each source on a schedule, parses it and stores programmes per channel ID.
With more than one source the panel needs a rule for conflicts. The usual rule is priority order. For each of your channels, the first source in your list with programmes for the matched ID wins. Lower-priority sources fill in only where higher ones have nothing.
In practice you layer sources. A paid, accurate feed for your main markets goes at the top. A broad free feed below it covers long-tail channels. A regional feed fills one country where the big feeds are weak.
Keep the list short. Every extra source is another file to parse, another set of IDs to match and another offset to get wrong.
Here is where the hours go. A source’s channel IDs look like ChannelOne.uk or newschannel.de or an opaque number. Your channels are called whatever you or your provider called them, say UK| CHANNEL ONE HD. Something has to connect the two.
Older panels, Xtream UI among them, make this a manual field: you type or paste the source’s channel ID into each stream. Thousands of channels mean thousands of fields; a typo means an empty guide for that channel. The Xtream UI panel guide describes how far its bulk editing goes, which is not far.
Newer panels attempt the match for you. The usual approach normalises both names: it strips prefixes like UK|, suffixes like HD or FHD, punctuation and case. Then it compares them, often with the country as a filter. That way a French Channel One matches the French feed and not a Belgian relay.
Good matchers show you a confidence score and let you accept, reject or override per channel. Treat any automatic match as a proposal. Spot-check the channels your customers watch most. A wrong match (the right name on the wrong regional variant) is worse than no match, because the guide looks fine and lies.
+1 channels) need a separate ID or an offset, not the parent’s guide.4K event channels usually have none.The XMLTV time stamp carries its own UTC offset, so in theory nothing else is needed.
In practice sources get it wrong. One feed labels everything +0000 although it was built in another zone. A scraper ignores daylight saving. A vendor serves the UK and Germany from one file with one offset.
Panels therefore offer two corrections. A source offset shifts everything from one source by a fixed number of hours. Use it when every channel from that source is wrong by the same amount. A channel offset shifts one channel; use it for +1 channels that reuse the parent’s data, or for a single mis-timed channel in an otherwise correct source.
Set the source offset first and only then touch channels. Stacked offsets are how a guide ends up two hours wrong after a clock change. Someone corrected the same error twice, at two levels.
Note the date the clocks change in your markets. A source that is right in winter may be wrong in summer, and the other way round.
Apps do not read your panel’s database. They fetch the guide in one of three ways, and knowing which one a given app uses shortens every EPG ticket.
xmltv.php is the Xtream Codes convention. A request to http://host:port/xmltv.php?username=…&password=… returns an XMLTV file with only the channels the line can see. It carries the panel’s matched IDs. Most Xtream-API apps and PVR add-ons use it, usually once a day with a cache.
url-tvg in the M3U is for playlist-based players. The playlist’s first line carries #EXTM3U url-tvg="http://…/xmltv.php?…"; some players also read x-tvg-url. Each channel line carries a tvg-id that must equal the channel ID inside that XMLTV file. If the IDs disagree, the player shows nothing, even though both files are correct on their own.
player_api.php serves the guide in JSON for apps that build their own guide view. get_short_epg returns the next few programmes on one channel. get_simple_data_table returns a channel’s full listing. The “now playing” line under a channel comes from these calls.
Apps that use them hit your main server far more often than apps that download the file once. That is why a popular app update can raise your API load overnight.
The Windows player comparison notes which method each player family uses; the pattern holds on Android and TV boxes too.
Work from the source towards the app. The table lists the symptoms we see most and where to look first.
| Symptom | Most likely cause | Check |
|---|---|---|
| Guide empty for every channel | Import failed or never ran; file not fetched, parse error, gzip mismatch | Last import time and log in the panel; download the source URL by hand |
| Guide empty for some channels | No match for those channels | The channel’s EPG ID field; search the source file for the channel’s display name |
| Guide shows the wrong programmes | Wrong match, usually a regional variant or a +1 channel |
Compare one programme against the broadcaster’s own schedule |
| Guide is off by one or more hours | Offset error at source or channel level, or a daylight-saving change | Source’s time stamps vs real time; remove stacked offsets |
| Guide shows yesterday or ends today | Stale import; source publishes fewer days than you expected | Import schedule; how many days ahead the source actually carries |
| Guide fine in one app, empty in another | Different fetch method; tvg-id and XMLTV IDs disagree; file too large for the app |
Open xmltv.php for the line; compare IDs with the M3U; check file size |
| Guide fine on the panel server, wrong on load balancers | Clock drift on the stream servers affecting catch-up and now/next | NTP status on every server |
| EPG disappears after a provider rename | Match was keyed on the old channel name | Re-match; prefer stable IDs over names |
Two habits prevent most of this. First, keep a short list of reference channels in each country you serve and glance at their guide against a public schedule once a day. Second, alert on import failures in the panel rather than waiting for a customer to tell you.
Xtream UI and XUI One take XMLTV URLs or uploads and rely on a manual EPG ID per stream, with limited bulk tools. Hosted panels tend to add the automation.
IPTVOS, an advertiser on IPTVBlog, is one we have looked at. It accepts any number of XMLTV sources, plain or gzipped, with priorities. It proposes matches by name and country and has time offsets per source and per channel. It serves the result through xmltv.php, the M3U url-tvg and player_api.php.
IPTVOS is still in beta, so check its changelog before you rely on a specific behaviour. Whatever panel you use, the structure above is the same, and the troubleshooting table applies.
xmltv.php for a test line and confirm the channel IDs match the tvg-id values in the same line’s M3U.From the broadcasters' published schedules, from licensed EPG data vendors, or from community XMLTV projects that scrape public listings. Check the licence of whatever you use; schedule data is copyrighted in many countries, and vendors sell it for a reason.
The app fetches the guide separately from the stream list, usually through xmltv.php or player_api.php. Check that the line has access, that the file is not too large for the app to parse, and that the app's EPG refresh interval has passed. Many apps cache the guide for a day.
A time offset is wrong somewhere: the source publishes times in a different zone than its header claims, the server's time zone changed, or a per-channel offset was set for a channel that did not need it. Compare one programme against the broadcaster's own schedule and adjust the offset at the source level first.
Once or twice a day is enough for most schedule feeds; they publish a few days ahead. Refresh more often only for sources that update late-breaking changes, and never faster than the source itself updates, or you just add load without new data.
Usually one source wins per channel. Source priority decides which: the panel takes the first source in priority order that has data for the channel's ID. Use that to layer a good paid source over a free fallback.
Topicsepgxmltvoperations
Guide· legacy
Move from Xtream UI to a hosted panel without an importer: export, rebuild channels via M3U import, recreate lines, run in parallel, cut DNS over, roll back.
Guide
Catch-up TV and timeshift for IPTV operators: recording windows, a worked storage example, where recordings live, Xtream timeshift URLs, players and rights.
Guide
Practical IPTV panel server requirements: how to split main and load balancer roles, size CPU, RAM, NVMe and bandwidth per concurrent stream, and monitor it.
Comments