SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-18-2021, 09:44 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Encoder Initialization Bug?

I am cross posting a thread I created here because I suspect it might be a bug with Sage and would like to get some different eyes on this for suggestions.

I have two HDPVR2s that work well about 80% of the time but the other 20% have problems initializing a recording. It gives the error:
Code:
[MainMsg@9c4132] Built:sage.EncodingException: ERROR (-6,0x80004005): There was a problem setting up hardware video compression. Please be sure you have the latest drivers installed for your capture device, and that they are installed correctly.
Mon 10/11 22:00:10.493 [DistributeHookNetClients@1d1d849] Sending hook to client for MediaPlayerError args=[Capture, ERROR (-6,0x80004005): There was a problem setting up hardware video compression. Please be sure you have the latest drivers installed for your capture device, and that they are installed correctly.]
Mon 10/11 22:00:10.494 [DistributeHookNetClients@180da3a] Sending hook to client for SystemStatusChanged args=[]
What makes me think this is a Sage issue/bug is that when I notice the error occurring with live TV, BOTH HDPVR2s will result in this error. Physically rebooting the HDPVRs does not fix the issue. Only restarting Sage will fix the issue. Also, when I know the issue is occurring, I am able to use the Hauppauge capture software with the HDPVRs.

In short, only Sage has occasional problems starting the HDPVRs, always both HDPVRs at the same time have issues, and only restarting Sage fixes the issue.

What's more annoying is that when Sage has this problem when recording a favorite, it simply records a blank file instead of trying to restart or canceling the recording and trying later. So, I need to delete these "blank" files that otherwise look like they recorded properly.

Does anyone have any idea what could be causing this or how I could troubleshoot to find any more info on it?
Reply With Quote
  #2  
Old 10-18-2021, 05:27 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
What are your video sources? I have noticed that the HDPVR2's really stumble when the source changes, or goes to sleep even. I have not seen this problem with Sage 64bit on Win 7 64 bit (2500k CPU, 16gb memory).

I'm also using (2) HDPVR2's, can I get you a log file of mine to use for comparison? I'm not great perusing the log files.
Reply With Quote
  #3  
Old 10-19-2021, 10:19 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
I am using two Directv receivers set to native resolution, so there is switching there, but I haven not been able to correlate that to the problem and even tried a 12 second wait to tune time. That also wouldn't account for both HDPVRs being always out of commission at the same time.

But your resolution comment got me thinking so compared my current log files to my log files from a few years ago with my original HDPVR 1212s. With all tuners, appears that Sage initially tries to record at 720x480, 30fps. In my older logs, there would be an entry after that that says the signal was detected and that the input resolution was either 720 or 1080, like the below entries. None of my current recordings, good or bad, have that entry with the HDPVR2. I'm not sure if that means anything or Sage no longer explicitly creates those entries.

In any case, the fact that both HDPVRs always have problems at the same time and only restarting Sage fixes them still makes me think there is a bug in Sage somewhere causing this. I guess my next approach is to migrate over to the 64bit version with a fresh install and see if that fixes everything.


Code:
Sun 6/4 1:00:06.523 [MainMsg@629cbc] Signal detected!
Sun 6/4 1:00:06.550 [MainMsg@629cbc] Detected capture input resolution lines=720
Reply With Quote
  #4  
Old 10-20-2021, 09:42 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
KryptoNyte, thanks for PM'ing me your log file. Your entries look completely different than mine. For example, I have much more info on the different encoding processes. Does Sage have a verbose logging mode that I somehow forgot about? If not, perhaps I just need to do a clean install with the 64 bit version.

Code:
Wed 9/29 6:39:51.231 [PooledThread@12ca9f] Playing IR tune command of 4
Wed 9/29 6:40:00.943 [MainMsg@26c17e] setEncodingProperties0 1177554952 HDPVRCustomMax
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property audiooutputmode to 0
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property audiocrc to 0
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property gopsize to 15
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property videobitrate to 8000000
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property peakvideobitrate to 13000000
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property inversetelecine to 0
Wed 9/29 6:40:00.944 [MainMsg@26c17e] Set encoding property closedgop to 0
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property vbr to 1
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property outputstreamtype to 1
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property width to 720
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property height to 480
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property audiobitrate to 384
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property audiosampling to 48000
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property disablefilter to 1
Wed 9/29 6:40:00.945 [MainMsg@26c17e] Set encoding property medianfilter to 3
Wed 9/29 6:40:00.946 [MainMsg@26c17e] Set encoding property fps to 30
Wed 9/29 6:40:00.946 [MainMsg@26c17e] Set encoding property ipb to 0
Wed 9/29 6:40:00.946 [MainMsg@26c17e] Set encoding property deinterlace to 0
Wed 9/29 6:40:00.946 [MainMsg@26c17e] Set encoding property aspectratio to 1
Wed 9/29 6:40:00.946 [MainMsg@26c17e] setupEncoding0 called for 1177554952 'Hauppauge Siena Video Capture-0' (ver 1.0)
Wed 9/29 6:40:00.946 [MainMsg@26c17e] setupEncoding0 Trace1 
Wed 9/29 6:40:00.949 [MainMsg@26c17e] setupEncoding0 Trace2 
Wed 9/29 6:40:00.949 [MainMsg@26c17e] setupEncoding0 Trace3 
Wed 9/29 6:40:00.972 [MainMsg@26c17e] setupEncoding0 Trace4 
Wed 9/29 6:40:00.973 [MainMsg@26c17e] setupEncoding0 Trace6 
Wed 9/29 6:40:00.973 [MainMsg@26c17e] setupEncoding0 Trace6-1 
Wed 9/29 6:40:00.973 [MainMsg@26c17e] setupEncoding0 Trace7 
Wed 9/29 6:40:00.973 [MainMsg@26c17e] setupEncoding0 Trace7-3
Wed 9/29 6:40:00.973 [MainMsg@26c17e] setupEncoding0 Trace8 
Wed 9/29 6:40:00.973 [MainMsg@26c17e] Exception from line: 866
Wed 9/29 6:40:00.973 [MainMsg@26c17e] Built:sage.EncodingException: ERROR (-6,0x80004005): There was a problem setting up hardware video compression. Please be sure you have the latest drivers installed for your capture device, and that they are installed correctly.
Wed 9/29 6:40:00.974 [DistributeHookNetClients@e96050] Sending hook to client for MediaPlayerError args=[Capture, ERROR (-6,0x80004005): There was a problem setting up hardware video compression. Please be sure you have the latest drivers installed for your capture device, and that they are installed correctly.]
Wed 9/29 6:40:00.974 [DistributeHookNetClients@12ca9f] Sending hook to client for SystemStatusChanged args=[]
Reply With Quote
  #5  
Old 10-21-2021, 04:50 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
If anyone knows of a way to increase the logging detail in Sage, please let me know and I'll crank it up for a more detailed log file.

If you currently have the 32 bit version of SageTV installed, it's quite safe to install the 64 bit version as a test and you can switch back and forth as you wish. The 64bit install is to a completely different folder. I just made sure that the 32 bit and 64 bit version services were not running at the same time.

Last edited by KryptoNyte; 10-21-2021 at 04:53 PM.
Reply With Quote
  #6  
Old 10-21-2021, 06:01 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by KryptoNyte View Post
If anyone knows of a way to increase the logging detail in Sage, please let me know and I'll crank it up for a more detailed log file.

If you currently have the 32 bit version of SageTV installed, it's quite safe to install the 64 bit version as a test and you can switch back and forth as you wish. The 64bit install is to a completely different folder. I just made sure that the 32 bit and 64 bit version services were not running at the same time.
Try creating a file in your main SageTV directory called "NATIVE_LOG.ENABLE". It can be empty as long as the file exists.
__________________
Windows Installer
Reply With Quote
  #7  
Old 10-21-2021, 06:05 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Got it. Thank you.
Reply With Quote
  #8  
Old 10-22-2021, 09:03 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
I plan to install the 64bit version this weekend and will test.

I hadn't had the native log option turned on but have now done so. The logs are much larger, but I am not sure it is giving me much more info on my issue.

One thing I noticed was an exception in the log. Is there a way to determine which line "866" is?

Code:
Thu 10/21 18:39:38.640 [MainMsg@18537d5] Exception from line: 866
Reply With Quote
  #9  
Old 10-22-2021, 09:28 AM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Evil_Attorney View Post
I plan to install the 64bit version this weekend and will test.

I hadn't had the native log option turned on but have now done so. The logs are much larger, but I am not sure it is giving me much more info on my issue.

One thing I noticed was an exception in the log. Is there a way to determine which line "866" is?

Code:
Thu 10/21 18:39:38.640 [MainMsg@18537d5] Exception from line: 866
It’s in the native encoder code: https://github.com/google/sagetv/blo...coder.cpp#L866

You can tell by all of the “setupEncoding0 Trace” comments and searching on GitHub.

Also I don’t remember but native logging may output to a different file. Check your SageTV directory.
__________________
Windows Installer

Last edited by wnjj; 10-22-2021 at 09:30 AM.
Reply With Quote
  #10  
Old 10-22-2021, 10:13 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Thank you wnjj. Based on the line error, it looks like Sage isn't finding the right encoding pin for some reason.
Reply With Quote
  #11  
Old 10-24-2021, 12:13 PM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
After some difficulties setting up the 64bit version, I was able to reproduce the same failure to start encoding issues as the 32bit. This time in my testing, I noticed that only one tuner locked up and only on 720p channels. The same "locked up" tuner was able to record 1080i channels. In other words, only recording in 720p "locked" but 1080i, at least at that moment, did not. I don't remember that being the case previously, but maybe there is a bit more variability to this issue.

I have had failures on 1080i recordings in the past and thought I did enough testing to show that it wasn't the resolution switching that was causing issues. However, I have once again switched to 1080i only on both receivers and will see how that goes. My old H21 receivers do a very bad job transcoding/upscaling 720p channels to 1080i, so if this ends up being the only fix, I may just move back to the older HDPVR 1212 models.
Reply With Quote
  #12  
Old 10-24-2021, 01:11 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Quote:
Originally Posted by wnjj View Post
Try creating a file in your main SageTV directory called "NATIVE_LOG.ENABLE". It can be empty as long as the file exists.
I did this. What logfile(s) exactly can I grab from my Sage server that will be most helpful to the OP? My HDPVR2's have been a little flaky once in a great while, but they've been far more reliable than other DVR software out there, so if you can tell me how to help the OP, I'll do it.

I'm just grasping at straws here, but do you have the HDPVR2's connected via USB 2.0 ports on your server's motherboard? Have you tried different USB ports on the server?
Reply With Quote
  #13  
Old 10-24-2021, 02:13 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by KryptoNyte View Post
I did this. What logfile(s) exactly can I grab from my Sage server that will be most helpful to the OP? My HDPVR2's have been a little flaky once in a great while, but they've been far more reliable than other DVR software out there, so if you can tell me how to help the OP, I'll do it.

I'm just grasping at straws here, but do you have the HDPVR2's connected via USB 2.0 ports on your server's motherboard? Have you tried different USB ports on the server?
That should create a new log file called “Native.log”. It may grow large with time so I wouldn’t leave that setting turned on. I’ve read that you need to restart SageTV after creating that enable file.
__________________
Windows Installer
Reply With Quote
  #14  
Old 10-24-2021, 03:07 PM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Quote:
Originally Posted by KryptoNyte View Post
I did this. What logfile(s) exactly can I grab from my Sage server that will be most helpful to the OP? My HDPVR2's have been a little flaky once in a great while, but they've been far more reliable than other DVR software out there, so if you can tell me how to help the OP, I'll do it.

I'm just grasping at straws here, but do you have the HDPVR2's connected via USB 2.0 ports on your server's motherboard? Have you tried different USB ports on the server?
From what I am seeing in the logs, Sage is getting “pins” wrong sometimes. I don’t exactly know what that means, but either Sage isn’t connecting to the HDPRV2 sometimes, or the driver blocks out connections to the device in some situations. Let’s see how the resolution lock works. That might help narrow things down.
Reply With Quote
  #15  
Old 10-25-2021, 10:20 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Locking the resolution of the DirecTV tuners to 1080i didn't help. Locked up when I tried this morning at 1080i. Setting back to native resolution. Either Sage is sometimes getting the "pins" wrong or the driver is sometimes acting weird for some reason.

Another wild guess, but, KryptoNyte, when did you buy your HDPVR2's? The original HDPVR 1212's had several versions. Perhaps that is the case here. Looks like I ordered mine at the start of 2013.
Reply With Quote
  #16  
Old 10-25-2021, 01:35 PM
wnjj wnjj is online now
Sage Icon
 
Join Date: Jan 2009
Posts: 1,514
Quote:
Originally Posted by Evil_Attorney View Post
Locking the resolution of the DirecTV tuners to 1080i didn't help. Locked up when I tried this morning at 1080i. Setting back to native resolution. Either Sage is sometimes getting the "pins" wrong or the driver is sometimes acting weird for some reason.

Another wild guess, but, KryptoNyte, when did you buy your HDPVR2's? The original HDPVR 1212's had several versions. Perhaps that is the case here. Looks like I ordered mine at the start of 2013.
Pins are basically ports in or out of the various components (DirectShow filters) in an A/V stream process. What SageTV does is ask the capture device driver for an output pin that is one of the MPEG types. If it doesn’t find one, the upstream filter isn’t configured properly or at least not yet. Perhaps there is some kind of reset or prep that SageTV could do but isn’t? Maybe restarting SageTV causes that to happen when the filter is reloaded fresh?
__________________
Windows Installer
Reply With Quote
  #17  
Old 10-25-2021, 06:18 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Yeah, there are quite a few different revisions of the HDPVR2. I believe I have one of the 1512 models, which was originally sold as the "HD video recorder" model. I also have one of the later Gaming models the GE PLUS (gaming edition plus) I believe because it was the only "GAMING" model that had optical audio (SPDIF) input in that series because I wanted 5.1 channel digital audio, and the SPDIF was the only reliable way to get it. I was never able to reliably get 5.1 channel audio via HDMI alone. I always made sure to purchase the Xbox360 slim 4gb model with the optical output.

I'll go see if I can find that logfile ...
Reply With Quote
  #18  
Old 10-25-2021, 06:30 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Given the flaky power supplies on the HDPVR's, have you replaced at least one of the power supplies on your HDPVR2's? What about pulling one of them to test on a second PC, to see if you can replicate the problem?
Reply With Quote
  #19  
Old 10-25-2021, 06:37 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
SageTVaholic
 
Join Date: Dec 2006
Posts: 2,754
Logs sent, see PM's.
Reply With Quote
  #20  
Old 10-26-2021, 09:49 AM
Evil_Attorney's Avatar
Evil_Attorney Evil_Attorney is offline
Sage Expert
 
Join Date: Sep 2004
Posts: 632
Thanks for the log file. I will look it over and compare with mine to see if I notice anything. I just ordered a new power supply for one of the HDPVR2s, so I can potentially eliminate that as an issue. Swapping over to another PC will be challenging since I don't have an extra available. Might be easier to do a complete reinstall of Windows.

I also uninstalled the Hauppauge capture program and device central program to see if that changes anything.
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
Waiting for SageTV to finish initialization perfessor101 SageTV Software 5 10-23-2013 01:31 PM
Waiting for SageTV to finish initialization .... tmiranda SageTV Beta Test Software 2 12-18-2008 07:21 AM
PVR-150 Remote Initialization Failed code0 Hardware Support 7 02-10-2005 05:35 PM
Hauppauge 350 Remote initialization failure with 350(15)/250 MCE (OEM-16) combo cards naln Hardware Support 10 08-11-2004 11:46 PM
Possible initialization problem with multi-tuner cards carlgar SageTV Software 23 04-27-2004 07:35 PM


All times are GMT -6. The time now is 11:14 AM.


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