/iptv/channels.m3u that enumerates every enabled channel with its stream URL, channel number, name, group, logo, and a pointer to the XMLTV EPG feed. Any IPTV client that can consume an M3U URL — Plex, Jellyfin, Emby, Kodi, TiviMate, Infuse, VLC, or Channels DVR — can import this playlist and receive live, scheduled programming from ErsatzTV.
Playlist Endpoint
The playlist is served at:GET and HEAD are supported. The HEAD method is useful for clients that check the playlist URL before importing it.
Query Parameters
Streaming Modes
Themode parameter controls which stream URL format appears for each channel entry. When mode=mixed (the default), ErsatzTV uses each channel’s individually configured streaming mode.
M3U Playlist Structure
The generated playlist begins with an#EXTM3U header that embeds the XMLTV EPG URL, then lists one entry per enabled channel, ordered by channel number ascending.
Per-Entry M3U Fields
Each#EXTINF line includes the following attributes:
Stream URLs
Each channel entry in the playlist points to one of the following stream endpoints depending on the streaming mode:Transport Stream
TS Hybrid:
/iptv/channel/{channelNumber}.tsTS Legacy: /iptv/channel/{channelNumber}.ts?mode=ts-legacyReturns an MPEG-2 Transport Stream (video/mp2t) via a spawned FFmpeg process. TS Hybrid uses a wrapped process for lower latency; TS Legacy uses the older concat playlist approach.HTTP Live Streaming
Segmenter:
/iptv/channel/{channelNumber}.m3u8?mode=segmenterHLS Direct: /iptv/channel/{channelNumber}.m3u8?mode=hls-directReturns an HLS multi-variant playlist (application/vnd.apple.mpegurl). The segmenter mode maintains a live HLS session. HLS Direct passes through source stream segments without re-encoding.HDHomeRun Stream
/iptv/hdhr/channel/{channelNumber}.tsAlways delivers a Transport Stream regardless of channel configuration. Used by HDHomeRun-compatible clients that discover ErsatzTV via the HDHR emulation layer.HLS Session Playlist
/iptv/session/{channelNumber}/hls.m3u8Internal endpoint used by segmenter sessions. The client is redirected here after a segmenter session starts. Not intended for direct use.Channel Logos
Channel logos are served from:Multi-Instance Disambiguation (ETV_INSTANCE_ID)
When running multiple ErsatzTV instances, thetvg-id field in the M3U playlist — and channel IDs in the XMLTV feed — would otherwise clash if two instances have channels with the same number. Setting the ETV_INSTANCE_ID environment variable gives each instance a unique suffix:
tvg-id in the M3U and the id attribute of <channel> elements in the XMLTV feed must match. ErsatzTV ensures they always match as long as ETV_INSTANCE_ID is consistent between restarts.
Kodi Integration
When ErsatzTV detects a Kodi user-agent, it automatically prepends#KODIPROP directives before each channel entry to configure the inputstream.ffmpegdirect addon:
Kodi-Specific Playlist Entries
video/mp2t for Transport Stream channels and application/x-mpegURL for HLS channels.
Client Configuration
- Plex
- Jellyfin
- Emby
- Kodi
- TiviMate
- Channels DVR
Plex supports live TV through the Live TV & DVR section using either HDHR emulation (recommended) or a direct M3U import via a Plex plugin.
- Navigate to Settings > Live TV & DVR in Plex Web.
- Click Set Up Plex DVR and choose Network Tuner.
- Enter the ErsatzTV HDHR discovery address (see HDHomeRun).
- Alternatively, use a Plex IPTV plugin and provide the M3U URL:
Replace
ersatztv.local:8409 with the actual hostname or IP address and port where your ErsatzTV Legacy instance is running. The default port is 8409.