SageTV Community  

Go Back   SageTV Community > General Discussion > General Discussion

Notices

General Discussion General discussion about SageTV and related companies, products, and technologies.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-14-2021, 05:10 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 500
PlutoTV with OpenDCT and fHDHR

I was playing around with PlutoTV this weekend and was able to get it working in Sage using OpenDCT and fHDHR.

Background:
PlutoTV is a free IPTV service owned by ViacomCBS. It is ad supported so there is currently no subscription fee. Mostly they run old shows so if you want a 24/7 MacGyver channel or a classic 80s movie channel this is a nice service.

fHDHR is a project to make various video sources appear as an HDHR or other "devices". In most cases, this means it's pulling from an m3u IPTV stream, but it depends on the exact origin/source.

fHDHR has a "core" and plugins. Plugins can be sources (called "origins") like PlutoTV or "interfaces" like HDHR, which "look" like an HDHR device to other services like Sage or Plex or Emby.

What I did (brief summary):
I set up the fHDHR "core" (https://github.com/fHDHR/fHDHR) and the PlutoTV plugin (https://github.com/fHDHR/fHDHR_plugin_origin_plutotv). There are basic instructions on github which basically involve doing a git clone and then installing some Python dependencies. (Python3 is required.)

My final fHDHR config file is pretty basic:

Code:
[main]
uuid = RANDOMLY_ASSIGNED

[fhdhr]
address = 0.0.0.0
port = 5004

[plutotv]
username = REDACTED
password = REDACTED
The "main" section will be automatically created the first time you run it and a random value is created for the uuid. I added the other sections later. There is a web page that it presents at port 5004 and you can see how things are set up.

On the web page you might notice that by default it creates 4 tuners for PlutoTV, although you can override this in the configs. I did not test how many streams PlutoTV allows simultaneously.

Then in OpenDCT, I followed the normal instructions for creating a Generic HTTP Capture device which is basically:
1. Stop OpenDCT
2. Add the new device to the 'generic.http.device_names_csv' list in the 'opendct.properties' file. (I named mine "DCT-fHDHR PlutoTV-0").
3. Start OpenDCT so it creates a device entry.
4. Wait 20 seconds then stop OpenDCT
5. Edit 'opendct.properties' and add the device to the 'sagetv.device.global.only_devices_csv' list if you filter devices.
6. Add streaming_url for the new device: "http\://IP_ADDRESS\:5004/api/tuners?method\=stream&tuner\=0&channel\=%c%&origin\=plutotv&stream_method\=direct"
7. Start OpenDCT
8. Stop/Start SageTV (so it will pick up the new device)

You should now have a new source in SageTV. If you use Schedules Direct, there is a "Pluto TV" lineup you can use.

Issues I've noticed so far:

1. The SD "Pluto TV" lineup channel numbers don't always line up with the ones presented from fHDHR and the Pluto TV web page. I remapped (both physical and logical) the channels that I wanted so all the numbers match.
2. When OpenDCT stops using a stream, it takes 5-10 seconds for fHDHR to stop steaming. When switching from one PlutoTV channel to another, OpenDCT will try to connect again more quickly than that, and fHDHR will reject the request because the tuner is still "in use". I tried using the "stopping_executable" option to force a delay but that didn't seem to help. I have "fast_network_encoder_switch" set to false.

Some other notes:

1. There is a Locast "origin" so you should be able to use this same method for Locast. I have not tested this.
2. Because of the plugin architecture, it looks relatively easy to add new origins. This might be a way to get TV Everywhere into SageTV, but I did not have time to work on this but may in a few weeks.
3. For some origins (sources), fHDHR grabs and/or builds XMLTV data, but SageTV has no way by default to grab this from fHDHR, so in order to have EPG data you have to use a lineup that exists in Schedules Direct (PlutoTV has this), or possibly use the XMLTV plugin. I have not tried this either.
4. Originally I tried fHDHR set up with PlutoTV as a "source" and the HDHR "interface" plugin so OpenDCT would just magically see it as a new HDHR, but fHDHR's HDHR implementation isn't quite what OpenDCT and Sage expects (different APIs I believe) so they don't see these automatically like they do with real HDHR devices. fHDHR has streaming URLs that can be used even without the HDHR interface plugin, so that is what I used above. I removed the HDHR interface plugin as it wasn't needed.
5. If you want more than one PlutoTV tuner, just repeat the instructions above to add more to OpenDCT. Be sure to change the "tuner=0" to "tuner=1" or similar in the URL for each device.
6. fHDHR can have multiple origins/sources defined (like PlutoTV and Locast). If you add another origin plugin, you can add another device in OpenDCT, just change the 'origin' in the URL to match the "short" origin name.

So far it's working pretty well, although I have not done any long recordings. Hopefully ENE or someone else will have some thoughts on options for OpenDCT to wait longer between tunings of the same device.

--John
Reply With Quote
  #2  
Old 03-15-2021, 09:47 AM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,447
fHDHR seems like a project that could be useful for SageTV since HDHRs are so well supported. And I saw your post in the Locast thread as well.

We are starting to see some interesting ways in being able to integrate streaming TV channels into SageTV. Or other Media Server software like Plex, Emby, etc.
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #3  
Old 03-15-2021, 11:23 AM
AlphaCrew AlphaCrew is offline
Sage Aficionado
 
Join Date: May 2010
Location: Whosevile
Posts: 299
Nice work, Thank You!
Reply With Quote
  #4  
Old 03-15-2021, 06:29 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 500
Quote:
Originally Posted by wayner View Post
fHDHR seems like a project that could be useful for SageTV since HDHRs are so well supported. And I saw your post in the Locast thread as well.
Apparently Plex and Emby use the older protocol so they work. ENE commented on another thread that OpenDCT uses the newer/faster protocol but not the older one which fHDHR (and I think other similar projects like Telly or tvhProxy) use. To use it seamlessly with Sage either fHDHR would need to support the newer protocol or OpenDCT would need to support the older one.

I do think it's good that a lot of "video source" projects are using the HDHR API to act as a common interface to various DVR like projects.

--John
Reply With Quote
  #5  
Old 03-19-2021, 03:34 PM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
The FHDHR product has been modularized so there are plugins for origins and interfaces. Wouldn't the Interface plugin make it easy to integrate into SageTV?
Reply With Quote
  #6  
Old 03-19-2021, 06:13 PM
jpwegas jpwegas is offline
Sage Expert
 
Join Date: May 2007
Posts: 500
Quote:
Originally Posted by mlcarson View Post
The FHDHR product has been modularized so there are plugins for origins and interfaces. Wouldn't the Interface plugin make it easy to integrate into SageTV?
Yes it could!

An fHDHR Interface plugin that behaves like a Sage Network Encoder would be a really cool idea and open up a lot of options.

--John
Reply With Quote
  #7  
Old 03-24-2021, 02:05 PM
pjpjpjpj pjpjpjpj is offline
Sage Icon
 
Join Date: Feb 2008
Posts: 2,160
Being a user of HDHRs but being completely not a programmer (i.e., most lingo in the OP was Greek to me ), I would love to know if there is a possibility that this could be packaged up into a SageTV plugin. Could that happen?
__________________
Server: AMD Athlon II x4 635 2.9GHz, 8 Gb RAM, Win 10 x64, Java 8, Gigabit network
Drives: Several TB of internal SATA and external USB drives, no NAS or RAID or such...
Software: SageTV v9x64, stock STV with ADM.
Tuners: 4 tuners via (2) HDHomeruns (100% OTA, DIY antennas in the attic).
Clients: Several HD300s, HD200s, even an old HD100, all on wired LAN. Latest firmware for each.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenDCT for ARM is it possible? emveepee Hardware Support 7 11-26-2019 04:54 PM
OpenDCT and Tuning_Delay atchoo SageTV for unRAID/Docker 3 05-12-2018 10:50 AM
OpenDCT stopping.. jbuszkie SageTV for unRAID/Docker 1 07-27-2017 08:32 AM
OpenDCT and R5000 checkbin Hardware Support 9 12-29-2016 12:54 PM
OpenDCT: Can I use it? SDeGonge Hardware Support 7 02-20-2016 10:27 AM


All times are GMT -6. The time now is 10:45 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.