Project

General

Profile

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

Added by G Kazaroth almost 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: Locast interface (appliance) - Added by Lisa White over 3 years ago

Should I change the port within the web? I tried that and the stream is still showing 5004. I left 6077 as is. Thanks

RE: Locast interface (appliance) - Added by Lisa White over 3 years ago

Would you happen to know the linux kill command for the cabenet locast script? I tried the service command but it will not shut down. I have to reboot server for changes to take effect and it is becoming a pia waiting for the server to restart . There has to be an easier way to kill the script. Thoughts? Thanks you

My Locast Channels have Disappeared Again - Added by Sterling Rorden over 3 years ago

Locast channels are no longer listed in my Kodi TVHeadend client.
The Locast channels are listed in the TVHeadend web interface but I get an unknown error when I try to play them.
The login_invalid field is blank.
I made a recent change to my service.tvheadend42.service file to add the lines "Wants=time-sync.target"
and "After=time-sync.target" to resolve an issue after power loss.
I've enabled debugging in the file log handler. I didn't see any errors, it acts like everything is running fine.

One thing I did notice is that it thinks I'm in the Los Angeles DMA. I'm actually in the Sacramento DMA. I use AT&T Fixed Wireless Internet which is actually through cell towers. I guess Locast uses the internet IP address for location information and it seems this information is incorrect for me. I had brought this to Locast's attention and they resolved it at that time but it looks like the problem is back. I tried the Locast app and it defaults to Los Angeles channels (which will play). If I change my location to Sacramento it won't let me play the channels. I have not done a channel rescan in TVHeadend.

Edit: I logged out of my account in the Locast app and logged back in again. This resolved the incorrect DMA in both the Locast app and cabernet log file.

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

Thanks. I put my zipcode in the zipcode override box and rebooted. The channel numbers in my TVHeadend clients are a little screwy now but the Locast channels listed do play. And not everything is showing up in the guide (both in my clients and the TVH web EPG) but the channels are still listed in the TVH configuration. I'll give it a little time to see if it figures it out. A rescan may be in my future.

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

G Kazaroth wrote:

The info provided does look like Locast changed the DMA on you. When the DMA changes for a Locast instance, Cabernet will clear the previous DMA data and repopulate the database with the new channels. This will make the old channels that TVH knows, invalid. From this point, you could either rescan TVHeadend muxes and pick up the new DMA channels or go back to the original DMA. Considering you have this issue, I would recommend putting a zipcode in the Locast instance setting. It is visible under the 3-Advanced view. With the zipcode set, the DMA will not accidentally change based on what Locast decides at the moment and you can get a consistent DMA/channel listing.

FYI, version 0.8.8 adds a backup solution and 0.8.8d adds the ability to restart after a restore, so you can restore any channel information from a backup if you upgraded.

So, If I want to update to 0.8.8d, do I just download the zip file and extract it to where I currently have tvheadend-locast installed? Do I need to stop TVHeadend or anything? Do I need to backup any configuration files or anything?

Thanks

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

G Kazaroth wrote:

Only issue on upgrading is the epg.db It is auto-generated and has no unique data, so you can delete it and it will regen on a restart. Everything else is fine for an overlay. Make sure to include the tvh_main.py at the top level.

So basically, extract the zip file, delete the epg.db in the data/db folder and restart the service. Data Management has a number of new features if you have not seen it.

Well, I got cabernet updated. But my channels are still wonky. The Locast channels appear in the TVH web interface and have guide data but my clients aren't pulling them over. I can't play channels from the TVH interface (I thought I used to be able to). I can get audio on the OTA channels but I just get "an unknown error occurred" with the Locast channels. The Locast channels I thought I had in the clients are actually OTA channels with the Locast channel descriptions.

I tired doing a channel and EPG reset in Cabernet but it didn't help anything.

Do you have any recommendations for TVH configuration settings? Should I enable "Automatically name from network" in the Channels tab?

RE: Locast interface (appliance) - Added by Sean Micklem over 3 years ago

I will just suggest that if things have gone totally wonky and you can't get it working any other way, you could create a new user on your system and try installing from scratch under that new user (make sure your existing instance is completely shut down first so there are no port conflicts). If you can get it working that way, it may indicate you have a corrupted file or database in your original installation, or that some setting got changed that shouldn't have been changed.

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

G Kazaroth wrote:

TVHeadend does not like channel updates and to make matters worse, Locast changes the channel data frequently. Recently, they changed the UID (that should, like, never change...) on NBC (playing the Olympics). Basically, Cabernet updated and then TVHeadend would not talk to the correct UID. Once I made the mux updates, all was good again.

In your case, you have 2 choices, either go through the Muxes and manually fix the URLs, as well as, delete any channels that are not suppose to be there, or ... repopulate the Locast muxes, automatically. I recommend the second choice, since I do that every time I need to change the DMA for testing. To do that, you will need to filter to the Locast muxes and then delete all of them. This will also delete the Locast services. Next, you need to do a Force Scan on the Locast Network. This will repopulate the muxes and it will also test each channel and create the services. Then map the services; do some EPG updates, and fix the channel numbers on the channel page. To fix the muxes manually, you need to have the Cabernet logs turned to info or debug see which ones have issues. The log should be clear on how to proceed using the manual method.

"Automatically name from network" in the Channels tab
I have it set to yes as shown in the tvheadend configuration info at the top of the forum page.

I followed your advice and went the automatic route but I only did a Force Scan for the Locast Network. I still had to do some cleanup on the ATSC channels but I didn't want to force a scan on them.
The reason I was asking about the Automatically Name setting was it was sometimes populating with the wrong information and it was sometimes identifying ATSC channels as Locast channels (and sometimes the wrong Locast channels) which would subsequently cause the wrong EPG source to be used. And there were sometimes multiple EPG sources being populated in the EGP Source field. The strangest thing is some of the EPG sources were zap2epg sources proceeded with the Locast channel name for ATSC sources. But I've got everything working now. Some of the ATSC channels insist on using the Locast EPG data instead of the zap2epg data but it shouldn't matter since they are the correct channel.

I have some general questions on the appropriate General PVR & Live TV settings in the Kodi TVH client. I also use a Kodi addon that populates Pluto TV data in the EPG outside of TVH. I create channel Groups within the Kodi TVH client. The problem with this is is when TVH goes wonky the channels disappear from the Groups and have to be reentered. I've considered creating groups within TVH but have some concerns.

1) I have "Synchronize channel groups with backend(s)" disabled since there is a specific warning that groups will be deleted if they aren't found on the backend. The way I interpret this my group for Pluto TV would be deleted if I enable it since the group isn't on TVH. So I can't use groups within TVH, correct?

2) I have "Use channel order from backend(s)", "Allow backend channel numbers with more than one PVR add-on", and "Use channel numbers from backend" enabled. Are these the correct settings to create the least problems?

Now that I have everything working again, what are the best settings to avoid problems in the future and make recreation of the channels easiest when things do go awry? And what exactly does the backup function in Cabernet backup?

Thanks

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

First, Thanks for all your help!
I've updated to 0.8.8e.
I'll try adding a prefix of 100 and keeping the suffix as L, and adjusting the episode number by 1000. I don't mind all the Locast numbers at the bottom. I only use Locast channels as a backup when I'm having OTA reception problems and have them grouped separately anyway.

I tried PseudoTV but I had problems (don't remember what they were now). I use IPTV Merge to integrate the PlutoTV guide data into the Kodi EPG and it seems to work OK.

Thanks again.

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

I added 100 as a prefix and L as a suffix in Providers > Locast Default under EPG, saved changes, and rebooted my box.
100 was added to most (but not all) the Locast channel numbers in the TVH channels name field. However, the actual Locast channel numbers didn't change. And some of the ATSC channel names got preceded with the Locast channel numbers. And the Automatically name from network boxes got unchecked on most channels.
Did I do something wrong?

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

G Kazaroth wrote:

@Sterling
I suspect it is TVH that has not updated with the new info.
Run a check in cabernet with the JSON link "lineup.json" and check the channel numbers to see if the number has changed.
You can also save the channels.m3u file (which is what TVH uses) and see that the tvg-num, tvg-chno and the name at the end has the channel number updated. If not, please provide not info on what you see. xmltv.xml will also be updated with the new channel numbers in the top part of the file.

If everything looks fine here, then you just need to force scan TVH to pick up the new channels (and all the stuff that goes with the force scan).

One other note... you can now do a restart from the scheduler tab instead of rebooting. TVH is a different issue; although, it should have not needed a restart.

As for check boxes, I find TVH unchecking and checking things all the time. Really have stopped trying to keep up with that.

This was a little bit of a brain fart on my part. I forgot that I had to manually populate the Number field with the Locast channel numbers. I went ahead and did a force scan on the Locast network and did a clean start. Everything seems to be working so far.

Since the Locast channel numbers need to be manually entered, is it necessary to have the 100 prefix in the field in Providers > Locast Default under EPG?

Also, if you could figure out a way to make the Locast channel numbers automatically populate the Number field in TVH it would be a nice addition.

Thanks again

RE: Locast interface (appliance) - Added by Sterling Rorden over 3 years ago

Yea, I'm running TVH 4.2.
I see all the issues have been closed for TVH 4.4. I'm hoping it will be released and ported to CoreELEC in the near future.

Thanks

RE: Locast interface (appliance) - Added by K Shea over 3 years ago

You seem to know a lot about this stuff, someone was asking me today about these projects and since I don't know too much about them I wanted your opinion, if you don't mind giving it:

https://github.com/evoactivity/PlutoIPTV
https://github.com/mclenburg/plutoTV-tvheadend

Both of these are supposed to give you access to Pluto TV channels, and 8 hours of guide data (which sure isn't much, I realize) but each appears to have drawbacks. The first has to be run using "npx pluto-iptv" but npx isn't installed by default in Ubuntu. I believe you have to install a program called npm first and since I had no idea what that was I did "apt-get install --dry-run npm" just to see what it might install, well it turns out it wants to install 250 packages total:

The following additional packages will be installed:
  gyp libc-ares2 libjs-inherits libjs-is-typedarray libnode-dev libnode64 libuv1 libuv1-dev node-abbrev node-ajv node-ansi node-ansi-align node-ansi-regex node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet
  node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4 node-balanced-match node-bcrypt-pbkdf node-bluebird node-boxen node-brace-expansion node-builtin-modules node-builtins node-cacache node-call-limit node-camelcase
  node-caseless node-chalk node-chownr node-cli-boxes node-cliui node-clone node-co node-color-convert node-color-name node-combined-stream node-concat-map node-concat-stream node-config-chain node-console-control-strings
  node-copy-concurrently node-core-util-is node-cross-spawn node-cyclist node-dashdash node-decamelize node-decompress-response node-deep-extend node-defaults node-delayed-stream node-delegates node-detect-indent node-detect-newline
  node-duplexer3 node-duplexify node-ecc-jsbn node-editor node-encoding node-end-of-stream node-errno node-escape-string-regexp node-execa node-extend node-extsprintf node-find-up node-flush-write-stream node-forever-agent
  node-form-data node-from2 node-fs-vacuum node-fs-write-stream-atomic node-fs.realpath node-gauge node-get-caller-file node-get-stream node-getpass node-glob node-got node-graceful-fs node-gyp node-har-schema node-har-validator
  node-has-flag node-has-symbol-support-x node-has-to-string-tag-x node-has-unicode node-hosted-git-info node-http-signature node-iconv-lite node-iferr node-import-lazy node-imurmurhash node-inflight node-inherits node-ini
  node-invert-kv node-is-builtin-module node-is-npm node-is-object node-is-plain-obj node-is-retry-allowed node-is-stream node-is-typedarray node-isarray node-isexe node-isstream node-isurl node-jsbn node-json-parse-better-errors
  node-json-schema node-json-stable-stringify node-json-stringify-safe node-jsonify node-jsonparse node-jsonstream node-jsprim node-latest-version node-lazy-property node-lcid node-libnpx node-locate-path node-lockfile
  node-lowercase-keys node-lru-cache node-mem node-mime-types node-mimic-fn node-mimic-response node-minimatch node-minimist node-mississippi node-mkdirp node-move-concurrently node-mute-stream node-node-uuid node-nopt
  node-normalize-package-data node-npm-package-arg node-npm-run-path node-npmlog node-oauth-sign node-object-assign node-once node-opener node-os-locale node-osenv node-p-cancelable node-p-finally node-p-limit node-p-locate
  node-p-timeout node-package-json node-parallel-transform node-path-exists node-path-is-absolute node-path-is-inside node-performance-now node-prepend-http node-process-nextick-args node-promise-inflight node-promzard
  node-proto-list node-prr node-pump node-pumpify node-punycode node-qs node-qw node-rc node-read node-read-package-json node-readable-stream node-registry-auth-token node-registry-url node-request node-require-directory
  node-require-main-filename node-resolve-from node-retry node-rimraf node-run-queue node-safe-buffer node-semver node-semver-diff node-set-blocking node-sha node-shebang-command node-shebang-regex node-signal-exit node-slash
  node-slide node-sorted-object node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-sshpk node-ssri node-stream-each node-stream-iterate node-stream-shift node-string-decoder node-string-width node-strip-ansi
  node-strip-eof node-strip-json-comments node-supports-color node-tar node-term-size node-text-table node-through node-through2 node-timed-out node-tough-cookie node-tunnel-agent node-tweetnacl node-typedarray node-uid-number
  node-unique-filename node-unpipe node-url-parse-lax node-url-to-options node-util-deprecate node-uuid node-validate-npm-package-license node-validate-npm-package-name node-verror node-wcwidth.js node-which node-which-module
  node-wide-align node-widest-line node-wrap-ansi node-wrappy node-write-file-atomic node-xdg-basedir node-xtend node-y18n node-yallist node-yargs node-yargs-parser nodejs nodejs-doc
The following NEW packages will be installed:
  gyp libc-ares2 libjs-inherits libjs-is-typedarray libnode-dev libnode64 libuv1 libuv1-dev node-abbrev node-ajv node-ansi node-ansi-align node-ansi-regex node-ansi-styles node-ansistyles node-aproba node-archy node-are-we-there-yet
  node-asn1 node-assert-plus node-asynckit node-aws-sign2 node-aws4 node-balanced-match node-bcrypt-pbkdf node-bluebird node-boxen node-brace-expansion node-builtin-modules node-builtins node-cacache node-call-limit node-camelcase
  node-caseless node-chalk node-chownr node-cli-boxes node-cliui node-clone node-co node-color-convert node-color-name node-combined-stream node-concat-map node-concat-stream node-config-chain node-console-control-strings
  node-copy-concurrently node-core-util-is node-cross-spawn node-cyclist node-dashdash node-decamelize node-decompress-response node-deep-extend node-defaults node-delayed-stream node-delegates node-detect-indent node-detect-newline
  node-duplexer3 node-duplexify node-ecc-jsbn node-editor node-encoding node-end-of-stream node-errno node-escape-string-regexp node-execa node-extend node-extsprintf node-find-up node-flush-write-stream node-forever-agent
  node-form-data node-from2 node-fs-vacuum node-fs-write-stream-atomic node-fs.realpath node-gauge node-get-caller-file node-get-stream node-getpass node-glob node-got node-graceful-fs node-gyp node-har-schema node-har-validator
  node-has-flag node-has-symbol-support-x node-has-to-string-tag-x node-has-unicode node-hosted-git-info node-http-signature node-iconv-lite node-iferr node-import-lazy node-imurmurhash node-inflight node-inherits node-ini
  node-invert-kv node-is-builtin-module node-is-npm node-is-object node-is-plain-obj node-is-retry-allowed node-is-stream node-is-typedarray node-isarray node-isexe node-isstream node-isurl node-jsbn node-json-parse-better-errors
  node-json-schema node-json-stable-stringify node-json-stringify-safe node-jsonify node-jsonparse node-jsonstream node-jsprim node-latest-version node-lazy-property node-lcid node-libnpx node-locate-path node-lockfile
  node-lowercase-keys node-lru-cache node-mem node-mime-types node-mimic-fn node-mimic-response node-minimatch node-minimist node-mississippi node-mkdirp node-move-concurrently node-mute-stream node-node-uuid node-nopt
  node-normalize-package-data node-npm-package-arg node-npm-run-path node-npmlog node-oauth-sign node-object-assign node-once node-opener node-os-locale node-osenv node-p-cancelable node-p-finally node-p-limit node-p-locate
  node-p-timeout node-package-json node-parallel-transform node-path-exists node-path-is-absolute node-path-is-inside node-performance-now node-prepend-http node-process-nextick-args node-promise-inflight node-promzard
  node-proto-list node-prr node-pump node-pumpify node-punycode node-qs node-qw node-rc node-read node-read-package-json node-readable-stream node-registry-auth-token node-registry-url node-request node-require-directory
  node-require-main-filename node-resolve-from node-retry node-rimraf node-run-queue node-safe-buffer node-semver node-semver-diff node-set-blocking node-sha node-shebang-command node-shebang-regex node-signal-exit node-slash
  node-slide node-sorted-object node-spdx-correct node-spdx-expression-parse node-spdx-license-ids node-sshpk node-ssri node-stream-each node-stream-iterate node-stream-shift node-string-decoder node-string-width node-strip-ansi
  node-strip-eof node-strip-json-comments node-supports-color node-tar node-term-size node-text-table node-through node-through2 node-timed-out node-tough-cookie node-tunnel-agent node-tweetnacl node-typedarray node-uid-number
  node-unique-filename node-unpipe node-url-parse-lax node-url-to-options node-util-deprecate node-uuid node-validate-npm-package-license node-validate-npm-package-name node-verror node-wcwidth.js node-which node-which-module
  node-wide-align node-widest-line node-wrap-ansi node-wrappy node-write-file-atomic node-xdg-basedir node-xtend node-y18n node-yallist node-yargs node-yargs-parser nodejs nodejs-doc npm
0 upgraded, 250 newly installed, 0 to remove and 0 not upgraded.

Unbelievable! The other package wants you to install a few perl modules, but my problem with Perl is that once you install Perl modules, if you decide you don't need them there is no easy way (that I know of) to get rid of them. But also, in the description of that one it says "So far, there are still short interruptions when advertising starts or ends." So I guess I was wondering if you might have an opinion on these (seems like something you might have tried at some point) and in particular, if you know of a better approach. It would be interesting to have the Pluto TV channels available in Tvheadend, just don't know if it is worth the effort especially considering that you can't get more than 8 hours of guide data. And I really don't want to add 250 new programs to my system!

Thanks in advance for any thoughts you might have! (And yes, I am gently hinting that if you are so inclined, you might consider adding Pluto TV support to cabernet!)

RE: Locast interface (appliance) - Added by K Shea over 3 years ago

Thanks, I appreciate the insights. Also it's good to hear you are making progress. This has to be a massive undertaking for you!

I looked at fHDHR once but couldn't quite figure it out. So I think I'll wait for your version of the plugin, since I would have no idea what changes need to be made to make it compatible. Thanks!

RE: Locast interface (appliance) - Added by Sterling Rorden about 3 years ago

I use the Kodi Pluto TV addon from Lunatixz and IPTV Merge to get it to show up in the EPG. The interesting thing is that the shows in the EPG with green dots (which are most of them) are available as On Demand. The downside to this is if you start watching a show one day and want to finish it on another day, it may not be available. The Pluto TV addon from Lunatixz has an On-Demand section which doesn't appear to be the same as what is available in the EPG (not all shows available in the EPG are available as On Demand and visa versa). However, some of the On Demand shows don't play, the information may be stale. The Pluto TV addon from SlyGuy doesn't have an on demand section.

Just giving you this information in case it helps.

RE: Locast interface (appliance) - Added by Sean Micklem about 3 years ago

This is great news! I'm not sure how you could integrate VOD into Tvheadend, since it seems to expect all channels to be streaming services. But I am looking forward to PlutoTV support. I hope you'll be able to deselect the channels you don't care about, as you now can with locast channels, because 300 channels are way too many. And looking over Pluto's channel lineup, I see several channels I would never watch even if you paid me, but also quite a few that do look interesting.

Anyway I am currently running tvheadend-locast 0.8.8g, if I wanted to upgrade to Cabernet 0.9.0.5 (or whatever the version is that will be available this weekend, since that's probably when I'll do it) do I just copy all the Cabernet files over the tvheadend-locast files as I have done in previous versions? Will it still use my config file? Do I need to delete any database files or anything? Or would you advise still waiting a little longer to upgrade?

RE: Locast interface (appliance) - Added by Sterling Rorden about 3 years ago

Dang!
I just got a message that Locast is suspending operations and when I try to watch it I get a no signal message!

RE: Locast and PlutoTV interface (appliance) - Added by Sterling Rorden about 3 years ago

Just wanted to say thanks for your efforts!

RE: Locast and PlutoTV interface (appliance) - Added by Sean Micklem about 3 years ago

I just set up 0.9.1.8 using PlutoTV and I see something that will be a problem for me, since I already have existing channels from other sources. Is there any way you could add something for each instance that would optionally renumber the channels consecutively starting at a specified channel number, for example all the Pluto channels starting at 2000, all the Xumo at 3000, etc.? I would really rather not have to renumber them all manually, if it can possibly be avoided. Pluto's channel numbering in particular seems all over the place. Thanks!

G Kazaroth wrote:

Also, to configure tvheadend, I added a network called PlutoTV and used the url http://ipaddr:6077/PlutoTV/channel.m3u or http://ipaddr:6077/PlutoTV/playlist (locast had its own playlist as well) Changed the maximum timeout in seconds to be at least 240. It needs to be long enough to cover the commercial time slots.

For me, that first URL gets a "501 - Not Implemented" error. The second one works and brings up the channel list in VLC, but I'm not certain if Tvheadend will use it. I don't really want to create the network in Tvheadend until I can get the channel numbering fixed.

One more question, I don't suppose you would know of any easy way to download the channel icons (in their best available resolution) for each of the Pluto TV channels? As I think I may have mentioned quite some time back, I let Kodi deal with displaying the channel icons, and store them in a local directory.

Thanks again for all your work on this. Really a shame what happened to Locast (and I do hope they are able to come back at some point), but I'm glad that the work you did on that formed the basis of something that will work with these other services.

RE: Locast and PlutoTV interface (appliance) - Added by Sean Micklem about 3 years ago

Got it all working. I tried doing a test recording of "This Old House" and it worked and I could play it back, but if I attempted to skip forward or go to a specific time (in Kodi) it threw me back to the start, and there was no way I could move around in the recording (fast forwarding might have worked but I didn't think to try it). I have seen that before with recordings from other sources, but rarely. Don't know if it was just a fluke occurrence, and I already deleted the recording (I have been up all night so not exactly thinking clearly) but just a data point. Other than that it all seems to be working beautifully. Thank you again for everything you have done on this! Now I am going to try to get some sleep!

Addendum: It seems to have issues getting guide data sometimes - I have a script that pulls guide data every two hours but this morning when I tried to manually import the last received data into Tvheadend it got nothing (no new programs) even though it looked like it was reading it and even though the guide was nearly empty. So, I manually fetched new guide data and then for some reason it found a few hours worth of new data. So I am just wondering if for some reason it's not honoring the "EPG Min Refresh Rate" value, which is set to 3600. When I did the manual update it overwrote the old xml file so I can't look at that to see what was in it. but I noticed when I did the manual update this time it took several seconds to come back, so I assume it was fetching new guide data from Pluto TV that time. I guess I'll have to keep an eye on it and try to determine what is failing, if it happens again.

Also I noticed if you try to play a channel live in Kodi it sometimes thinks it's an audio-only stream (like radio), but if I stop it and go back in then it sees it as video. Not sure what causes that.

RE: Locast and PlutoTV interface (appliance) - Added by C Island about 3 years ago

I have PlutoTV installed and running. Thank you for this. I really miss your Locast offering though because Locast though it was very smooth and very solid. Plus with PlutoTV I seem to only be able to find CBS local news on PlutoTV and I prefer to watch NBC local news.

Some items I noticed:

When watching channel '614 Dabl' live via Kodi the screen will go blank for an extended period of time. When I check the channel on a web browser on plutotv.tv there was a commercial playing during this time. The commercial goes for quite some time and my family assumes the blank screen for an extended period of time means the playback is broken. When I check the channel using Lunatix's PlutoTV Kodi addon the screen is not blank, it has what looks like a Dabl screensaver displayed instead of a blank screen so the family doesn't assume things are broken and they wait for the channel to come back.

When playing or recording shows on 614 Dabl I seem to be getting about a 2 minute shift. When recording I get about 2 minutes of the previous show and miss 2 minutes off the end of the show. When I play Dabl Live using your addon in Kodi and compare it to playing plutotv.tv on a web browser it looks like the web browser seems to be about 2 minutes ahead of cabernet..... I figure I can fix this by adding a 2 minute extra recording but then I will have an extra 2 minutes on my HDhomerun recordings as well.....

I am getting errors in the tvheadend log when recoding shows. I think they were discontinuity errors as you suggested. I am sorry but I did not save the log... I will try to capture it next time. here is some logging

2021-09-04 11:23:24.805 pass: /recordings/recordings/You Deserve This House/You Deserve This House - S01E02 - S01E02 You Deserve This House.ts: Unable to change permissions -- Operation not permitted
2021-09-04 11:23:24.808 dvr: /recordings/recordings/You Deserve This House/You Deserve This House - S01E02 - S01E02 You Deserve This House.ts from adapter: "IPTV #1", network: "PlutoTV", mux: "channels.m3u - 614 Dabl", provider: "", service: "614 Dabl" 
2021-09-04 11:23:24.808 dvr:  #  type              lang  resolution  aspect ratio  sample rate  channels
2021-09-04 11:23:24.808 dvr:  1  H264                    1920x1080   ?                                    
2021-09-04 11:23:24.808 dvr:  2  AAC               und                             96000        ?         
2021-09-04 11:32:41.380 TS: PlutoTV/channels.m3u - 614 Dabl/614 Dabl: H264 @ #481 Continuity counter error (total 1)
2021-09-04 11:34:14.394 TS: PlutoTV/channels.m3u - 614 Dabl/614 Dabl: AAC @ #492 Continuity counter error (total 1)
2021-09-04 11:49:16.950 TS: PlutoTV/channels.m3u - 614 Dabl/614 Dabl: H264 @ #481 Continuity counter error (total 2)
2021-09-04 11:50:51.913 TS: PlutoTV/channels.m3u - 614 Dabl/614 Dabl: AAC @ #492 Continuity counter error (total 2)

Sometimes I am unable to play a live show from TVheadend/cabernet. For instance last night I tried to watch CBS news (channel '1021 CBSN Bay Area') from the EPG and after selecting the show nothing happened. I then went to Lunatix's PlutoTV addon and was able to play the show.

Thanks again for the PlutoTV addon.

RE: Locast and PlutoTV interface (appliance) - Added by Sean Micklem about 3 years ago

G Kazaroth wrote:

Glad to hear you got it working. Sleep is always a good thing. It keeps the mind sharp.

Current status. XUMO is almost done. I was concerned about the EPG being way short, but found that I can load a full day worth of programs (from midnight to midnight UTC/GMT time). So, things are not that bad. Also, refactored the plugin code, since I now have three. More reuse code and less code per plugin.

The issue with the skip forward and back has to do with discontinuity errors. Chances are an advertisement came into the feed and was not filtered out. I put together an initial filter, but it needs everyone's support to have it remove all the bad PTS packets. I am working to update some logging to help with detection so we can work together to fix it.

Great to hear about XUMO. I just wanted to let you know that I was able to repair a test recording that had this problem, by doing this:

ffmpeg -fflags +genpts -i original_file.ts -c copy -f mpegts temp.ts

And then I moved (NOT copied!!) temp.ts over the original file. I found out a long time ago that if you ever try to copy a changed recording over the original in Tvheadend, Tvheadend completely loses track of it and it will no longer appear in your recordings list, so you have to move it.

ffmpeg did throw a bunch of "Packet corrupt", "Non-monotonous DTS in output stream 0:0", and "PES packet size mismatch" errors, but it did create a playable file that you can seek within.

Now that said, I don't know if you could do this in real time by changing the link in the mux. I have done other real-time filtering in a mux, but never within an automatic IPTV network. I think an automatic IPTV network would keep changing the link back to the original. But if it were just a regular IPTV network, and the mux URL was something like

http://127.0.0.1:5004/PlutoTV/watch/channel_id_number

Then what I would TRY in place of that is something like

pipe:///usr/local/bin/ffmpeg -loglevel fatal -fflags +genpts -i http://127.0.0.1:5004/PlutoTV/watch/channel_id_number -c copy -f mpegts pipe:1

(Assuming /usr/local/bin/ffmpeg is the correct path to the ffmpeg executable). I do not know if this correction can be made in real time, but maybe it would be worth experimenting with. If it does then perhaps there would need to be some way to specify a prefix such as "pipe:///usr/local/bin/ffmpeg -loglevel fatal -fflags +genpts -i " and a suffix such as " -c copy -f mpegts pipe:1" for each existing URL.

EDIT: I set this up on a couple of the muxes this way as a test, and am making a couple of test recordings later tonight. What I want to see is if the URL gets changed back to what it was because it's an automatic IPTV network, and if that doesn't happen, whether that makes the recordings seekable in Kodi. But I would really NOT want to have to manually change the links in over 200 muxes!

Alternately there's probably some way to do this in a post-recording process in Tvheadend but that would not help if you try to start watching the show before it has finished recording. And also I'm not absolutely certain this technique would always work. It would require a little extra CPU power for each stream being recorded, but ffmpeg is generally not CPU intensive in copy mode.

The funny thing is that recordings seem to play fine once you have fixed the the seek errors, there are none of the short pauses and no long black periods during commercials. So the way it works now is great for recordings, but I can see where it would be somewhat discomforting for live viewing. Still, since I hardly ever watch anything in real time, I would prefer not having to skip through some substitute content that would replace the commercials. So I am fine with the black or the freeze frame or whatever appears just before the commercial break in live viewing. But I do understand that others may think differently.

EDIT: I had originally included the -mpegts_flags system_b option in the ffmpeg commands but then I realized that's for a different issue entirely that's not relevant here.

RE: Locast and PlutoTV interface (appliance) - Added by C Island about 3 years ago

My wife is playing some recorded shows from yesterday and is experiencing the same issue described by Sean where fast forwarding often brings you back to the start of the recording. Also, the removal of one of the commercials also took out a big chunk of the actual show after the show resumed after the commercial. correction: A chunk of the show prior to the commercial (not after the commercial) was missing from the recording. A small amount after the commercial may have been missing as well but certainly a good chuck before the commercial. My wife has watched this program on Dabl multiple times and she knows where Dabl places the commercials.....

I have turned on debug and turned off url filtering to see how that works.
I changed my Network Max Timeout from 240 to 480.

RE: Locast and PlutoTV interface (appliance) - Added by C Island about 3 years ago

She is watching the next show we recorded yesterday and this time a chunk of the show prior to the commercial was removed but this time most of the commercial was not removed.

RE: Locast and PlutoTV interface (appliance) - Added by C Island about 3 years ago

The recordings were from yesterday with no debugging on and URL on so I do not have any further info. She played a 3rd recording and this one has chunks of the show removed but most of the commercials remain. FYI: We have 3 recordings from yesterday because DABL plays episodes of the same show (Escape to the Country) 3 times in a row on weekdays

(76-100/960)