15% discount on service renewal Renew now

0

admin Admin

Plex Live TV with IPTV through Threadfin: a step-by-step setup

Article

Plex Live TV and DVR works with tuners it recognizes, mainly HDHomeRun devices, and it can't open an M3U link by itself. Threadfin closes that gap. It reads your playlist and XMLTV guide, lets you filter and map channels, and presents the result to Plex as a network tuner with its own guide file. This guide covers a Plex Live TV IPTV setup step by step: Threadfin in Docker, the Plex DVR wizard, and the problems people run into most often.

Two facts first. Plex lists Live TV and DVR among its Plex Pass features, and Threadfin's README names Plex Pass as a requirement for Plex. Nothing here is specific to one provider: it works with any IPTV subscription that gives you an M3U link and an XMLTV guide. Examples use placeholders (http://example-server.com:8080, username, password) and 192.168.1.20 for the address of the computer running Threadfin.

What you need

  • Plex Media Server with an active Plex Pass.
  • A computer or NAS that can run Docker. The Plex server itself is fine.
  • Your M3U link, preferably with type=m3u_plus so guide IDs and logos are included, and your XMLTV address.
  • The number of connections your plan allows.

Step 1: run Threadfin

Threadfin is an M3U proxy based on xTeVe, and its README points to the xTeVe documentation for configuration details. The image is fyb3roptik/threadfin and the default port is 34400. A single command starts it:

docker run -d --name threadfin --restart unless-stopped -p 34400:34400 -e TZ=Europe/London -v /opt/threadfin/conf:/home/threadfin/conf -v /opt/threadfin/temp:/tmp/threadfin fyb3roptik/threadfin

  • Set TZ to your own time zone so scheduled updates run at the hours you expect.
  • The conf folder holds your settings and mapping, so back it up.
  • PUID and PGID variables set the user that owns the files, if your system needs that.

Open the web interface at http://192.168.1.20:34400/web/, using the computer's network address rather than localhost if Plex runs elsewhere.

Step 2: add the playlist and the guide

  1. In Settings, set EPG Source to XEPG. In this mode Threadfin produces the guide itself, which you need for mapping and for the guide file Plex reads.
  2. Set Number of tuners to the number of connections your plan allows, or fewer.
  3. In Playlist, click New, choose M3U, and paste the M3U link. The Tuner / Streams limit per playlist applies only when the stream buffer is on.
  4. In XMLTV, click New and paste the guide address, for example http://example-server.com:8080/xmltv.php?username=username&password=password. The file must be UTF-8.
  5. Under Schedule for updating, choose the hours when Threadfin reloads both files, and enable updates at startup if you like.

The playlist overview shows the percentage of entries with a group-title, a tvg-id and a unique ID. Low tvg-id coverage means more manual mapping later.

Step 3: filter and map channels

Keep the lineup to what you actually watch. A smaller lineup maps faster in Plex, loads a lighter guide and keeps the channel list usable.

  1. In Filter, add a group filter for each group-title you want. Include and Exclude take comma-separated words that must or must not appear in the channel name, and a case-sensitive option is available. Be careful with broad exclude words: a very short word can remove most of the list.
  2. In Mapping, check which channels are active. Only active channels are passed to Plex.
  3. Channels whose tvg-id equals a guide channel ID are matched automatically. For the rest, open the channel and choose the XMLTV File and XMLTV Channel, then activate it.
  4. For channels with no guide data, use the dummy guide option, which fills the coming days with placeholder blocks named after the channel.
  5. Adjust numbers, names and logos as needed. New channels are numbered from 1000 upwards by default, and the map editor can renumber a selection from any starting number. Bulk edit applies one change to many channels.
  6. Click Save. Threadfin then writes the tuner lineup, threadfin.xml and threadfin.m3u.

Step 4: set the stream buffer

The Stream Buffer setting chooses FFmpeg or VLC to fetch streams on Plex's behalf. Threadfin removed its own older buffer, and the default FFmpeg options only remux, without re-encoding. A buffer is off by default, but it is worth turning on with Plex:

  • Threadfin buffers HLS sources, so Plex receives one continuous stream instead of a playlist of short segments.
  • With the buffer on, Threadfin enforces the per-playlist stream limit, so Plex can't open more streams than your plan allows.
  • The xTeVe documentation describes the buffer sharing one provider connection among several clients watching the same channel.

Two more settings in the same section help: Timeout for new client connections adds a short wait before a new connection, which helps with fast channel switching, and User Agent sets the user agent sent to the provider.

Step 5: add Threadfin to Plex

  1. In Plex Web, open Settings > Live TV & DVR and click the DVR setup button.
  2. If Threadfin isn't listed, use the option to enter the device's network address manually: 192.168.1.20:34400.
  3. Choose a signal type and country. When you supply your own guide, any available country will do.
  4. On the guide screen, use the XMLTV link and enter http://192.168.1.20:34400/xmltv/threadfin.xml. xTeVe's documentation notes that Plex doesn't accept the compressed .gz version.
  5. Review the channel mapping, untick anything you don't want, and continue.
  6. Wait while Plex downloads the guide. Live TV then appears in the Plex apps.

If you already have a DVR set up with Plex's own guide, the Plex article on XMLTV says to delete it first and run the setup again with the XMLTV option.

When something goes wrong

  • Plex doesn't find the tuner: enter the address manually, use the LAN address rather than localhost or 127.0.0.1 when Plex runs in another container or on another machine, and check that port 34400 is open in the firewall.
  • A channel won't tune: all tuners may be busy, or your plan's connection limit is reached by other devices. Test the stream address in VLC; if it fails there too, the stream itself is down.
  • Playback starts, then stalls after a few seconds: turn on the FFmpeg buffer if it is off.
  • Some channels have no guide: they aren't active in Threadfin's mapping, have no XMLTV channel assigned, or need the dummy guide. Save in Threadfin, then refresh the guide in Plex.
  • Guide times are off: check TZ in the container and the offsets in the guide itself. The XMLTV troubleshooting article in the Setup and help section covers offsets in depth.
  • Channels disappear after the provider changes its list: let Threadfin's scheduled update run, re-check the mapping, and save so Plex gets the new lineup.

Connection-limit errors when several people watch at once are covered in the community's discussions of that error; the community is also the place to share a working Threadfin setup.

Keeping the setup healthy

  • Back up the conf folder before updates. Your filters and mapping live there, and rebuilding a large mapping by hand takes time.
  • Update deliberately. Pull the new image, restart the container and check one channel and the guide. Read the release notes first, because a release can change how Threadfin caches the playlist and guide or how a setting behaves.
  • Reuse the lineup elsewhere. Threadfin's M3U output at http://192.168.1.20:34400/m3u/threadfin.m3u gives other players, such as VLC or Kodi, the same filtered and mapped channels. It is available in XEPG mode.
  • Protect access. Threadfin can require a login for the web interface and, separately, for the Plex tuner, the M3U and XMLTV files and the API. When the file logins are on, the username and password are added to those addresses as query parameters. Keep Threadfin on your home network rather than exposing it to the internet.

Alternatives to Threadfin

Dispatcharr is a newer open-source manager for IPTV streams and guide data. It also emulates HDHomeRun tuners for Plex, Emby and Jellyfin, accepts M3U and Xtream Codes sources, reads XMLTV and Schedules Direct guides, and can switch to a backup stream when one fails. It runs in Docker, by default on port 9191. If you already run Tvheadend, you can also feed its playlist and guide into Threadfin and keep Tvheadend as the single connection to your provider.

Sources and further reading

0 replies

0 replies

Log in with the account you ordered with to reply and vote.Log in
Chat on WhatsApp