ErsatzTV Legacy generates a full Electronic Program Guide (EPG) in XMLTV format and serves it atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ErsatzTV/legacy/llms.txt
Use this file to discover all available pages before exploring further.
/iptv/xmltv.xml. IPTV clients use this feed to display program titles, descriptions, start and end times, and other scheduling metadata in their guide grids. ErsatzTV builds the XMLTV data from active playout schedules and caches the result for fast delivery.
EPG Endpoint
The XMLTV guide is served at:GET and HEAD are supported. The HEAD method is useful for verifying that the endpoint is reachable before subscribing a client.
Query Parameters
| Parameter | Default | Description |
|---|---|---|
access_token | (none) | JWT bearer token passed as a query parameter when authentication is enabled. |
access_token is provided, ErsatzTV embeds the token inside the logo URLs within the XMLTV document so that clients that fetch artwork do not need a separate auth step.
XMLTV Document Structure
The XMLTV document is a standard XML file with a root<tv> element. It contains one <channel> element per enabled channel followed by <programme> elements representing scheduled items.
Example XMLTV Response
Channel Identifiers
Theid attribute on each <channel> element uses the same stable identifier format as tvg-id in the M3U playlist. The format is:
ETV_INSTANCE_ID environment variable is set, the instance ID is inserted before ersatztv.org:
id must match the tvg-id in the M3U playlist for clients to link programs to the correct channel. ErsatzTV guarantees they always match as long as ETV_INSTANCE_ID is consistent.
XMLTV Settings
Guide generation is controlled from Settings > XMLTV in the ErsatzTV web UI at/settings/xmltv.
Days to Build
The Days to Build setting controls how many days of future guide data are generated. ErsatzTV rebuilds guide data whenever playout schedules change, and serves the pre-built cache from disk. The default is a small number of days; increasing this gives clients a longer schedule lookahead at the cost of more disk activity during rebuilds.Time Zone
The XMLTV Time Zone setting controls how timestamps are written into the XMLTV document:| Value | Behavior |
|---|---|
Local | Timestamps are expressed in the server’s local time zone with the appropriate UTC offset |
UTC | All timestamps are expressed as UTC (+0000) |
Block Behavior
When a playout schedule contains content blocks (multiple items grouped together in a block), the XMLTV Block Behavior setting controls how their guide times are represented:| Value | Behavior |
|---|---|
Split Time Evenly | The block’s total duration is divided evenly among all items in the block |
Use Actual Times | Each item’s real start and finish time is used directly |
Channel EPG Flags
Individual channels have two EPG-related properties that can be configured per-channel:ShowInEpg
When Show in EPG is disabled on a channel, that channel’s<programme> elements are omitted from the XMLTV output. The channel still appears in the M3U playlist and streams normally — it simply has no guide data. This is useful for channels that serve as stream-only sources with no meaningful schedule to display.
The <channel> definition element itself is also omitted from the XMLTV output for hidden channels.
PlayoutOffset
The Playout Offset per-channel setting shifts all guide times for that channel by the specified duration. A positive offset moves all guide entries later in time; a negative offset moves them earlier. This compensates for slight timing mismatches between the actual stream start and the scheduled time displayed in a guide grid.EPG Data and Playout Requirements
XMLTV program data is generated from active playout schedules. A channel must have an active playout assigned and running for its
<programme> entries to appear in the guide. Channels with no playout, or channels where the playout has not yet been built, will have a <channel> definition but no associated <programme> elements.Configuring Clients
Most IPTV clients pick up the XMLTV URL automatically from theurl-tvg and x-tvg-url attributes embedded in the #EXTM3U header of the M3U playlist. For clients that require manual configuration:
- Jellyfin
- Emby
- Kodi
- TiviMate
- Channels DVR
- Go to Dashboard > Live TV > TV Guide Data Providers.
- Click Add and select XMLTV.
- Enter the guide URL:
- Save and trigger a guide refresh.
Replace
ersatztv.local:8409 with the actual hostname or IP address and port where your ErsatzTV Legacy instance is running.Multi-Instance Setup
When running multiple ErsatzTV instances, each instance must have a uniqueETV_INSTANCE_ID environment variable. This value is embedded in all channel identifiers in both the M3U playlist and the XMLTV feed. Without distinct instance IDs, two instances sharing a client would have conflicting channel IDs and the guide data would be attributed to the wrong channels.
See the IPTV M3U Playlist page for more detail on the ETV_INSTANCE_ID variable and the channel identifier format.