Project

General

Profile

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

Added by G Kazaroth about 4 years ago

Cabernet for (Cable Network) version 0.9.12 (4/13/2023)
TVGuide, DaddyLive, PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex

Provides a configurable interface from providers to TVHeadend.

  • Direct streaming plugins for DaddyLive, PlutoTV, XUMO
  • EPG supplemented using TVGuide.com data
  • M3U Plugin provides channels for: SamsungTVPlus, Plex, PBS, Stirr, and others
  • From: https://i.mjh.nz/
  • Import your own M3U file

https://github.com/cabernetwork/cabernet/releases
Purpose is to get a service that will take the DaddyLive, PlutoTV or XUMO server stream, clean it and feed it into TVHeadend and other DVRs (Also tested on Emby, JellyFin and Plex). Also it runs on Linux, Windows as a service and Docker. Windows has a installer. Once installed, setup is easy with TVHeadend. Also includes a TVGuide.com plugin to obtain TVGuide data.

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 (960)

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Lisa White over 2 years ago

Hey guys,

FYI-- For those of you that have problems with USTVgo using cabernet, try a program on git made by benmoose39. Its called: benmoose39/ustvgo_to_m3u. Follow directions and load into TVH. There is minimal buffering with this and it loads into kodi within 4 seconds when using the TVH addon. Hope it works out for some of you. Not bad for freeware.

~Lisa

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Cure Cinnamon over 2 years ago

Mark de Leon wrote:

I am by no means a noob , but nor am I a dev. I hate Python it never works for me and always needs a dependency that can not be installed. To me it has always been a major waste of time. I would love to just run this on the pi from a python command line but that does not work either.

To be honest, the settings are so touchy in the Windows version changing most anything breaks it. That is no exaggeration.

Fixing the bind address from 0.0.0.0 in GUI to the real LAN fixed IP causes Cabernet to fail completely. I did find the config files (and you are correct the installer does ask where to put them) and deleted them to do a "clean" install. Before I did this I also confirmed that the bind address was correct. This all led me to the more problems below. Sometimes even reverting the settings to their original settings did not work, forcing me to remove the program then the settings folder and re-install. I think it might be best to have full explanation of what options are used or can be used.

Enabling the option you suggested does not work, the streams still stutter then freeze (burp then BARF) when I tested streams from VLC. I also tested some from NextPVR which would not play at all I would use TV headend but it has issues with probing for many of my important sources.

I also tested resync types "internal" "ffmpeg" and "default" although at default it always went back to "internal" . I did reboot after each change.

I also even tried Docker Desktop for Windows and Mac along the way. I suppose that too could have buggered the Windows machine. Unfortunately there are no real full instructions neither at docker nor on your site. There is a Docker Desktop tutorial but it does not even use the same docker command that is the single "pull" command you show on Github. I got lost in translation from what they say and what you say. I ended up with docker images that would not run so it might be nice to have more docs there.

XUmo never worked to any degree, (no channels ever in m3u files) and I have seen nowhere that says what I need to put (exactly) in the config.ini to make xumo work. I mean even if I could get xumo out of it, it would be worth the time spent.

Another issue that arose in the installation , and re-installation of Cabernet is that My windows 10 Machine has now completely lost its ability to switch windows. I can ALT Tab and see a window open, I can click an icon to open a new window but can never get to it. This is a relatively clean install of Windows 10 that I have only really used to run XAMPP web server on for a php code project of my own.

I think you also might want to to tell windows users to open ports 6077 and 5004 on their Windows Firewall.

The implication here is that this does work with TV headend but I would imagine you are not stuck with TV Headend 4.2 nor the Windows version of Cabernet. I am stuck with TVHeadend4.2 because my Pi is running Raspbian Stretch and will not install all dependencies for TVH 4.3 so I used the .deb installer for Pi. It just hammers the sources when scanning, causing all channels to fail.

Guess ill have to give up on this one as I have tried WIndows, Mac and Linux and two different ways of doing it on Windows and two on Linux. None of which seem to work for me. Even when it does run (Windows exe) the stuttering and freezing is not fixed.

Now I have the nightmare of fixing my Windows Machine as it is my only Windows Machine.

Hi, this has been an useful tip, but when I try to use no filtering and syncing, the program pauses and resumes when the ads end as expected, but the audio es replaced by the audio of the ads of the previous ad break. I'm using jellyfin as a player, I've been trying to get pluto TV to work properly for a while now.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sean Micklem about 2 years ago

I suspect I already know the answer but would it be possible to use Puffer (https://puffer.stanford.edu/) as a source for Cabernet? I know it would not be a reliable source because it's limited to 500 viewers at a time, but its big problem right now is that first you have to log in (they only ask you to create a username and password, so not gathering personal info) and then you can try to play one of the streams, in theory if there are currently less than 500 users it will start sending a stream to you. And it says on their site, "Puffer works well in the Chrome, Firefox, Edge, and Opera browsers, on a computer or an Android phone or tablet. Puffer does not work on iPhones or iPads or in the Safari browser." So that is what you are dealing with, which is why I don't have high hopes. But it is the closest legal alternative I have seen to Locast. I would not put a LOT of time and effort into it because it's an "experiment" that could be discontinued at any time.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Lisa White about 2 years ago

Is USTVGO still working with cabernet? If so, can someone post their config.ini

Thank you,
Lisa

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Ron L about 2 years ago

Yes. For the most part. There are some channels that don't work outside the USA without VPN.

The first 3 lines are all you need to add manually. The rest gets added by cabernet. I've found you need to restart cabernet service afer config change, then after channels scan or any database deletions.

[ustvgo_default]
label = USTVGO Instance
enabled = True
epg-min_refresh_rate = 3600

[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 = XXXXXXXXXXXXXXXXXXXXXXXXXXXX

[hdhomerun]
hdhr_id = XXXXXXXXXXXXXXXXXXXXXXXX

[display]
display_level = 3-Advanced

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Lisa White about 2 years ago

Thanks Ron. I still cannot get this going. It use to work. What version of cabernet are your running? These are my errors:

$ python3 tvh_main.py
2022-11-05 18:55:58,609-WARNING:main #########################################
2022-11-05 18:55:58,609-WARNING:main MIT License, Copyright (C) 2021 ROCKY4546
Process Process-1:
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/me/cab/cab/lib/clients/web_admin.py", line 234, in start
WebAdminHttpHandler.start_httpserver(
File "/home/me/cab/cab/lib/clients/web_handler.py", line 201, in start_httpserver
server_socket.bind((_plugins.config_obj.data['web']['bind_ip'], _port))
OSError: [Errno 98] Address already in use
Process Process-2:
Traceback (most recent call last):
File "/usr/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/usr/lib/python3.8/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/me/cab/cab/lib/clients/web_tuner.py", line 304, in start
TunerHttpHandler.start_httpserver(
File "/home/me/cab/cab/lib/clients/web_handler.py", line 201, in start_httpserver
server_socket.bind((_plugins.config_obj.data['web']['bind_ip'], _port))
OSError: [Errno 98] Address already in use

Thoughts?
Thanks
Lisa

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

It's trying to start a web portal process when there is already one running. This can occur for two reasons. Either you already have the product running and you are trying to run another instance, or you tried stopping/restarting the product and it did not shutdown correctly, leaving a process dangling. It is very rare that a process becomes dangling, but it can happen. You can easily check to see if process are still around with the ps command grep with python3. If you do find a process hanging, then you can easily kill it with kill normally or kill -9. Once all Cabernet processes are down, you can try starting it again.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Dan Schmidt about 2 years ago

First of all - thank you so much for the project, I have enjoyed it!

My issue:

My tuners all seem to get "stuck on."

2022-11-22 09:59:30,061-WARNING:stream All tuners already in use [PlutoTV][default]  

This is new - didn't seem to have this issue before. (I use the development builds from the Debian channel) Ctrl-c to kill tvh_main.py, and the processes keep running. Restart tvheadend - no difference. Have to killall phthon3 before I can launch it again. Anybody else having this issue? Thkx

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

I'm back. Looks like we have a number of issues in Github. Will try to work through those today. As for the PlutoTV tuner issue, some people do have this issue, but we have yet to get enough info to fix it. Here is the link to the issue.
https://github.com/cabernetwork/cabernet/issues/14
Temporary workaround for the issue. First, increase the number of tuners available in Cabernet under the PlutoTV settings tab. Additionally, you can also schedule Cabernet to periodically restart by setting a scheduled task in
Scheduled Tasks > Applications > Restart
Something like once a week might be what is needed.

Also working on a number of fixes, so stay tuned.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Dan Schmidt about 2 years ago

Excellent, thanks! Another question for the group:

Anybody made a good startup script to launch tvh_main.py?

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Dan Schmidt about 2 years ago

I should have looked harder, thanks Ron.

I'll offer my meager two cents for others thinking to try this project: It did not work well on my LibreElec Pi 2 & 3. Rewind/resume did not work unless trans-coded first. A lightning storm fried them so I switched to hacked chromeboxes which fixed this issue quite nicely and was cheaper than Pi.

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

Nice to see that cabernet.service file. Looks way better than the one I wrote to get my setup working as a service, Kind of a double coincidence, I just had ustvgo working again and the very next day, gone for good it seems. Oh well. The idea of it was always more satisfying than actually trying to watch it with all the buffering.

I have been reinstalling. This time I got the docker container installed but for some reason could never quite get it to actually work. That is when I decided running cabernet as a service on the host was probably easier than learning more about docker.

This time i have been switching back and forth between tvheadend and nextpvr. tvheadend def seems to be more robust but I like the way nextpvr fetches fanart and such, and how it is displayed in the arctic horizon skin. However, nextpvr seems to totally fail playing VOD. I love being able to start many things after the actual start time. But it seems like when it gets to the time where the next movie would start nextpvr stops playing the movie. It just quits. I'm not sure if anybody has a workaround or solution for this. I suppose I will be asking about it in the nextpvr forum.

The other thing that is more of a cabernet thing is how I don't like seeing channel numbers twice. One for the kodi interface and one which cabernet includes with the stream title. I'm sure this has something to do with the epg, because any time I turn it off I can't seem to get the epg data to sync up. I did come up with a work around using xteve. It involves mapping the channels in xteve and then renaming them, removing the number. cabernet ---> xteve ---> tvheadend. It's a big kludge but was the only thing I could think of. It would be easier I suppose to just accept the double numbers. But I got a hard head.

So two question...

1. has anybody figured out how to use nextpvr and have VOD work?

2. how about those numbers? Is it possible to turn them off and avoid my kludge with xteve?

Thanks again for Cabernet. I really enjoy using it. Sometimes I just want to put something on and many of the channels are well curated.

Cheers,
John T

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

Looks like USTVGO is no more. Will need to pick a new plugin to replace it. Best if it was not a subscription based provider.

Also for John. The numbers can be removed through the settings. Just increase the settings view and it should appear. The reason I had is default on is that I have many Comet stations all with the name Comet and it was hard to tell which one was which and I did not want them multiplexed. That is really no longer the case, so will probably make is default to off.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Martin Runneals almost 2 years ago

I see at the link https://i.mjh.nz/ in the /frndly_tv/ folder there is a app.json file and app.json.gz file. how are these uses? This looks the channels I want. Hallmark, decades and hereos and icons. I don't see m3u files in some of the folders does the app.json somehow replace the m3u file?.

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

frndly tv is a subscription service which costs a minimum of $6.99 a month. The json only provides the channel list and not any info as to how to connect, so it won't be effective using it. So, in short, it would not work to use the json even if a plugin was available.

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

To John on VOD. What VOD does different from regular streams is that VOD has the entire movie or show ready from the provider at the start. Cabernet queues it up and will send the stream as fast as the DVR requests it. For TVH, it will squelch the stream after a short buffer. VLC also squelches the stream. I have used the Linux WGET command to pull the entire contents and it does not squelch. A two hour movie takes about 3 minutes to download using WGET from Cabernet with my internet.

If you turn on logging to Info or Notice, you will see the rate at which 6 second packets are being sent to the DVR. That along with the NextPVR log should give you info as to what is happening.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Robert Coupee almost 2 years ago

Hi

Can you provide details of how you do a WGET? What url do you do use?

Thanks.

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

Here is what I do. This will be for the XUMO provider. First, the VOD channels are listed in the Channel Editor on the last column. Just filter to VOD. Next to get the channel URLs, you can use the channels.m3u or lineup.json based on the format you like. For me, I will use the channels.m3u. The URL is http://IPADDRESS:6077/xumo/channels.m3u
Place results in an editor and under each #EXTINF: is a URL for that channel. The channel name is on the end. I pick the "The Johnny Carson Show" with a URL of
http://IPADDRESS:5004/XUMO/watch/99991157
Now to request the stream using WGET.

wget -O tmp.ts http://IPADDRESS:5004/XUMO/watch/99991157

The display will show you are getting data downloaded to the file from Cabernet. This will continue for about 1-2 minutes and then the data rate will fall to "--.-KB/s". When this happens, the file has been downloaded. You can CTRL-C out of the wget command and use the file. The file for this show is about 45 minutes and about 250MB. VLC opens it no matter what the trailer is on the file...

A Cabernet update with USTVGO removed should be out soon. The new plugin info will be tracked under issue:
https://github.com/cabernetwork/cabernet/issues/35

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

0.9.7.6 released.
It will run with USTVGO cached data, but some cleanup would be helpful after the update.
  1. Edit config.ini and remove any ustvgo sections
  2. Remove the folder provider_video_ustvgo from the plugins folder and all its contents
  3. From the 6077 website, go to Data Mgmt
  4. Within Delete Instance, go to the pull down and select each USTVGO instance and click Delete
  5. Within Reset Scheduler Tasks, go to the pull down and select USTVGO then click Reset
  6. restart Cabernet

If this is too complex, I could add a script to go through and do this during the updates; however, I found file permissions may make it difficult to remove all USTVGO files.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Dan Schmidt almost 2 years ago

Quick yes/no - Does the EPG still come from https://i.mjh.nz/PlutoTV/? (If so, I really should buy the guy a coffee)

RE: PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth almost 2 years ago

EPG for the PlutoTV plugin comes from PlutoTV and not from a foreign website.

RE: PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Dan Schmidt almost 2 years ago

Thkx & let me know if U put up "buy me a coffee/beer" page

RE: PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by G Kazaroth almost 2 years ago

0.9.8.0 Added 123TV plugin
The release notes indicate the details on how best to add the plugin and other information. In general, the channels are working fairly good. EPG data is iffy on some of the channels, so a default set of EPG is currently being used...
This plugin is using the tvguide data to some degree. I have some ideas on creating a EPG plugin enhancement. stay tuned for that.

RE: PlutoTV, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by john tocher almost 2 years ago

Very nice. Thank you. Setting it up. Some work better than others but that was expected. Very handy.

(626-650/960)