|
SageTV Downloads & Instructions This forum is for discussions containing Downloads and Instructions related to the Open Source version of SageTV. Please do not post questions in this forum. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
OpenDCT Network Encoder Walkthrough - V1
The below is an effort to document the install of OpenDCT on Linux (x64). This assumes you've used the Linux SageTV install thread here.
** See automated install script for Sage and encoders here (http://forums.sagetv.com/forums/showthread.php?p=585773) As noted in the OpenDCT page (http://forums.sagetv.com/forums/showthread.php?t=62774) Use the beta version for ClearQAM or ATSC support. A Windows walkthrough by daweeze is here 1) Download OpenDCT This will specifically download the .deb package for use with 64 bit Ubuntu. Current Release (25 Feb 2016) Code:
>> wget https://bintray.com/artifact/download/opendct/Releases/releases/0.3.17/opendct_0.3.17-1_amd64.deb Code:
>> wget https://bintray.com/artifact/download/opendct/Beta/releases/0.4.27/opendct_0.4.27-1_amd64.deb Use dpkg to install the downloaded file Code:
>> sudo dpkg -i opendct_0.3.17-1_amd64.deb Selecting previously unselected package opendct. (Reading database ... 102018 files and directories currently installed.) Preparing to unpack opendct_0.3.17-1_amd64.deb ... Unpacking opendct (0.3.17-1) ... Setting up opendct (0.3.17-1) ... To use the provided ufw rules type: /opt/opendct/enable-ufw-ports To delete the provided ufw rules type: /opt/opendct/disable-ufw-ports To start the OpenDCT service type: service opendct start 3) Configure Firewall As noted when OpenDCT installs, it provides a script to open ports using ufw. For whatever reason, this does not run properly on my system (workaround below). To try the provided script run: Code:
/opt/opendct/enable-ufw-ports If the above gives errors Code:
>> sudo /opt/opendct/enable-ufw-ports Skipping adding existing rule Skipping adding existing rule (v6) ERROR: Bad port Skipping adding existing rule Skipping adding existing rule (v6) ERROR: Bad port Code:
sudo ufw allow proto tcp to any port 9000:9100 sudo ufw allow proto udp to any port 8300:8500 sudo ufw allow proto tcp to any port 7818 sudo ufw allow proto udp to any port 8271 mikejaner noticed that opendct was not starting automatically at boot time and provided the below fix. Run the below command. Code:
sudo update-rc.d -f opendct defaults
The first time OpenDCT is run, it needs to be run from the command line so it can detect everything and generate the "opendct.properties" file. Code:
> cd /opt/opendct > sudo chmod a+x ./console-only > sudo ./console-only [.... lots of text as the application runs.... ] INFO | jvm 1 | 2016/02/25 13:35:45.392 | 13:35:45.388 [WrapperSimpleAppMain] INFO UpnpManager - Starting UPnP services... INFO | jvm 1 | 2016/02/25 13:35:45.493 | 13:35:45.443 [WrapperSimpleAppMain] INFO Main - Running in daemon mode... > Ctrl-C (to kill the process) [... more text as OpenDCT shuts down ...] # start the service > sudo service opendct start Starting OpenDCT Digital Cable Tuner for SageTV... 5) Update SageTV Config File To configure the tuners in Sage, first we need to shut down Sage, then edit the .properties file. As is often noted in the forms, this is a good time to backup a copy of your Sage.properties and Wiz.bin. Code:
# Change to your SageTV server directory > cd /opt/sagetv/server # Shutdown Sage > sudo ./stopsage # Backup files with a time stamp # ex Sage.properties.backup<date> > cp Sage.properties Sage.properties.backup20160225 > cp Wiz.bin Wiz.bin.backup20160225 # Edit Sage to look for network encoders > sudo nano Sage.properties # Edit / add the following entries encoding_discovery_port=8271 -- I had to manually create this entry network_encoder_discovery=true -- this existed but was set to false If using nano, you can use the Ctrl-K key combination to delete a line. When done editing press Ctrl-O to save and Ctrl-X to exit the nano editor. 6) Configure Tuners in SageTV It is now time to restart SageTV and detect / configure the tuners. Change to the SageTV server directory and start the SageTV Service Code:
>> cd /opt/sagetv/server >> sudo ./startsage -- ok... so far this didn't work... time to try again.. I'll keep updating until ready. Last edited by SageWizdom; 03-07-2016 at 09:15 PM. |
#2
|
||||
|
||||
Nice how-to!
You caught a problem with the firewall rules script. 14.04 did not complain about the port range formatting, but apparently newer versions do. It would be nice if Ubuntu offered a more modular approach to the default firewall like CentOS and Fedora. To add proper rules to Ubuntu you need to add entries to a large configuration file so instead of possibly accidentally ruining people's setups, I opted for a firewall rule script. Full disclosure: I'm a Fedora guy, so Ubuntu doesn't get tested as much. Also if I recall correctly Ubuntu doesn't have the firewall enabled by default, so the firewall script may not be needed for all users. The script will be fixed in the next release. Was ./console-only not already marked executable? Also since this might help some of the newer to Linux crowd, one of my favorite commands when I want to see what OpenDCT is doing when it's running as a service is: Code:
tail -f /var/log/opendct/opendct.log
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#3
|
|||
|
|||
Quote:
Quote:
Quote:
You are correct that the firewall is disabled by default, but I like to throw in the entries as at some point, I'm going to make the darn FW work correctly (still dreaming). It was 550 and owned by user opendct. The a+x allowed sudo to run it. I could also have just chown'ed it, but this seemed just as easy since in normally will be automatically run by the service, so it was really just this once. Thanks for all the great work on OpenDCT. I'll admit, I think I broke it when I set it up the first time. I'm going to blow it away and let the whole install flow. I'm going to re-read the main thread and may hit you up there for some troubleshooting. Thanks. |
#4
|
||||
|
||||
I predominantly use Linux for terminal activities, so I may not be the best person to ask about a holistic Fedora experience. When I do use the Gnome desktop in Fedora, I find it very pleasant and to the point.
The only thing that's a little scary in Fedora is the upgrade cycles, but that's the price you pay for having the latest reasonably tested releases. If you want stable for years with a similar feel, CentOS 7 is a good choice. If you want the latest without being on the bleeding edge, Fedora is a very good option. I have one server running CentOS 7 because the 4.0+ kernels no longer play nicely with the InfiniTV tuner drivers. That box is also running KVM with a few redundant VM hosted services so I can bring any server down and it doesn't make my wife angry. My other server running Fedora 22 is also running KVM with everything else and has 23TB of disk space backed using bcache by 1.2TB of writeback redundant solid state drives. It took a while to iron out all of the bottlenecks in my system, but now it's very fast even during rebuilds. I'm also using RAM deduplication and compression to fit a lot more VM's than you should be able to fit in 32GB of RAM. Also if you go headless like I mostly do, cockpit is really awesome. You can see and change what's going on with the server and even manage docker containers. CentOS I believe as of 7.1 has cockpit now.
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#5
|
|||
|
|||
Thats awesome.
|
#6
|
||||
|
||||
Hey, I followed your instructions for installing SageTV on Ubuntu(Thanks for these BTW), and now these OpenDCT ones. I am running into the following error after the step of starting the opendct service. Do you have any idea what this means. I am a linux wannabe.
--------------------------------------------------------------------------------- mjaner@sagenix:/opt/opendct$ sudo service opendct start Failed to start opendct.service: Unit opendct.service failed to load: No such file or directory. mjaner@sagenix:/opt/opendct$ Edit: The install didn't complain. I even tried the beta before this, with the same results. --------------------------------------------------------------------------------- mjaner@sagenix:~$ sudo dpkg -i opendct_0.3.17-1_amd64.deb Selecting previously unselected package opendct. (Reading database ... 102121 files and directories currently installed.) Preparing to unpack opendct_0.3.17-1_amd64.deb ... Unpacking opendct (0.3.17-1) ... Setting up opendct (0.3.17-1) ... To use the provided ufw rules type: /opt/opendct/enable-ufw-ports To delete the provided ufw rules type: /opt/opendct/disable-ufw-ports To start the OpenDCT service type: service opendct start mjaner@ Mike
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 Last edited by mikejaner; 03-03-2016 at 07:06 PM. |
#7
|
|||
|
|||
Quote:
|
#8
|
||||
|
||||
Yes, I did that, and waited a few moments before stopping it. Thanks, any help is welcome
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#9
|
|||
|
|||
Check and see if the folder /var/run/opendct exists. When opendct starts up it uses that folder for the pid file. The folder did not exist when I did the install tonight.
I've got the service running, but SageTV still isn't seeing the opendct tuners |
#10
|
||||
|
||||
The folder exists, but there is no files in it, so I guess it didn't write the .pid after I ran the console-only.
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#11
|
|||
|
|||
There will only be a pid file if the service is running. If the folder exists for you, your problem is different than my earlier issue.
|
#12
|
|||
|
|||
Quote:
Ranger, did you enable network encoder discovery in Sage.properties? Looks like this network_encoder_discovery=true You can also disable the firewall in Ubuntu to see if that is the problem by "sudo ufw disable" use enable to turn it on again. |
#13
|
||||
|
||||
It says the file already exists.
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#14
|
||||
|
||||
Hey guys. I realized I was running Ubuntu 15.10. Went back to 14.04LTS and everything works.
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#15
|
|||
|
|||
Quote:
|
#16
|
||||
|
||||
It was Java 8, because I followed the build guide from SageWizdom. Not sure what I did wrong, but if nobody else saw it, then it must be minor.
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 |
#17
|
||||
|
||||
Quote:
__________________
SageTV v9 Server: ASRock Z97 Extreme4, Intel i7-4790K @ 4.4Ghz, 32GB RAM, 6x 3TB 7200rpm HD, 2x 5TB 7200rpm HD, 2x 6TB 7200rpm HD, 4x 256GB SSD, 4x 500GB SSD, unRAID Pro 6.7.2 (Dual Parity + SSD Cache). Capture: 1x Ceton InfiniTV 4 (ClearQAM), 2x Ceton InfiniTV 6, 1x BM1000-HDMI, 1x BM3500-HDMI. Clients: 1x HD300 (Living Room), 1x HD200 (Master Bedroom). Software: OpenDCT :: WMC Live TV Tuner :: Schedules Direct EPG |
#18
|
|||
|
|||
Quote:
I figured I'd build myself a nice media server that was the latest of everything and then leave it alone to run for a few years. It has SageTV, Plex Media Server and Owncloud on it now. Eventually, hopefully this summer, I will replace the Windows 7 SageTV server and a separate Plex/Owncloud server with this one. |
#19
|
|||
|
|||
Quote:
|
#20
|
||||
|
||||
Quote:
I did some digging to try to do it myself and kept running into issues. I noticed sagetv was using the old rc.d (system v?) style of startup, and opendct has a linked startup file in the same directory, so I tried to tell rc.d to configure opendct to start and got the following error. root@sagelinux:/etc/init.d# update-rc.d opendct enable update-rc.d: warning: start runlevel arguments (none) do not match opendct Default-Start values (2 3 4 5) update-rc.d: warning: stop runlevel arguments (none) do not match opendct Default-Stop values (S 0 1 6) System start/stop links for /etc/init.d/opendct do not exist. Here's ls of the init.d directory root@sagelinux:/etc/init.d# ls acpid grub-common procps sagetv umountnfs.sh apparmor halt rc screen-cleanup umountroot apport irqbalance rc.local sendsigs unattended-upgrades atd killprocs rcS single urandom console-setup kmod README skeleton x11-common cron networking reboot ssh dbus ondemand resolvconf sudo dns-clean opendct rsync udev friendly-recovery pppd-dns rsyslog umountfs [EDIT] I fixed it doing the following: update-rc.d -f opendct defaults
__________________
Mike Janer SageTV HD300 Extender X2 Sage Server: AMD X4 620,2048MB RAM,SageTV 7.x ,2X HDHR Primes, 2x HDHomerun(original). 80GB OS Drive, Video Drives: Local 2TB Drive GB RAID5 Last edited by mikejaner; 03-06-2016 at 08:47 AM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
OpenDCT Java Network Encoder | spencerw | Hardware Support | 62 | 05-19-2016 08:18 PM |
Network Encoder Walkthrough - Draft | SageWizdom | SageTV Downloads & Instructions | 18 | 04-20-2016 09:01 PM |
SageTV as a network encoder / recording on network encoder works, not from server | perfessor101 | SageTV Software | 0 | 06-21-2014 05:59 AM |
network encoder stutters but ok on the encoder pc | stryker | SageTV Software | 4 | 01-09-2008 02:28 PM |
Network Encoder fot DVB-T? | pwiebe | SageTV Linux | 0 | 01-19-2006 09:20 AM |