IPTV playlist basics: M3U/M3U8, XMLTV, tvg-id and where Jellyfin, Tvheadend and Threadfin fit

Discuss IPTV, Including how to watch, and how to broadcast
Post Reply
User avatar
ZerOne
Site Admin
Posts: 292
Joined: Sun Dec 13, 2020 8:21 am

Overview

The IPTV intro thread covers m3u8 streams and playing them in VLC. This one explains the other pieces you meet when you want a proper channel list with a TV guide in a home server or media centre. I have gone by the documentation linked below and not tested every combination, so test with one channel first.

The three building blocks
  1. The stream. Usually HLS (an .m3u8 playlist of short segments, as in the intro thread) or a plain MPEG-TS stream over HTTP.
  2. The channel playlist (M3U). A text file listing channels, one stream URL per entry.
  3. The guide (XMLTV). An XML file describing what is on and when. The XMLTV format page has the details.
Note that an M3U channel playlist and an HLS .m3u8 media playlist share an extension but are different things. One lists channels, the other lists video segments.

What an M3U channel entry looks like

Code: Select all

#EXTM3U
#EXTINF:-1 tvg-id="ABC.au" tvg-name="ABC" tvg-logo="http://192.168.1.10/logos/abc.png" group-title="News",ABC
http://192.168.1.10:9981/stream/channelid/1234
The tvg-id, tvg-name, tvg-logo and group-title attributes are widely used conventions that clients such as Kodi's IPTV Simple add-on understand. They are not a formal standard, so different tools may support slightly different attributes. The values above are made up examples.

What the matching XMLTV looks like

Code: Select all

<tv>
  <channel id="ABC.au">
    <display-name>ABC</display-name>
  </channel>
  <programme start="20261025190000 +1100" stop="20261025193000 +1100" channel="ABC.au">
    <title lang="en">Evening News</title>
  </programme>
</tv>
The key rule: the channel id in the XMLTV file must match the tvg-id in the playlist, otherwise your player cannot join the guide to the channel. Times use the format YYYYMMDDhhmmss followed by a time zone offset, and daylight saving matters in Australia, so check offsets after the clocks change.

Where each tool fits
  • Jellyfin Live TV: the docs list HDHomeRun and M3U as the built-in tuner types, with Schedules Direct or XMLTV for guide data. The setup guide says you cannot use both guide providers at once, and that Schedules Direct is a paid service for the US and Canada, so for Australia you would be looking at XMLTV or a tuner that brings its own guide.
  • Tvheadend: a TV backend that can take DVB tuners (for example an antenna and a USB DVB-T tuner) and serve channels as playlists and streams. Its URL docs describe /playlist and /stream endpoints and authentication choices (HTTP auth, a temporary ticket valid for 5 minutes, or a permanent auth code).
  • Threadfin: a playlist/guide proxy in the xTeVe family, described on its GitHub page. Check how recently it has been updated before depending on it.
  • Kodi IPTV Simple Client: reads an M3U and XMLTV; see the Kodi wiki.
  • Antenna in Australia: Tvheadend uses scan files; the dtv-scan-tables repository is where they come from (see also Tvheadend's scan file docs). Check the Australian files cover your area.
A note on legality (general information only)

I am not a lawyer. In Australia, copyright owners can get court orders under section 115A of the Copyright Act requiring internet providers to block sites that facilitate infringement, and the Federal Court has used it against illegal internet-based TV subscription services (this overview describes a 2018 case). Playlists from random sources may include unlicensed streams, and they can break or disappear. The safest approach is to build your list from sources you are entitled to use: your own antenna and tuner, services you pay for, and free-to-air streams offered by the broadcasters themselves. If you are unsure whether a source is licensed, don't use it.

Keep it safe: never put playlist URLs that contain passwords or tokens in public posts or screenshots, and don't expose Tvheadend or Jellyfin to the internet without a reverse proxy and proper authentication.

Discussion: What is your main use case: antenna-based live TV around the house, or an existing licensed service you want in one app? That will decide which pieces you need.
Post Reply

Return to “IPTV Discussion”