SageTV Community  

Go Back   SageTV Community > Hardware Support > Hardware Support

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 04-16-2021, 04:20 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Any Colossus 2 w Linux Success Stories?

Hauppauge has released a Linux driver and instructions for their Colossus 2 cards. I followed their instructions using the "152000_patched" drivers, on a (Ubuntu 20.04) Linux server, and the device appears as "Hauppauge WinTV" from the lsusb.

When I've attempted to run the Hauppauge-provided TestApp, the device does not produce a usable capture. This does not concern me so much, as I am more concerned with how the device responds to Sage commands and configuration. Unfortunately, the Colossus 2 does not appear as a capture source in Sage. For what it's worth, an HD-PVR does appear, and performs as expected.

I have to assume that I'm missing something. Has anyone gotten the Colossus 2 to capture in Sage on a Linux server?
Reply With Quote
  #2  
Old 04-16-2021, 09:31 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 479
Are you using the "Ubuntu installation instructions for the Colossus 2 and HD PVR 2" instructions?

If so, ignore those, the stuff Hauppague provides in those instructions has never worked well or reliably.

Instead, use the code they link to at the bottom by John Poet which is on github here:

https://github.com/jpoet/HauppaugeUSB

It's basically a wrapper around Hauppauge's code with a bunch of fixes, but it actually works and is stable.

I have not tested it with Colossus2 on Linux, but have been running HauppaugeUSB on my Sage box with two HDPVR2s for several years with good results. The HauppaugeUSB project page claims it supports both, so I would start there.

If you can use Docker, I created a Docker image to build the HauppaugeUSB project so you don't have to deal with setting up a build environment:

https://github.com/jwittkoski/Hauppa...docker-builder

Note also that Sage will not detect the HDPVR2 or Colossus2 directly. You will need to set it up using OpenDCT.

--John
Reply With Quote
  #3  
Old 04-17-2021, 10:02 AM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Quote:
Originally Posted by jpwegas View Post
Are you using the "Ubuntu installation instructions for the Colossus 2 and HD PVR 2" instructions?

If so, ignore those, the stuff Hauppague provides in those instructions has never worked well or reliably.

Instead, use the code they link to at the bottom by John Poet which is on github here:

https://github.com/jpoet/HauppaugeUSB

It's basically a wrapper around Hauppauge's code with a bunch of fixes, but it actually works and is stable... Note also that Sage will not detect the HDPVR2 or Colossus2 directly. You will need to set it up using OpenDCT.--John
I had already attempted to use the instructions from the John Poet project, but for some reason the installation was unsuccessful, the "/opt/Hauppauge/" directory was not created, so i know there was a problem there.

I don't have any knowledge of or experience with OpenDCT. Is this required to make the Colossus 2 appear as a capture source within Sage on Linux?
Reply With Quote
  #4  
Old 04-17-2021, 12:57 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 479
Quote:
Originally Posted by jchiso View Post
I had already attempted to use the instructions from the John Poet project, but for some reason the installation was unsuccessful, the "/opt/Hauppauge/" directory was not created, so i know there was a problem there.
The sudo make install step should have created that directory.

Quote:
Originally Posted by jchiso View Post
I don't have any knowledge of or experience with OpenDCT. Is this required to make the Colossus 2 appear as a capture source within Sage on Linux?
Yes.

--John
Reply With Quote
  #5  
Old 04-17-2021, 01:30 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Quote:
Originally Posted by jpwegas View Post
The sudo make install step should have created that directory...
In looking at the documentation, I assumed as much, but the directory was not created. I will attempt another install later on. It seems that the permissions on the Ubuntu server are pervasive. Several scripts and facets of the SageTV Client fail with little indication as to why ...
Reply With Quote
  #6  
Old 04-18-2021, 08:17 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
There was an additional dependency not listed for the John Poet setup. Ubuntu Server 20.04 does not have pkg-config installed, by default. After installing it, the "make install" completed successfully.

The Colossus 2 is recognized by the system and I was able to do an HDMI test capture that had some playback issues, and no audible audio (the file shows as having AC3 audio), but the file would not play in Sage, and the Colossus device does not appear as a configurable capture source option ...
Reply With Quote
  #7  
Old 04-18-2021, 08:39 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 479
Quote:
Originally Posted by jchiso View Post
There was an additional dependency not listed for the John Poet setup. Ubuntu Server 20.04 does not have pkg-config installed, by default. After installing it, the "make install" completed successfully.

The Colossus 2 is recognized by the system and I was able to do an HDMI test capture that had some playback issues, and no audible audio (the file shows as having AC3 audio), but the file would not play in Sage, and the Colossus device does not appear as a configurable capture source option ...
Here are the options I am using with my HDPVR2:

Code:
/opt/Hauppauge/bin/hauppauge2 -s $device_id -i 3 -a 3 -d 2 --logpath /tmp > video.mpg
That is for HDMI video/audio input and AC3 audio. If you are using HDMI audio, make sure you do not have anything plugged into the SPDIF port. I have my AV source set to PCM output via HDMI, but I have not tested with other options.

--John
Reply With Quote
  #8  
Old 04-18-2021, 09:43 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Quote:
Originally Posted by jpwegas View Post
Here are the options I am using with my HDPVR2:

Code:
/opt/Hauppauge/bin/hauppauge2 -s $device_id -i 3 -a 3 -d 2 --logpath /tmp > video.mpg
That is for HDMI video/audio input and AC3 audio...
Thanks. I realize that I had set the encoding options incorrectly. I could not find a proper list of usage and syntax for the capture program, but the sample file indicates that HDMI AC3 encoding required arguments of "-a 3 -d 2".

So we're getting closer; an HDMI capture with AC3 audio via the HDMI port ...

Last edited by jchiso; 04-18-2021 at 09:45 PM.
Reply With Quote
  #9  
Old 04-19-2021, 08:49 AM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Quote:
Originally Posted by jpwegas View Post
... Note also that Sage will not detect the HDPVR2 or Colossus2 directly. You will need to set it up using OpenDCT ...
I've installed OpenDCT, but the Colossus 2 is not detected. Are there additional steps required for the Colossus/HDPVR 2-series encoders?
Reply With Quote
  #10  
Old 04-19-2021, 08:08 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 479
Quote:
Originally Posted by jchiso View Post
I've installed OpenDCT, but the Colossus 2 is not detected. Are there additional steps required for the Colossus/HDPVR 2-series encoders?
Yes, OpenDCT will not automatically detect these devices. You'll have to set it up as a "generic pipe capture device".

I generally followed the directions here:
https://forums.sagetv.com/forums/showthread.php?t=63823

But the details of the command to start the capture and how you are tuning the source device will be specific to your setup.

For example, in my case, the "streaming executable" calls a script which tunes the source device and then starts the hauppauge2 command to generate the video stream.

You could also do the tuning directly in Sage with the options there, but you will still need to change the streaming executable in the opendct config.

--John
Reply With Quote
  #11  
Old 04-21-2021, 12:01 AM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Quote:
Originally Posted by jpwegas View Post
]... You could also do the tuning directly in Sage with the options there ...
This is tripping me up: I can tune via the Generic Tuner Plugin if I connect directly to the SageTV server. However, if I connect to the Video Source as a Network Encoder, the channel change commands are ignored. In these setups I am using a Window-based server to connect to the Linux host ...
Reply With Quote
  #12  
Old 04-24-2021, 09:14 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 479
Quote:
Originally Posted by jchiso View Post
This is tripping me up: I can tune via the Generic Tuner Plugin if I connect directly to the SageTV server. However, if I connect to the Video Source as a Network Encoder, the channel change commands are ignored. In these setups I am using a Window-based server to connect to the Linux host ...
Not sure I can help here, my Sage server and my network encoder are the same host, so when I used Generic Tuner Plugin in the past everything was local to the server. With my current setup in OpenDCT (network encoder running locally) I use the streaming executable to tune the channel and don't have tuning configured in the Sage tuner config.

--John
Reply With Quote
  #13  
Old 04-24-2021, 11:09 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
Quote:
Originally Posted by jpwegas View Post
Not sure I can help here ... I use the streaming executable to tune the channel and don't have tuning configured in the Sage tuner config.
Perhaps you can help; what does your combo Streaming Executable/Channel Tuning script look like? I have to admit, it is odd that the tuning plugin is being ignored in this configuration, as it works flawlessly and quickly when I connect directly to the server ...
Reply With Quote
  #14  
Old 04-27-2021, 08:08 PM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
I've added an HD-PVR to this server, and both capture sources work; the HD-PVR natively, and the Colossus 2 via OpenDCT. However, things seem to be going backwards. The server shows and connects with an HD-300, but does not show in the drop-down server list option as a Windows Client. I think all of my ufw firewall settings are in place, so Client and Network Encoder connectivity should be okay, but they are not.

I've checked the Sage.properties file of the server, and the enable_encoding_server parameter is set to "true", the encoding_discovery_port parameter is set to "8271", and the encoding_server_port parameter is set to "6969". Are there any other parameters that affect announcing and or connecting to a Sage server?
Reply With Quote
  #15  
Old 04-28-2021, 05:30 PM
jpwegas jpwegas is offline
Sage Aficionado
 
Join Date: May 2007
Posts: 479
Quote:
Originally Posted by jchiso View Post
Perhaps you can help; what does your combo Streaming Executable/Channel Tuning script look like? I have to admit, it is odd that the tuning plugin is being ignored in this configuration, as it works flawlessly and quickly when I connect directly to the server ...
So relevent snippets of my OpenDCT config looks like:

Code:
generic.pipe.device_names_csv=DCT-HDPVR2 Samsung-1,DCT-HDPVR2 Samsung-2
and:

Code:
sagetv.device.-518298343.consumer=opendct.consumer.DynamicConsumerImpl
sagetv.device.-518298343.custom_channels=
sagetv.device.-518298343.delay_to_wait_after_tuning=0
sagetv.device.-518298343.device_name=DCT-HDPVR2 Samsung-2
sagetv.device.-518298343.encoder_listen_port=9000
sagetv.device.-518298343.encoder_merit=0
sagetv.device.-518298343.encoder_pool=generic_pipe
sagetv.device.-518298343.exclusive_server_address=
sagetv.device.-518298343.fast_network_encoder_switch=false
sagetv.device.-518298343.last_channel=632
sagetv.device.-518298343.stopping_executable=
sagetv.device.-518298343.streaming_executable=/usr/bin/perl /opt/sagetv/hdhomerun/samsung_wrapper Samsung-2 %c%
sagetv.device.-518298343.transcode_profile=
sagetv.device.-518298343.tuning_delay_ms=0

sagetv.device.-518298344.consumer=opendct.consumer.DynamicConsumerImpl
sagetv.device.-518298344.custom_channels=
sagetv.device.-518298344.delay_to_wait_after_tuning=0
sagetv.device.-518298344.device_name=DCT-HDPVR2 Samsung-1
sagetv.device.-518298344.encoder_listen_port=9000
sagetv.device.-518298344.encoder_merit=0
sagetv.device.-518298344.encoder_pool=generic_pipe
sagetv.device.-518298344.exclusive_server_address=
sagetv.device.-518298344.fast_network_encoder_switch=false
sagetv.device.-518298344.last_channel=899
sagetv.device.-518298344.stopping_executable=
sagetv.device.-518298344.streaming_executable=/usr/bin/perl /opt/sagetv/hdhomerun/samsung_wrapper Samsung-1 %c%
sagetv.device.-518298344.transcode_profile=
sagetv.device.-518298344.tuning_delay_ms=0
And the samsung_wrapper script looks like:
Code:
#!/usr/bin/perl

#
# Tune channel and start recording
#

use strict;

#
# Collect command line arguments
#
my $device_id = $ARGV[0];
my $channel = $ARGV[1];

#
# Determine the device to tune and tuning arguments
#
my $remote_id = "go-samsung-tv";
my $remote_name = "SageTV               "; # padding required

# Maps tuner specified in streaming_executable to the IP needed for tuning
my $device_map = { 'Samsung-1' => '10.1.1.105',
                   'Samsung-2' => '10.1.1.106',
                 };

# Maps tuner specified in streaming_executable to the device ID needed by hauppauge2 for recording
my $device_id_map = { 'Samsung-1' => 'E505-00-XXXXXX01',
                      'Samsung-2' => 'E505-00-XXXXXX02',
                    };

if ( ! defined($device_map->{$device_id}) ) {
    exit 1;
}

my $device_ip = $device_map->{$device_id};
my $device_id = $device_id_map->{$device_id};

my $keys_to_send = "";

my @keys = split('', $channel);
foreach my $key ( @keys ) {
    $keys_to_send .= "KEY_$key ";
}
$keys_to_send .= "KEY_ENTER";

#
# Tune device
#
my $tuning_cmd = "samsungctl -v --timeout 5 --host $device_ip --id \"$remote_id\" --name \"$remote_name\" $keys_to_send";
system("$tuning_cmd 1>&2");

#
# Start recording
#
my $recording_cmd = "/opt/Hauppauge/bin/hauppauge2 -s $device_id -i 3 -a 3 -d 2 --logpath /tmp";
system("$recording_cmd");

exit;
The wrapper does a few things:
  • It is used by both devices defined in the OpenDCT config
  • It determines which physical "tuner" device should be tuned based on the device name passed in.
  • It determines the ID of the HDPVR2 device is associated with the device name passed in.
  • It tunes the device
  • It starts recording using the hauppauge2 executable.

The tuning parts are very specific to my setup. You would likely use something else to do the tuning, but this is an example of how I use the single script to support two HDPVR2 devices.

I don't remember why I didn't just define the tuner on the SageTV config and use GenericTunerPlugin, I would think that would also work but I don't remember testing it.

--John
Reply With Quote
  #16  
Old 05-22-2021, 12:12 AM
jchiso jchiso is offline
Sage Expert
 
Join Date: Nov 2003
Location: Columbus, OH
Posts: 663
I followed your example and incorporated my tuning action with the streaming/capture script.

Here are my snippets ...

For the OpenDCT properties:
Code:
generic.pipe.device_names_csv=Hauppauge Colossus 2 AF16AF,Hauppauge Colossus 2 D8024A,Hauppauge Colossus 2 D802D9
and:
Code:
sagetv.device.-1579054534.device_name=Hauppauge Colossus 2 D802D9
sagetv.device.-1579054534.stopping_executable=^C
sagetv.device.-1579054534.streaming_executable=/opt/opendct/Sagebox21Stream DSS6 %c%

sagetv.device.-1579055022.device_name=Hauppauge Colossus 2 D8024A
sagetv.device.-1579055022.stopping_executable=^C
sagetv.device.-1579055022.streaming_executable=/opt/opendct/Sagebox21Stream DSS2 %c%

sagetv.device.-1651979138.device_name=Hauppauge Colossus 2 AF16AF
sagetv.device.-1651979138.stopping_executable=^C
sagetv.device.-1651979138.streaming_executable=/opt/opendct/Sagebox21Stream DSS1 %c%
The combo tuning/capture script looks like this. It harkens back to my old Windows-based simple batch file tuner for ethernet enabled DirecTV STBs.

It generates a channel tune request based on whether a "major" or "major and minor" channel is requested. In my Channel Guides, minor-enabled channels are given a five-digit Physical Channel number, where the first digit is a '1' and the sub-channel digit is the fifth digit. A Logical Channel of 249-1 has a Physical Channel designation of '12491'. '634-3' is mapped as '16343'.

The streaming command issued by the 'Sagebox21Stream' executable populates the device serial and executes the capture command using the 'hauppauge2' program.

Here's the 'Sagestream21' script:
Code:
#!/bin/bash
#
#
useSTB=$1
chanraw=$2
# printf 'Enter the Video Source Designation: '
# read useSTB
# printf 'Enter the channel: '
# read chanraw

case $useSTB in
     DSS1)
	IPVAL="31" ;;
     DSS2)
	IPVAL="32" ;;
     DSS3)
	IPVAL="33" ;;
     DSS4)
	IPVAL="34" ;;
     DSS5)
	IPVAL="35" ;;
     DSS6)
	IPVAL="36" ;;
        *)
        IPVAL="37" ;;
esac
if [ $chanraw -gt 999 ]; then
   chanpre=${chanraw:1:3}
   chansub=${chanraw:4:1}
   tunecmd=http://192.168.1.$IPVAL:8080/tv/tune?major=$chanpre"&"minor=$chansub
else
   tunecmd=http://192.168.1.$IPVAL:8080/tv/tune?major=$chanraw
fi
wget -q -O \dev\null $tunecmd

case $useSTB in
     DSS1)
        DEVICE_SER="E585-00-00AF16AF";;
     DSS2)
        DEVICE_SER="E585-00-00D8024A";;
     DSS3)
        DEVICE_SER="E585-00-00000000";;
     DSS4)
        DEVICE_SER="E585-00-00000000";;
     DSS5)
        DEVICE_SER="E585-00-00000000";;
     DSS6)
        DEVICE_SER="E585-00-00D802D9";;
        *)
        DEVICE_SER="E585-00-00000000";;
esac
# Send Capture Command
capturecmd="/opt/Hauppauge/bin/hauppauge2 -s $DEVICE_SER -i 3 -a 3 -d 2"
$capturecmd

exit;
I've not yet fully deployed the system, as I did a swap/build on hardware, but in testing, I can tune and capture via all of the Colossus 2 cards, as the native server or as network encoders for other Sage (front-end) servers; which was my sole intent of this project.

Getting closer to the finish line ...
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
Windows Installation V9 Success Stories Pelicanjoe SageTV Github Development 41 08-31-2016 10:36 AM
Getting the channels back - success stories only please wigglytoes General Discussion 5 04-29-2010 07:23 AM
SageTV Server running Linux? Any success stories? Brent SageTV Linux 13 07-02-2008 08:48 PM
Anyone with wireless MVP success stories? jkf SageTV Media Extender 8 06-13-2007 07:18 PM
SageTV Client - Setup - Extender? - Success Stories? DRM2PVR Hardware Support 11 11-22-2005 06:00 PM


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


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