Setting up IPTV with Plex
Setting up IPTV with Plex
So, you want to stream IPTV in Plex. Here is how you can do it.
Prerequisites
- At least a little bit of technical knowledge. You may want to use Docker or download and run a binary. You’ll have to configure some slightly technical settings, but it’s all pretty self-explanatory.
- You’ll need to spend $10-$20 a month for the best experience, but you’ll still save a lot overall.
- Plex Pass, which I think is required for TV/DVR functionality (maybe I’m wrong)
Caveats
- IPTV can be fickle. This setup may need updated somewhat regularly.
- If you have a hardware OTA TV device, like a physical HDHomerun device, you can’t use a custom XMLTV programming guide in Plex, it seems. You’ll have to remove it, then add it back in after this setup in this blog is done. But even then, you’ll have to provide a new XMLTV URL that matches your local OTA channels because Plex can’t support a Plex provided EPG plus a custom one, it seems (or something like this). With that said, you can probably find the OTA local channels in your new setup and get rid of the hardware device, but YMMV.
What are we going to do?
What we are going to do is to sign up for IPTV provider and an Electronic Program Guide (EPG) provider to get an M3U link, EPG link. Then, we will put this stuff in xTeVe. After that, we will plumb Plex up to xTeVe so you can watch TV in Plex with a programming guide and DVR.
This is how our setup looks in poorly executed ASCII format:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
IPTV Provider (Xtream API) Paid EPG (epg.best)
+-----------------------------+ +-------------------------+
| - Channel list (M3U/JSON) | | - Rich XMLTV EPG data |
| - Stream URLs | | - Accurate times, meta |
| - Basic XMLTV (optional) | | - Global coverage |
+--------------+--------------+ +------------+------------+
\ /
\ /
v v
+-------------------------------+
| xTeVe (local docker) |
| |
| - Imports Xtream channels |
| - Imports paid EPG XMLTV |
| - Maps tvg-id ↔ channel IDs |
| - Filters / renames lineup |
+---------------+---------------+
|
+----------------+----------------+
| |
v v
http://xteve:34400/m3u/xteve.m3u http://xteve:34400/xmltv/xteve.xml
\ /
\ /
v v
+-------------------------------+
| Plex DVR |
| - Uses xTeVe M3U as tuner |
| - Uses xTeVe XMLTV as guide |
| - Full Live TV + Recording |
+-------------------------------+
General Directions
- Navigate to privateiptvaccess.com and select your option from the list. I find the Family plan is the best bang for the buck. Select
Get this Plan
and note the number of devices you signed up for. You will need this later. - Create an account on the registration page you are directed to.
- Click order a new line and then pay for whatever you’re choosing via whatever method you want.
- Once ordering is complete, head back to your dashboard and your order should appear.
- Next, click on download in your order card, which will take you to a channel selection screen. This is where you will select the channels you want to stream, so go through all the options and select the ones you want. Do note that Plex only supports up to 480 channels, and another provider we will use will limit you also. When ready, click the
Smarter / Xtream Codes tab
where you will find a URL, username, and password. Stay on this page, and open another tab. - Now we need a better EPG. I use EPG.best and it has worked well for me. In another tab, navigate to that link and sign up for the plan of your choice. This should be less than $3 a month. After signing up, go to https://epg.best/m3u-editor/new and enter your xtream URL, username, and password from the previous tab I told you to keep open, click continue, and it’ll say
Your m3u file is being processed
. - Then, you’ll end up on a page similar to this, where you can edit channel groups. Select
Get EPG
for stuff you want and click save. - After that, you’ll be able to navigate to https://epg.best/channels, if not directed there automatically, and that page will contain and M3U link and an EPG link, which you will need later.
- Next, we need to use xTeVe to get everything compatible with Plex. We will point Plex at xTeve, which itself will contain our links we created at
EPG.best
. You can find xTeVe here https://github.com/xteve-project/xTeVe. I use the docker version with thisdocker-compose.yml
, but there are also binaries you can install.1 2 3 4 5 6 7 8 9 10 11 12 13
Services xteve: image: alturismo/xteve:latest container_name: xteve restart: unless-stopped ports: - "34400:34400" environment: - PUID=1000 - PGID=1000 - TZ=America/New_York volumes: - /home/user/xteve:/home/xteve/.xteve # update for your volumes as needed
- Put the above in a
docker-compose.yml
file, and run it from the same directory withdocker compose up xteve -d
. This assumes Docker and Docker Compose are installed, which is beyond the scope of this article, but easily Googleable/ChatGPT able. Some links are provided below. As mentioned, you can also install and run the binaries that are found on the GitHub page, but those options aren’t described here. - Once xTeVe is running, go to it in your web browser. Since I’m running mine on port 34400, I go here, using my server’s IP address
http://{serverIP}:34400/web/
. - Enter in the number of connections you previously noted for
Number of tuners
. SelectXEPG
for EPG source. Click next, then enter in your M3U playlist URL you noted on https://epg.best/channels , and click next. Then, on the XMLTV file page, enter your EPG URL that is also on the https://epg.best/channels page, and click next. - After that, you should end up on the xTeve landing page.
- Here is where it can get confusing. Not all of your channels will be properly mapped. From the
Mapping
tab on the left side of the xTeVe web page, you can see what channels are mapped. For the best experience, you need to go through this, upload logos, change mappings, etc. You can even go to theXMLTV
tab on the left and upload another XMLTV file that will allow you to map more more channels. When you click on a channel, aMapping
popup will allow you to edit each entry. - In the edit popup, for the XMLTV File field, your uploaded/connected XMLTV files should be shown, which once populated, will allow you to edit the XMLTV Channel field to assign a channel. You can go back to the privateiptvaccess.com page and get another XMLTV link from the downloads page, too. This will give you more options to select from.
- A real pro tip would be to download the EPG, then manually edit it in a text editor to only include the channels you want, then upload it to xTeVe, or else in xTeVe you’ll have a giant list to sort though in a poorly designed UIUX dropdown.
- Once all that is done, then in Plex, go to your server settings > Manage > Live TV & DVR and select
Set Up Plex Tuner
. Enter the server IP:PORT viaenter its network addrss manually
if you xTeVe instance doesn’t show up, and click connect. Your tuner should show up. Click on the tuner where it saysSetup Device
. - Click on
Have an XMLTV guide...
and in the resulting page where it saysXMLTV Guide
put the XMLTV link from xTeVehttp://{serverIP}:34400/xmltv/xteve.xml
.
- On the next page, ensure everything matches up. If it doesn’t you’ll have to manually change things. But with this setup, it should be pretty good.
- That’s that. You’re setup. Good luck.
References
General Guide
https://www.rapidseedbox.com/blog/guide-to-xteve
If you need assistance installing Docker and Docker Compose
https://docs.docker.com/desktop/setup/install/windows-install/
https://docs.docker.com/compose/install/
https://tomerklein.dev/step-by-step-tutorial-installing-docker-and-docker-compose-on-ubuntu-a98a1b7aaed0
This post is licensed under CC BY 4.0 by the author.