Project

General

Profile

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

Added by G Kazaroth about 1 year ago

Cabernet for (Cable Network) version 0.9.5 (10/22/2021)
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, SparkSport, 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 (589)

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

Yes, I think it is best to follow my suggested commands to nuke entware and start again. I suggest you try to run cabernet before you install python3-pip or use any pip or pip3 commands.

Do me a favor and post the results of the following commands before you nuke your environment

opkg list-installed
pip list
echo "from cryptography.hazmat.bindings._openssl import ffi, lib"|python3

Then after you nuke entware and install entware, ffmpeg and python3-cryptography run these commands and post the results as well

opkg list-installed
echo "from cryptography.hazmat.bindings._openssl import ffi, lib"|python3

If the echo/python3 command does not produce an error give cabernet a go and see if it works.

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

Sorry, I nuked it before I fully read your message. But here is the after information:

CoreELEC:~ # opkg list-installed
ca-certificates - 20210119-1
entware-opt - 227000-3
entware-release - 1.0-2
entware-upgrade - 1.0-1
findutils - 4.8.0-1
grep - 3.6-1a
libbz2 - 1.0.8-1a
libc - 2.27-11
libffi - 3.4.2-1
libgcc - 8.4.0-11
libopenssl - 1.1.1k-1
libpcre - 8.45-1
libpthread - 2.27-11
libpython3 - 3.9.6-2
librt - 2.27-11
libssp - 8.4.0-11
libstdcpp - 8.4.0-11
libtirpc - 1.3.2-1
libuuid - 2.37-1
locales - 2.27-9
opkg - 2021-06-13-1bf042dd-1
python3-base - 3.9.6-2
python3-cffi - 1.14.6-1
python3-cryptography - 3.4.7-1
python3-email - 3.9.6-2
python3-light - 3.9.6-2
python3-openssl - 3.9.6-2
python3-ply - 3.11-2
python3-pycparser - 2.20-5
python3-six - 1.16.0-1
python3-urllib - 3.9.6-2
terminfo - 6.2-2a
zlib - 1.2.11-3
zoneinfo-asia - 2021a-1
zoneinfo-europe - 2021a-1

Echo didn't return anything:

CoreELEC:~ # echo "from cryptography.hazmat.bindings._openssl import ffi, lib"|python3
CoreELEC:~ #

The Cabernet web page won't open. I didn't install pip.

Below is the output from the tvheadend-locast.log:

Traceback (most recent call last):
File "/storage/tvheadend-locast/tvh_main.py", line 10, in <module>
from lib import main
File "/storage/tvheadend-locast/lib/main.py", line 21, in <module>
import logging
ModuleNotFoundError: No module named 'logging'

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

Install pip but do not run any 'pip install' commands. Run this:

opkg install python3-pip

test that logging is installed by running the following. You should not get an error

echo "import logging" |python3

If you do not get an error then go ahead and try cabernet again.

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

Did the above and did not get an error. Cabernet did not respond but I didn't reboot the system (my wife is watching TV).
I'll try rebooting tomorrow.

Thanks for your help!

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

my window to help has closed for the evening too.... my wife is also watching tv. :)

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

The restart allowed me to access Cabrnet.
I did a Force Scan and am up to and am up to 124 mapped services. If I change the Scan status from IDLE to PEND on a failed scan sometimes the result will be OK, other times it will fail again. It seems if I repeat enough times it will eventually get to OK. The services will play after obtaining the OK status.

I do see warnings in the log about all tuners in use and something about webhandler. I've attached my latest cabernet.log.

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

that log is the one you posted yesterday....

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

Sorry, I have to copy my log to a transfer folder that I can access using the Choose Files button. I forgot to copy...

This one should be correct.

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

Looks like your CoreELEC problems are solved.

As for the warnings, G Kazaroth is the expert on that.

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

Yes, CoreELEC/Python3 seems to be working correctly. Thanks for your help @C Island!

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

Island,
If you want to add some info into the lib/tvheadend/service/CoreELEC folder regarding the info provided above, please create a PR.

Sterling,
The log looks perfect with no issues. We are limited to the provider quality, so things can happen. Here are some things you should know.

  1. If you have URL Filtering turned on, then when a stream comes in with that URL, NO DATA is sent to TVH. So, during a forced scan you can get a percentage of channels failing due to the channel being on a URL that is being filtered. You can see it in the DEBUG log as a "Filtered" message. If you wait about 2-3 minutes and try again, most of the time it will be successful.
  2. Provider's software sometimes does not work well with lots of tuners at the same time. If you have the tuners set to 3 or more, expect some of the channels to fail due to provider 503 Server errors or 404 Not Found errors (meaning they are busy at the moment). We try to keep this down by doing multiple tries, but that sometimes fails. Sean changes TVH to use 1 tuner at a time during rescan to keep this issue to a minimum. I find 2 mostly works.
  3. The number of tuners TVH uses during a rescan can be much more than you think. If you set the number of tuners in TVH to 2 and do a forced scan, I have seen Cabernet use as many as 5 tuners at one time based on when TVH says it is done with the channel. Basically, I normally think the number of tuners in Cabernet should be 2 times the number in TVH tuners plus 1. During normal usage, this is not as big a deal. As an example, changing channels with TVH will use 2 tuners. So, review the number of tuners used by TVH and Cabernet, and adjust, accordingly. Otherwise, you may get no tuner available warnings.
  4. Finally, there are times when you get channels from a provider and some of the channels will just not work. The log normally will indicate what happened. As an example, if the channel is DRM-based, we do not support that.

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

OK, I feel a little stupid here, I can't find where to set the number of tuners for an Network scan in TVH. Is that the same as the Maximum number of input streams?

Is there a global way to change IDLE to PEND, or is it better to just repeat a Force scan until I got down to a minimal number of failed Muxes?

Thanks

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

Sterling Rorden wrote:

OK, I feel a little stupid here, I can't find where to set the number of tuners for an Network scan in TVH. Is that the same as the Maximum number of input streams?

Yes.

Is there a global way to change IDLE to PEND, or is it better to just repeat a Force scan until I got down to a minimal number of failed Muxes?

No global way to do it that I have found; this is my #1 complaint about Tvheadend. Not just that setting, but there are several where I don't want the default setting and you have to change every single Channel/Mux/Service etc. using those damn inconvenient dropdowns manually - they could not have possibly made it more time consuming and tedious. As for Force Scan, in my experience that basically starts over from scratch so if you already had most of your channels scanned, it might fail several of them when it rescans (although I don't think that prevents them from working). I wish there were a way to ONLY force rescan the failed muxes but if there is I sure haven't found it.

Tvheadend is a really great program with a (at times) lousy user interface. Fortunately once you have set muxes, services and channels the way you want them you probably won't have to change them again, but every time I have added a new group of muxes it has taken me considerable time to get them set up the way I want them. I wish you could export the settings for each page to a CSV file or something similar, so you could use a CSV editor or other appropriate editor to make changes to certain settings en masse , but I am not holding my breath.

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

Try this.
In TVH Muxes Tab,
  1. Filter Scan Status to a 0
  2. Sort table by Scan result
  3. With shift key, select all rows that have FAILED
  4. Click Edit
  5. On the Scan status line, check the checkbox on the left
  6. Change the status to PEND and click Save

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sterling Rorden 2 months ago

I've sort of asked this question before but didn't get an answer.

When I use the PlutoTV Kodi addon by Lunatixz many of the programs listed in the EPG are available as On Demand. With the program highlighted in the EPG, I do a long press of the select button which brings up the context menu with an option to "Play programme". The program will start playing from the beginning if it is available On Demand.

Is there a way to accomplish this using Cabernet?

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

G Kazaroth wrote:

Try this.
In TVH Muxes Tab,
  1. Filter Scan Status to a 0
  2. Sort table by Scan result
  3. With shift key, select all rows that have FAILED
  4. Click Edit
  5. On the Scan status line, check the checkbox on the left
  6. Change the status to PEND and click Save

Wow, thanks, you taught me something about Tvheadend that I didn't know, and that would have saved hours if I had known it years ago!

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by C Island 2 months ago

G Kazaroth wrote:

Island,
If you want to add some info into the lib/tvheadend/service/CoreELEC folder regarding the info provided above, please create a PR.

I did a PR but it failed. It tried to build and push a docker image but that step failed. Not sure how to fix it....
The workflow that failed was cabernet/.github/workflows/docker-image.yml

It is strange that the workflow tried to push a new/update docker image when anyone like me simply submits a PR and that PR is not yet accepted by you. I would think you would want to setup the workflow to only try to push a new/updated docker image only when you accept/merge the PR.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sterling Rorden 2 months ago

I got all the PlutoTV channels to scan and I can play shows, schedule recordings, etc.

I read through some of the older posts and it appears Cabernet supports VOD for the PlutoTV channels that have VOD. I've enabled "Play All (VOD)" in the PlutoTV Instance tab but VOD shows still don't play from the start. Are there some other settings I need to change or am I misunderstanding that Cabernet supports VOD for PlutoTV?

Currently I have the Tvheadend internal grabber cron scheduled to run 3 times a day. I tried 2 times a day but there were gaps in the PlutoTV EPG data. Is there a way to schedule the PlutoTV EPG grabber separately from the tvheadend grabber in Cabernet? I'd prefer to only run the zap2epg grabber once a day.

Thanks

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sterling Rorden 2 months ago

I was going to try USTVGO but it won't stay enabled. If I check the Enable box under settings and save changes it will stay Enabled. But when I restart Cabernet the check box is cleared.

I'm assuming I can follow the instructions for PlutoTV but change the URL to something like http://[host]:6077/USTVGO/channels.m3u, correct?

Thanks

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

Island,
I have been on holiday. Thanks island for the PR. Cookie Monster did the docker updates, but will take a look and see what I can figure out.

Sterling,
VOD is supported only when an EPG is also provided by the provider. XUMO is a good example of a provider that has VOD. The Hallmark channel on it is VOD. The "Play All (VOD)" is listed as part of the Player section, so it has nothing to do with channel collection. The description on the label seems convoluted, will update. The setting basically will play all initial segments from a stream instead of using the "Non-VOD Segments to Start" value. This is useful when the provider is giving an VOD stream, but does not set the VOD flag in the stream.

If you are not liking the provider EPG, Cabernet allows the use of external EPG providers. You can disable the EPG gathering in Cabernet through settings and use whatever EPG gathering tool you want, including zap2epg. The PlutoTV plugin provides the EPG from PlutoTV. TVH grabber cronjob does all grabbers enabled during a grab; you cannot separate the grabbers into separate TVH cronjobs.

If your instance checkbox is getting cleared, it means something is failing. Check the log file and see why the instance is being disabled.

The URL for the M3U file is correct. You can test it from a browser and save the file to see what it contains.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sterling Rorden 2 months ago

Gary
I figured out my problem with USTVGO. I didn't create an instance in the config.ini file (that wasn't real obvious for a novice). I'm in the process of scanning the muxes and downloading the EPG data.

I think I'm understanding you correctly on the VOD in PlutoTV. If I want VOD (for the channels that support it) in PlutoTV I need to find an EPG that supports it. In my case where I use the PlutoTV addon in Kodi and use IPTV Merge (which supports VOD for PlutoTV) to get the data into the Kodi EPG, I would need to use the IPTV Merge epg.xml file in Tvheadend, correct?

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

Not quite that simple, but if you have a m3u file and a epg file, you can use the m3u plugin.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sterling Rorden 2 months ago

G Kazaroth wrote:

Not quite that simple, but if you have a m3u file and a epg file, you can use the m3u plugin.

I see the epg.xml and playlist.m3u8 files in the IPTV Merge addon folder so I guess it could work. I don't have IPTV Merge installed on my Tvheadend box so I'd probably want to install it there to reduce complications. The other nuance I see is there isn't a Record option in the menu but there is a Timer option (which currently doesn't record) so I could probably use that. Right now both the Kodi PlutoTV EPG and the Cabernet PlutoTV EPG have the same numbers so the channels are displayed right next to each other. I select the Kodi PlutoTV channel if I want to watch VOD and the Cabernet PlutoTV channel if I want to record. But this requires me to use Kodi channel groups which seem to periodically disappear for some reason. I was going to try to use Tvheadend channel groups but Kodi requires me to use one or the other.
For the time being I'll probably keep it the way it is.

RE: PlutoTV, USTVGO, XUMO, M3U/XMLTV, SamsungTV, Plex interfaces (appliance) - Added by Sterling Rorden 2 months ago

Now that Locast is gone I can no longer record my favorite local news as a backup to my OTA reception. However, it is available for streaming on the internet:
https://www.kcra.com/nowcast

How much trouble would it be for this novice to get it into Tvheadend? I don't even need epg data, I could just make a timer to record it from 10-11 pm.

(526-550/589)