SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

Hardware Support Discussions related to using various hardware setups with SageTV products. Anything relating to capture cards, remotes, infrared receivers/transmitters, system compatibility or other hardware related problems or suggestions should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-28-2022, 09:22 AM
hvymetal hvymetal is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 162
Native PlutoTV Tuner: OpenDCT, Streamlink, XMLTV

Sorry for all the steps but there are many pieces of the puzzle to make everything to work. On the plus side after all the steps are followed you will complete PlutoTV support with guide data that does not skip on commercials. During commercials it will show a generic PlutoTV logo video.

The steps below assume you are using the OpenDCT docker that was updated by jusjoken. I run it as a separate OpenDCT docker from my main OpenDCT docker. You can run multiple OpenDCT dockers by using a using a different IP and user data folder. The steps also requires an additional docker image for PlutoTV guide data and both XMLTV and sagex plugins. Guide data will update every 2 hours. Channels currently import with an offset of 10000 but that can be adjusted based on preference.

When viewing channels sometimes it will close the current Placeshifter(Still investigating...PlutoTV_Tuner.sh might have to pipe streamlink output into FFMPEG for fix). With the Android MiniPlayer updated by jvl711 EcoPlayer/Dynamic works perfectly.

Let me know if I missed any steps. Maybe in the future I will roll it into a docker image. Have fun and Sage ON

Code:
#******pluto-for-channels  DOCKER Install Steps******
###https://github.com/maddox/pluto-for-channels
###Install pluto-for-channels docker for PlutoTV guide data.  Change port 8087 to open port on your server 
docker run -d --restart unless-stopped --name pluto-for-channels -p 8087:80 jonmaddox/pluto-for-channels

#******OpenDCT DOCKER Install Steps******
#Copy all files and folder contents(not folder) of folder OpenDCT ROOT folder of docker's appdata.
#Modify /opt/PlutoTV_Update_EPG.sh for info for both EPG docker and SageTV Server
###Set script excute rights
chmod 777 /opt/opendct/*.sh
#Run EPG update script to create XMLTV file for XMLTV plugin
/opt/opendct/PlutoTV_Update_EPG.sh

###Installing Streamlink in Docker where OpenDCT is installed
###If using Unraid ssh to docker image by using:  docker exec -it sagetvopen-sagetv-opendct_IPTV  /bin/bash
apt-get update
apt-get install -y python3-distutils
###Get Bootstrap version of pip to download slim verion of pip.  If install pip by apt-get it installs things that are not needed for install of streamlink
wget https://bootstrap.pypa.io/get-pip.py
python3 get-pip.py
rm get-pip.py
###Install streamlink
pip3 install --upgrade streamlink

####Test streamlink if it starts showing random chars it working......To ecsape from command repeatly press CTRL+C
streamlink --stdout --hls-segment-stream-data --ffmpeg-fout mpegts --ffmpeg-copyts --ffmpeg-start-at-zero --twitch-disable-hosting --ringbuffer-size 8M --hls-segment-attempts 2 --hls-segment-timeout 5 https://pluto.tv/en/live-tv/cnn best

####Run cron at startup
##Remove /opt/opendct/console-only
sed -i '/\/opt\/opendct\/console-only/d' /usr/bin/install-opendct.sh
##Remove cron -f -l 2 &  #In case it was already added
sed -i '/cron -f -l 2 &/d' /usr/bin/install-opendct.sh
###Insert line sh /opt/opendct/PlutoTV_Update_EPG.sh
echo "sh /opt/opendct/PlutoTV_Update_EPG.sh" >> /usr/bin/install-opendct.sh
##Insert line cron -f -l 2 &
echo 'cron -f -l 2 &' >> /usr/bin/install-opendct.sh
##Insert line /opt/opendct/console-only
echo '/opt/opendct/console-only' >> /usr/bin/install-opendct.sh

####Run cron job to update epg every 2 hours
crontab -l | { cat; echo "0 */2 * * * /bin/bash -l /opt/opendct/PlutoTV_Update_EPG.sh"; } | crontab -

####Install OpenDCT generic.pipe.device tuner 
##(Example opendct.properties.PlutoTV is provided in zip file.  Rename to opendct.properties if want to skip steps below.  Note HDHR discovery is disabled)
##1.  Stop Standalone OpenDCT Docker
##2.  Modify opendct.properties by adding  tuners generic.pipe.device_names_csv=PTV01, PTV02
##3.  Start Standalone OpenDCT Docker wait 10 secs
##4.  Stop Standalone OpenDCT Docker
##5.  Find PTV01 find ID of tuner as follows: sagetv.device.76468307.device_name=PTV01
##6.  Modifiy sagetv.device.76468307.streaming_executable.  Below is example with 10000 the channel number offset.  
##    If offset is modified also edit xmltv_Pluto.xmltv.properties(in SageTV/server folder) xmltv.channel.NumberOffset
##      sagetv.device.76468307.streaming_executable=./PlutoTV_Tuner.sh %c% 10000
	sagetv.device.76468307.consumer=opendct.consumer.MediaServerConsumerImpl
        sagetv.device.76468307.fast_network_encoder_switch=false
##7.  Repeat 5-6 for the qty of tuners add in step 2


#******SageTv DOCKER Install Step
#Copy all files and folder contents(not folder) of folder SAGETV_SERVER_ROOT to SageTV folder.  
#Modifiy xmltv_Pluto.xmltv.properties with dir of XMLTV file xmltv.files=/unraid/appdata/opendct_IPTV/opt/PlutoTV_epgdata.xml

###Install XMLTV plugin
##How to get shell to docker using Unraid:   docker exec -it sagetvopen-sagetv-server-java11_TEST /bin/bash
##1 Copy XMLTVImportPlugin.jar to SageTV/server/Jars and .properties to SageTV/server (This step was done if you copied contents from provided zip file)
##2. Stop SageTV Server
sudo -E "PATH=$PATH" -u sagetv /usr/local/bin/stopsage &
##3. Add the following line in Sage.properties epg/epg_import_plugin=xmltv.XMLTVImportPlugin
sudo sed -i 'epg/epg_import_plugin' /opt/sagetv/server/Sage.properties
sudo echo 'epg/epg_import_plugin=xmltv.XMLTVImportPlugin' >>  /opt/sagetv/server/Sage.properties
##4 Start Sage Server 
sudo -E "PATH=$PATH" -u sagetv /usr/local/bin/startsage &

###Install Sagex and epg service to force updating epg 
##1.  Install SageTV Sagex Remote API Service Plugin
##2.  Copy epg.js to sagex/services directory on the server (This step was done if you copied contents from provided zip file)

###Add Video source inside SageTV
##1. Add Source
##2. Add "PTV01 on sagetvopen-sagetv-opendct_IPTV:br0:9000"
##3. Click HDMI then Click continue
##4. Click "Don't Configure Tuning"
##5. Click "Use EPG Plugin"
##6. Zip Code 00000
##7. Pick PlutoTV
##8. Extended Basic Service
##9. Disable channels (10000, 10062, 10278) as it does not work. 
##10.  Click Done with Channel Setup
##11. Repeat for addional OpenDCT PlutoTV tuners.
Change Log

Code:
Change Log
#V02
1.  XMLTV curl download was not overwriting old file.  Fixed PlutoTV_Update_EPG.sh
2.  Update steps to modify permissions on scripts
Attached Files
File Type: zip PlutoTV_V03.zip (32.2 KB, 51 views)

Last edited by hvymetal; 01-29-2022 at 08:32 AM.
Reply With Quote
  #2  
Old 01-28-2022, 10:33 AM
hvymetal hvymetal is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 162
Code:
Change Log
#V02
1.  XMLTV curl download was not overwriting old file.  Fixed PlutoTV_Update_EPG.sh
2.  Update steps to modify permissions on scripts
Reply With Quote
  #3  
Old 01-29-2022, 08:32 AM
hvymetal hvymetal is offline
Sage Advanced User
 
Join Date: Nov 2007
Posts: 162
Change Log
#V03
1. PlutoTV_Update_EPG.sh was still not correct because absolute paths
2. Update steps to run the PlutoTV_Update_EPG.sh once and at startup of docker
3. Fixed crontab step
Reply With Quote
Reply


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

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: An open source digital cable tuner. EnterNoEscape Hardware Support 2949 05-06-2023 04:56 AM
PlutoTV with OpenDCT and fHDHR jpwegas General Discussion 32 10-04-2022 07:09 PM
XMLTV plug-in and Native EPG service kvgeorge1 SageTV EPG Service 2 06-20-2008 09:01 AM
Adding a 2nd tuner and XMLTV brewston SageTV United Kingdom 26 01-16-2007 06:37 PM
Dual tuner+xmltv andrew1810 SageTV EPG Service 3 12-20-2005 02:14 AM


All times are GMT -6. The time now is 02:05 PM.


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