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 11-14-2020, 12:29 AM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,638
UWP App Tuner

I'm starting to see the writing on the wall for Windows Media Center as a viable way to record DRM'd content, so like many of you, I have been playing around with HDHomeRun View on both Windows 10 and Android TV devices. Here's a solution I came up with that allowed me to do everything without any hardware encoding device.

Required Downloads:
<encoder_ip_address> is the IP address or hostname of the computer you want to do your playback of HDHomeRun View and recording with OBS. I recommend you not use a computer that someone expects to be able to work on, set it to automatically logon and to change the sleep/hibernate settings to never.

Configuration:
  1. Download everything you need from the list above.
  2. Install OpenDCT if you do not already have an instance running somewhere on your network.
  3. Create a new Generic HTTP Capture Device.
  4. In opendct.properties use the following:
    sagetv.device.<unique_id>.tuning_executable=http://<encoder_ip_address>:63236/uat/?tune=%c%
    sagetv.device.<unique_id>.stopping_executable=http://<encoder_ip_address>:63236/uat/?stop=true
    sagetv.device.<unique_id>.streaming_url=udp://<encoder_ip_address>:19999
  5. Install HDHomeRun View, MPEG-2 Video Extension, OBS Studio 64-bit and OBS WebSocket.
  6. Open HDHomeRun View and tune to a known DRM channel to verify the content will playback, then close it.
  7. Extract the OBS Studio Configuration Files to %AppData%\obs-studio
  8. Open %AppData%\obs-studio\basic\profiles\HDHomeRun_View_Record_to_UDP\basic.ini
  9. Find the line FFURL=udp://your-server:19999 and replace your-server with the hostname or IP address of the computer you have running OpenDCT.
  10. Open HDHomeRun View, then OBS to verify the HDHomeRun View video playback shows up in OBS.
  11. Close both applications.
  12. Extract UWP App Tuner to a folder and open UWPAppTuner.exe
  13. Under Application Control Settings:
    Change 3. to Resize and the resolution to 960x540.
    Change 4. Channel to a channel of your choosing and click the corresponding Test button. HDHomeRun View should open up to the requested channel.
    Click the Test button that corresponds with 5. Close to stop playback.
    Click the Create button to add this software to your startup folder so it opens every time you log in.
  14. Under HTTP Control Settings, click Enable to start the HTTP server.
  15. You may be prompted to enable permissions for the HTTP server to work.
  16. Open a web browser on another computer to http://<encoder_ip_address>:63236/uat/ to verify the server is available. You can also now test tuning (http://<encoder_ip_address>:63236/uat/?tune=<channel_number>) and stopping (http://<encoder_ip_address>:63236/uat/?stop=true) functionality.
  17. Under OBS Control Settings, click Enable.
  18. Click Save.
  19. Add the tuner you created in OpenDCT to SageTV and you should now be able to record anything you can view in the HDHomeRun View app.

Enable 5.1 Surround:
If you have a sound card in your chosen computer that supports 5.1 surround, you just need to enable it. If you are like me and using an oldish laptop that only has stereo output, you can install VB Cable, set it as your default playback device and enable 5.1 output like you would any other playback device. Note that without special configuration, you will cease hearing sound from your computer once you switch your default playback device to VB Cable. The configuration you extracted for OBS enabled 5.1 surround already, so the only limitation is you allowing the sound card to output 5.1 so it can be recorded.

How does it work?

Tuning a channel:
  1. Ensure HDHomeRun View and OBS (if enabled) are closed.
  2. Edit the HDHomeRun View config so the last channel is the one we want to tune.
  3. Open the HDHomeRun View app.
  4. Manipulate window if needed.
  5. (if enabled) Open OBS and Start Recording which streams over UDP to OpenDCT.

Stopping playback:
  1. (if enabled) Stop Recording in OBS.
  2. Close HDHomeRun View and OBS (if enabled).

Notes:
Clicking the X on UAT minimizes the app.

OBS opens "minimized" when UAT launches it; it's in the system tray.

The OBS source being used is Game Capture and all DRM'd content does not have a resolution greater than 960x540. Obviously if this resolution is a deal-breaker for you I wouldn't bother with this approach.

If you're experienced with OBS, you may notice that non-DRM content can be captured at greater resolutions. The instant you change to a DRM'd channel, the resolution drops again. It's a little hard to tell that it's stretching the content (visually it does look marginally lower resolution over the Android TV app), but I'm 99% certain OBS has the dimensions correct.

UAT monitors the HDHomeRun View app and if it closes during playback, it will re-open it automatically. In my testing, the app would sometimes crash unexpectedly after I apparently overloaded it with input while I was trying different approaches to make tuning reliable. The only way to stop this is to either click the Test button next to 5. Close under Application Control Settings or open http://<encoder_ip_address>:63236/uat/?stop=true

The UAT web server is intentionally single threaded, so only one request will go through to completion at a time.

The computer must be logged in as a user with a desktop and connected to an HDCP compliant display.

You may need to change the x264 encoder preset in OBS to something faster like ultrafast to get acceptable performance. If x264 uses to much in CPU resources, the HDHomeRun View app will likely freeze. I would suggest trying to keep the whole solution at 80% or less of your CPU's capacity.

This is a work in progress (I am not yet using it outside of testing), but so far it appears to be extremely stable. I have been able to record for 8 hours straight without any hiccups on a Latitude E6410. The only thing I would note is that it is imperative that your network connection be very reliable or the HDHomeRun View app will likely crash frequently or freeze playback.
Attached Files
File Type: zip UWPAppTuner 1.0.0.0.zip (421.9 KB, 28 views)
File Type: zip obs-studio.zip (5.4 KB, 22 views)
__________________
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

Last edited by EnterNoEscape; 11-17-2020 at 09:27 PM. Reason: Important missing setup info.
Reply With Quote
  #2  
Old 11-14-2020, 02:28 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 1,933
So am I missing something or do you still need to manually launch the HDHomeRun view app and then manually tune the channel you want to record? Is there no way to script a channel change?

How do you initiate the recording from Sage? Are you just doing a manual timed record?

Is there any reason this method would be limited to HDHomeRun view, or would it work with other software as well (for example could this be used to record from a streaming service)?

You mentioned playing around with Android... does this solution work with Android or does it require Windows?
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
Reply With Quote
  #3  
Old 11-14-2020, 03:32 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,638
Quote:
Originally Posted by Tiki View Post
So am I missing something or do you still need to manually launch the HDHomeRun view app and then manually tune the channel you want to record? Is there no way to script a channel change?

How do you initiate the recording from Sage? Are you just doing a manual timed record?

Is there any reason this method would be limited to HDHomeRun view, or would it work with other software as well (for example could this be used to record from a streaming service)?

You mentioned playing around with Android... does this solution work with Android or does it require Windows?
The attached UWP App Tuner 1.0.0.0.zip file contains a program I wrote that automatically manages everything you need to record the playback of the HDHomerun View app (opens software as needed and closes things when they are not being used). The app could probably have been done as a script, but this is the route I chose. You interface with the app via its web interface via OpenDCT which is controlled by SageTV. It shows up in SageTV like anything else. Maybe a video of the orchestration in motion would help clear things up for everyone?

It depends on if the streaming service is recordable by OBS. I thought about making things more open so you could specify "recipes" for different streaming services but I think it's complicated enough. The other problem would be maintaining changes in the streaming software you want to record. I only felt comfortable sharing this solution for HDHomeRun View is because it's highly accurate. I have yet to get the wrong channel tuned in. I'm extremely picky about this and have not provided any solutions like this before because of less than 99% accuracy.

Sorry, the Android thing probably was confusing. I've been looking around there too, but this is a Windows 10 only solution.
__________________
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
Reply With Quote
  #4  
Old 11-14-2020, 04:03 PM
NetworkGuy NetworkGuy is online now
Sage Fanatic
 
Join Date: Dec 2009
Location: Central NJ
Posts: 779
Quote:
Originally Posted by EnterNoEscape View Post
Sorry, the Android thing probably was confusing. I've been looking around there too, but this is a Windows 10 only solution.
Would it run on Windows 7? I never upgraded my SageTV server.
__________________
Server: Intel Core i5-3330 CPU; 8GB (2 x 4GB); 3-1TB WD Blue SATA 6.0Gb/s HDD; Windows 7; SageTV 9
Tuner: (2) HDHomeRun Prime
Client: (2) HD300
Client: Mini-Client, ShieldTV
Client: (2) Mini-Client, Fire TV Stick 4K
Reply With Quote
  #5  
Old 11-14-2020, 05:01 PM
EnterNoEscape's Avatar
EnterNoEscape EnterNoEscape is offline
SageTVaholic
 
Join Date: Jun 2010
Location: Harrisburg, PA
Posts: 2,638
Quote:
Originally Posted by NetworkGuy View Post
Would it run on Windows 7? I never upgraded my SageTV server.
The server can be Windows 7. The computer you run this capture setup on needs to be Windows 10.
__________________
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
Reply With Quote
  #6  
Old 11-14-2020, 05:15 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,433
Quote:
Originally Posted by EnterNoEscape View Post
needs to be Windows 10.
I'm out.
Reply With Quote
  #7  
Old 11-14-2020, 09:59 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 1,933
Quote:
Originally Posted by EnterNoEscape View Post
The attached UWP App Tuner 1.0.0.0.zip file contains a program I wrote that automatically manages everything you need to record the playback of the HDHomerun View app (opens software as needed and closes things when they are not being used). The app could probably have been done as a script, but this is the route I chose. You interface with the app via its web interface via OpenDCT which is controlled by SageTV. It shows up in SageTV like anything else. Maybe a video of the orchestration in motion would help clear things up for everyone?

It depends on if the streaming service is recordable by OBS. I thought about making things more open so you could specify "recipes" for different streaming services but I think it's complicated enough. The other problem would be maintaining changes in the streaming software you want to record. I only felt comfortable sharing this solution for HDHomeRun View is because it's highly accurate. I have yet to get the wrong channel tuned in. I'm extremely picky about this and have not provided any solutions like this before because of less than 99% accuracy.

Sorry, the Android thing probably was confusing. I've been looking around there too, but this is a Windows 10 only solution.
Ok so the steps described in the “How does it work” section of your original post are what your app does for us? That makes a lot more sense. I misunderstood and thought you were saying those were the instructions we needed to follow each time we wanted to record something.
__________________
Server: Ryzen 2400G with integrated graphics, ASRock X470 Taichi Motherboard, HDMI output to Vizio 1080p LCD, Win10-64Bit (Professional), 16GB RAM
Capture Devices (7 tuners): Colossus (x1), HDHR Prime (x2)
,USBUIRT (multi-zone)
Source:
Comcast/Xfinity X1 Cable
Primary Client: Server Other Clients: (1) HD200, (1) HD300
Retired Equipment: MediaMVP, PVR150 (x2), PVR150MCE,
HDHR, HVR-2250, HD-PVR
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
Digital Tuner: fixed RF channel and alternate tuner control shadeblue.com Hardware Support 3 04-15-2017 12:06 PM
New Hauppauge CableCard Tuner for pre-order, shipping this month! $129 for dual tuner jptheripper Hardware Support 6 08-07-2011 12:15 PM
enabling channels on analog tuner also enables them on digital tuner LaoChe SageTV EPG Service 2 02-02-2011 08:09 PM
Added 2nd tuner (Hauppauge HVR-1600), no audio on analog, no digital tuner jtimmes SageTV Linux 4 02-02-2010 10:22 PM
HDTV Built-In tuner (Samsung 50" DLP) VS. Vbox 150 Tuner in PC? Generalg Hardware Support 3 07-17-2006 10:59 PM


All times are GMT -6. The time now is 08:38 AM.


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