Project

General

Profile

PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance)

Added by G Kazaroth over 1 year ago

Cabernet for (Cable Network) version 0.9.7 (2/16/2022)
PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex

Provides a configurable interface from providers to TVHeadend.

  • Direct plugin for USTVGO, PlutoTV, XUMO
  • M3U Plugin provides channels for: SamsungTVPlus, Plex, Binge, DStv, Foxtel, Kayo, Optus, PBS, Singtel, SkyGo, SkySportsNow, Stirr, and others
  • From: https://i.mjh.nz/
  • Import your own M3U file

https://github.com/cabernetwork/cabernet/releases
Working on getting a service that will take the PlutoTV or XUMO server stream, clean it and feed it into TVHeadend and other DVRs (Also tested on Emby, JellyFin and Plex). It works on the subscription and free versions. Also it runs on Linux and Windows as a service. Windows has a installer. Once installed, setup is easy with TVHeadend.
1) Setup the automatic IPTV network (recommend new URL is http://[host]:6077/PlutoTV/channels.m3u)

Make sure to set the "Maximum # input streams". PlutoTV is set to a max of 4 and tvheadend uses 2 per tuner during initial screening. Doing a force scan will create the mux and service values. Also, turn View level to Advanced and set the Re-fetch period (mins) to a very large number. TVheadend has a tenancy to cause issues when channels change (Changed Services will not be mapped to channels). The Maximum Timeout is used to wait for a reply during a Forced scan. Recommend keep this low, like 15-20 seconds. Some of the channels may fail, but it is faster than having a high setting and waiting for all channels to scan. Just individually rescan those that failed by setting each mux back to PEND from IDLE.
2) Next you can setup the grabber. I use a URL grabber written in Unix bash and is an extremely small file. It can be found in the github repo at
https://github.com/cabernetwork/cabernet/tree/master/lib/tvheadend/service/Unix called tv_grab_url
Place the grabber file in the same location as the other TVHeadend tv_grab* files, change the permissions to executable and restart TVHeadend. This should allow TVHeadend to pickup the new grabber. While in the grabber list, make sure and disable any OTA grabbers. Stations no longer send this information and will only cause TVHeadend to use a tuner for scanning. Displaying the log window by clicking the three ^ in the bottom right is helpful at this time.

Have the grabber run and populate the EPG data into the EPG Grabber Channels tab. The log should show a quantity of channels were detected.
Pop over to the EPG Grabber tab and disable the OTA grabber cron. Also, update/replace the Internal grabber cron schedule using something like below. The example will pull the TV guide at 6:04am and 5:52pm. Add more if you need. It is recommended to use static cron times.

4 6 * * *
52 17 * * *

3) In the Channel view, select Map all channels.

This will tie the services, EPG and channels together, automatically. After this, re-grab the EPG data. This will populate the EPG tab with shows. For TVH version 4.3, the Number column will auto-populate. For TVH 4.2, you will need to manually add channel numbers.
4) Display the TVGUIDE. This appliance has special features which maps the tvheadend genre, giving colors on tvguides. It also has enhanced guide descriptions and optional additional channel notations if you use many streams. Below is the Kodi tvguide using the pvr.hts plugin.

For Kodi, go to the settings for PVR and turn on the General setting "Use channel numbers from backend".


Replies (753)

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Chicken Dinner 4 months ago

Got it installed on my Pi 4 - the install instructions are like another language for those who are codingly challenged like myself. Some of the instructions are in the cabernet github and some in the old locast github.

I have somehow managed to get it installed and USTVGO is working but I keep getting this error with PlutoTV -

DEBUG:plugin_obj Initializing plugin PlutoTV
PlutoTV HTTP Channel Request Failed for instance default
DEBUG:plugin_obj Setting plugin PlutoTV to disabled

I can play the m3u8 fine from https://i.mjh.nz/PlutoTV/ in VLC fine.

My config.ini is as follows:


[plutotv_default]
label = PlutoTV Instance
enabled = True

[ustvgo_test]
label = USTVGO Test
enabled = True

....

Not sure what the issue might be? Does anyone have any ideas.

Thanks

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 4 months ago

Hi Chicken,
Not sure why the channel request failed. There should have been some log lines prior what you stated that indicate why the HTTP channel list request failed. If the plugin cannot initialize, it will automatically be disabled. Try to look further up the log and see what you find.

Although not related to the issue, you will need to change the config settings. Go to the website on your box at port 6077 and add the following settings:

Import Channel Groups: unchecked
Enable URL Filtering: true
Enable PTS/DTS Resync: true

I do plan in the near future to change the default settings to these so people do not have to make the changes manually. On USTVGO, I also recommend
Enable PTS/DTS Resync: true

By enabling the Enable PTS/DTS Resync setting, Cabernet will cleanup stream timestamps between shows to be consistent when they are way off.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by TJ M 4 months ago

I appear to also be experiencing the issue ChickenDinner is referring to.
Pluto is just saying Request Failed for instance default.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 4 months ago

I will do some debugging and see if I can find something. Thanks for letting me know.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 4 months ago

Code is indicating that PlutoTV is not responding to a request for the list of channels. From a browser, try to go to the URL
https://api.pluto.tv/v2/channels.json
and see if you get a good json response. When I hit it, it gave me 352 items. The code says that one of the following was true:
  1. The json text received was not valid (the browser would also say this)
  2. The length of json data was zero/none
  3. An HTTP error occurred when requesting the URL

It might also be a good idea to try this within the environment you are running Cabernet, to see if you have a network issue.

The interesting part is Cabernet checks for HTTP and JSON errors and would have logged something. It also did not timeout the connection due to no response, so my best guess is the connection came back nicely with no data.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Chicken Dinner 4 months ago

G Kazaroth wrote:

Code is indicating that PlutoTV is not responding to a request for the list of channels. From a browser, try to go to the URL
https://api.pluto.tv/v2/channels.json
and see if you get a good json response. When I hit it, it gave me 352 items. The code says that one of the following was true:
  1. The json text received was not valid (the browser would also say this)
  2. The length of json data was zero/none
  3. An HTTP error occurred when requesting the URL

It might also be a good idea to try this within the environment you are running Cabernet, to see if you have a network issue.

The interesting part is Cabernet checks for HTTP and JSON errors and would have logged something. It also did not timeout the connection due to no response, so my best guess is the connection came back nicely with no data.

Thanks

When I go to that address I get a blank page in the JSON tab but it seems as though it is a geo-blocking issue which I have never had before...not sure if they changed something recently but when I go to the PlutoTV website it now says We’re sorry, but Pluto TV is currently unavailable in your location. We’re working hard to bring Pluto TV to this area, so stay tuned to find out when.

I am not using a US server with my VPN which probably explains it.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 4 months ago

Since you stated the M3U file is working in VLC, you can try to add an M3U plugin and point to the M3U and XML files. The same configuration should work as the PlutoTV plugin. As an example, you can use
M3U: https://i.mjh.nz/PlutoTV/all.m3u8
EPG: https://i.mjh.nz/PlutoTV/all.xml.gz

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by john tocher 3 months ago

Having some trouble keeping epg data current for xumo. I see in my instance "EPG Min Refresh Rate" is set at 21600. I am assuming that is minutes and that makes it 360 hours.
Is that right? What value should I be using? Not sure how the xumo epg stuff works, concerned about setting it too low.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

There are two things that determine the refresh rate. As indicated by the popup on "EPG Min Refresh Rate", 21600 is in seconds and represents 6 hours. This is a blocking time that keeps Cabernet from constantly asking for an EPG update. As an example, if you have the EPG updated every 15 minutes, it won't make a different until 6 hours has past. If you reduce the minimum refresh rate, then it will refresh more often if you schedule it more often. The second part is the Scheduled Task for XUMO EPG. The default is to have it update once a day. Instead of changing the 6 hours minimum refresh, you can add or change the scheduled task to run more often. If 6 hours has past, then the update will happen.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by john tocher 3 months ago

Thank you. I had not noticed there were tool tips. It seems like the epg data for xumo is limited. It is set now for "Every 3 hours with random maximum added time of 10 minutes" and EPG Min Refresh Rate at 10800. Since last night. The timer though, doesn't seem to be running. When I got up this morning scheduled tasks said last run 11 hours ago. I have a cron job pulling epg data but epg data in cabernet only seems to update when I tell it to manually or when I restart the cabernet docker container.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

There may be a bug in the task reporting. I'll take a look. Chances are, the task is running and the logs would show that. I believe when I reviewed XUMO for updates, it only updated once a day in the evening, which is why the schedule is once a day.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by john tocher 3 months ago

I am not sure where the problem is. It's more usual to have barely any epg data displayed in the kodi epg. Or even none at all. It only populates when I run the scheduled task manually then run the epg fetch script for tvheadend. No worries. I still enjoy using it. It makes it more difficult to schedule recordings though. In that case I just watch something else. Thank you.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by john tocher 3 months ago

I restarted the docker container. Looking at the log just now I see epg is being triggered now. I'm not sure what is going on or if it is working. Will keep monitoring the log. But you say there is no point scheduling xumo to update more than once a day?
Thank you.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by TJ M 3 months ago

G Kazaroth wrote:

Since you stated the M3U file is working in VLC, you can try to add an M3U plugin and point to the M3U and XML files. The same configuration should work as the PlutoTV plugin. As an example, you can use
M3U: https://i.mjh.nz/PlutoTV/all.m3u8
EPG: https://i.mjh.nz/PlutoTV/all.xml.gz

Not sure how I go about adding an M3U plugin with those playlist/EPG URLs... any chance you can advise example config file please?

Thanks!

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

TJ M: Recommend just adding the basic to initialize the instance, then update the config settings in the web page. So, to add an instance, you could add the following to config.ini:

[m3u_plutotv]
label = M3U PlutoTV

Restart the app and the instance should show up. It will all be disabled at first to allow you to configure it. Make sure the plugin level is enabled (you will need to restart the app to accept the enable change, if not). The instance can be disabled while you make the changes, then enable the instance and restart the app.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

john: It may be a chicken and egg issue. It takes a while to update the EPG from XUMO into the database, so if TVH requests XUMO EPG before it is updated, you could be getting old data. This would look like no data is being provided. Check the logs; they will indicate when the EPG request is complete. (It will say at the INFO level "EPG update completed")

Next is the update rate. You can take a look at the XUMO EPG data from the provider and see when they publish new data. As an example, try the url
https://valencia-app-mds.xumo.com/v2/channels/channel/99991772/broadcast.json?hour=23
It will display a start time in seconds. Hop over to the URL
https://www.unixtimestamp.com/index.php
Which will display the current time in seconds.
What you want to do is run the xumo URL every hour until the timestamp changes. This will indicate the next 24 hours of data has been published. What Cabernet does is ... after the update, it will run a channel list update, wait about 1 hour, then do an EPG update.

Also, the pull script on TVH to request the EPG can timeout based on how much data is being requested. If you are using tv_grab_url, then go to the bottom of the file and make sure the -T option is big (like 3600).

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by TJ M 3 months ago

G Kazaroth wrote:

TJ M: Recommend just adding the basic to initialize the instance, then update the config settings in the web page. So, to add an instance, you could add the following to config.ini:

[m3u_plutotv]
label = M3U PlutoTV

Restart the app and the instance should show up. It will all be disabled at first to allow you to configure it. Make sure the plugin level is enabled (you will need to restart the app to accept the enable change, if not). The instance can be disabled while you make the changes, then enable the instance and restart the app.

Thanks, that all worked.

Now having another strange issue.. When I have tvh scanning my cabernet playlist it seems to just keep spawning new python.exe processes and they don't end by themselves either. Logs seem to indicate it has run out of tuners however I noticed on a quick look of some of the cabernet code that it talks about idle tuners... so in theory I take it I am experiencing some sort of a bug?

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by R W 3 months ago

Hello, I was wondering if someone can help me figure out my issue. I was able to install Cabernet using Docker on my Synology NAS. Cabernet runs fine, I am able to access the web page and change settings wioth no issues. My problem is that I don't understand what to do to use it on my Plex Server. I mostly want to be able to watch USTVGO using my Plex.

I added a config.ini file to data folder with this in it:

[plutotv_default]
label = PlutoTV Instance
enabled = True

[loggers]
keys = root

[logger_root]
level = DEBUG
handlers = loghandler

[handlers]
keys = loghandler, filehandler

[formatters]
keys = extend,simple

[handler_filehandler]
enabled = False
level = INFO
formatter = extend
class = lib.common.log_handlers.MPRotatingFileHandler
args = (os.getenv('LOGS_DIR','data/logs')+'/cabernet.log', 'a', 10000000, 10)

[handler_loghandler]
enabled = True
level = WARNING
class = StreamHandler
formatter = extend
args = (sys.stdout,)

[formatter_extend]
format = %(asctime)s-%(levelname)s:%(module)s %(message)s

[formatter_simple]
format = %(levelname)s:%(module)s %(message)s

[main]
uuid = D8D2A2C0-C948-11EC-B01F-0242AC110002

[hdhomerun]
hdhr_id = 105346B6

[ustvgo]
enabled = True

[m3u]
enabled = True

When I go to Plex Settings > Manage > Live TV & DVR and add the link to my channels.m3u, after it searches for channels I get this message:

No channels found. Make sure your device has a signal from your antenna and try scanning again.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

TJM: It is probably normal to have that many processes. This is caused by the number of tuners set at the plugin level. Each active stream will generate a new process. This helps with running many streams at one time. The more streams, the more processes it takes and is only limited by the size of your server.

When TVH does a force scan, it goes as fast as it can and uses two critical settings. First is the Network Max # input streams. This value causes TVH to use that number times 2 for the number of streams since it does not terminate the stream until after the next stream starts. The second value is Network Maximum timeout. This is the time TVH will use for each channel scan. It is not the maximum, but rather the actual value used. So if you have the input stream set to 5 and the timeout set to 30, then it will use at least 10 tuners in Cabernet and will timeout most channels after 30 seconds. If not all the M3U URLs are not working, then Cabernet may end up going through a timeout when may take even longer. Normally we recommend using a small number for the number of inputs like 2 to do a Force Scan. The timeout should be based on how long it takes for the stream to initialize (which can be different for each provider.) Note, Cabernet uses 3 processes by default, so it looks like you have TVH set to a big number of input streams with Cabernet set to around 12.

Then going to the Cabernet side, there is a tuner count at the plugin level. After doing many tests, it looks like that number needs to be at least x*2+1 of the # of inputs in TVH for that network. This is due to the number of streams TVH will have opened at one time. You could have TVH set to 2 and Cabernet set to 10. Cabernet would still probably only use 4 or 5 max.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

RW: My understanding is a recent change to Plex has restricted the use of HDHR simulators to be on the same ports as the original appliances. Last I checked, they had not released the update, so I have not tried the new changes. If they did do that, then Cabernet would need to move from port 6077 to port 80 and enable HDHR and possibly SSDP. Last time I did that, Plex did find the appliance and the channel list with it all enabled and the port moved. You can also not turn on SSDP and just change the port from 6077 to 80. If you do that, then you would need to enter the IP address manually into Plex. That should work, but you may also need to turn on HDHR in Cabernet.

I will run some tests and see what changes they have made. I also have HDHR appliances and Plex does find them.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by R W 3 months ago

I have something running on port 80 already so Im gonna have to figure out a workaround, maybe reverse proxy?

But also Plex runs on port 32400 and Cabernet on port 6077 so they're not in the same port.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by john tocher 3 months ago

It does just work on Jellyfin as an hdhomerun device.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

Plex 1.26.0.5715
Just be aware that no media server is implementing the full HDHR interface. Some use part of the UDP interfaces while others only use the TCP interfaces. Each one does something different. I have determined that I was able to run the channel setup and it worked fine. Looks like the restrictions are still not in place. This is what I did...
- Clicked: SET UP PLEX DVR
- Clicked: Don't see your HDH...
- Entered http://192.168.1.xxx:6077/PlutoTV
- Plex says "We found the hardware we recognize!"
- For the tuner, clicked SETUP DEVICE
- Says "Antenna", 305 channels, country: United States, Postal code is blank
- Clicked Have an XMLTV guide on your server
- Language is English, Guide is http://192.168.1.xxx:6077/PlutoTV/xmltv.xml, Guide Title is My Guide
- Clicked Continue
- 290 channels listed with associated EPG channels matched. Although not needed, tried rescan... it worked and again 290 channels matched.
- Clicked Continue
- Says "Downloading EPG data"
- After a bit, clicked VIEW GUIDE
- Some channels came up with "Unknown Airing", while others had guide data.
- Click on a channel and played. It worked fine no issues in Plex.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by R W 3 months ago

G Kazaroth: Im thinking my issue has to do with Cabernet not TVHeadend. In Cabernet settings > Channel Editor I don't see any channels even though in Providers I have PlutoTV and USTVGO enabled. There's something that's going over my head and can't figure out what I'm missing.

Also when I follow the guide the OP posted, in DVB Input > Networks I add Cabaret and clock on Force Scan put it just takes a split second and nothing changes, Muxes, Services, etc is all on 0.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth 3 months ago

Your config.ini file should be able to get the channel list, so we will need the log info to determine what is going on. If you turn on file log handler in the logging setting, it would start logging in cabernet/data/logs/
Restart the app and capture the log from startup. Take a look and the issue should be obvious why the plutotv plugin is getting disabled. Setting the log level to DEBUG will give more information.

Also, go to https://pluto.tv/ and see if you are in an area that plutotv supports.

(626-650/753)