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
  #61  
Old 03-20-2015, 07:45 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by mechling-burgh View Post
Everything thing is happening on one machine. I might see what is recording tonight on the main server and copy the sage directory over from the test machine to see if it works better on that unit. They are both core duo but the main server has a much better network card. Turning off the fire wall did not help me. Like I said the files are being created so it is working. The problem starts with the play back and the file only being 1 minute and 12 seconds long. That is the part I find weird. I also tried setting up a recording and tried to start playing in back after a few minutes that did not work. If I would wait for the recording to finish it would play back but it would have missing spots due to the recording stopping and starting.
That is some interesting information. A few more questions.

1. Are you using UNC paths or Local paths for recording directories?
2. Can you preview a channel in HDHomeRun app without studder or pixelation?
3. Which version of ffmpeg are you using?
Reply With Quote
  #62  
Old 03-20-2015, 07:49 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by nyplayer View Post
The only problem I have is that if the firewall is turned on and I finish watching a livetv show or a recording ends it will not release the tuner... The light stays on but if I turn off the firewall when a recording ends it releases the tuner. I am going to use Process Explorer to see if something else has to be unblocked from the firewall.
I do not explicitly stop the HDHomeRun from tuning the channel when Sage stops the recording. I only stop the ffmpeg process. I wonder if that is why the tunner is still in use. I will look and see if there is an explicit command to stop it from advertising the UDP stream.
Reply With Quote
  #63  
Old 03-20-2015, 08:11 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by jvl711 View Post
I do not explicitly stop the HDHomeRun from tuning the channel when Sage stops the recording. I only stop the ffmpeg process. I wonder if that is why the tunner is still in use. I will look and see if there is an explicit command to stop it from advertising the UDP stream.
I just do not understand when the firewall is turned off the tuner is released with the firewall on It stays lit.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #64  
Old 03-20-2015, 08:31 AM
mechling-burgh mechling-burgh is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Pittsburgh, PA
Posts: 406
Tried the newest ffmpeg and an old version from a mcebuddy install. I have also tried UNC paths and local Paths. I have tried increasing the tuning delay and fast tuning setting. I'm sure it's something simple or stupid but not sure what it is.
Reply With Quote
  #65  
Old 03-20-2015, 08:32 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by nyplayer View Post
I just do not understand when the firewall is turned off the tuner is released with the firewall on It stays lit.
It does stops recording to the file right? Do you know if the tuner is considered locked for recording? I wonder if it will cause issues?
Reply With Quote
  #66  
Old 03-20-2015, 08:34 AM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by mechling-burgh View Post
Tried the newest ffmpeg and an old version from a mcebuddy install. I have also tried UNC paths and local Paths. I have tried increasing the tuning delay and fast tuning setting. I'm sure it's something simple or stupid but not sure what it is.
Can you preview a channel in HDHomerRun config without any issues?
Reply With Quote
  #67  
Old 03-20-2015, 09:12 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by jvl711 View Post
It does stops recording to the file right? Do you know if the tuner is considered locked for recording? I wonder if it will cause issues?
Yes just tested again with the Firewall on the light stays lit on the Tuner ... the recording does stop. But if i try to watch again I get no signal. It appears that the tuner though not recording stays in use. Only happens with the firewall on. I have to reboot the tuner to get that tuner back. So I added a reboot prior to running your encoder ... but for now I just keep the firewall off.

Code:
"c:\Program Files\Silicondust\HDHomeRun\hdhomerun_config.exe" 13147C7B set /sys/restart self
cd "C:\PrimeNetEncoder v0.0.1"
c:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar PrimeNetEncoder.jar
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 03-20-2015 at 09:17 AM.
Reply With Quote
  #68  
Old 03-20-2015, 09:29 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Even though Sage Stops the recording and nothing is being created. HD Homerun Config still has the tuner open. I have attached a picture 5 minutes after I stopped the recording. as you can see it is still broadcasting that channel. As of this writing it is still broadcasting.
Attached Images
File Type: jpg recordingstooped.jpg (70.6 KB, 192 views)
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #69  
Old 03-20-2015, 10:39 AM
mechling-burgh mechling-burgh is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Pittsburgh, PA
Posts: 406
Do you mean while recording or in general. I have tested the hd prime on this computer before and was able to view the channel. I have not tried while it is recording to open the stream in the silicondust viewer. I will give that a try tonight and double check that it's working normally on the computer.

Mark
Reply With Quote
  #70  
Old 03-20-2015, 10:55 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
The HDHomeRun does 'lock resources', so that is likely what is happening. I've never dealt with the command line application, but I know you can see this Resource Lock on the web interface under the Tuner Status page for the affected tuner. At the bottom, it will list the IP address of the client that 'owns' that tuner. Just stopping grabbing the stream does not necessarily release the lock, it seems, so the tuner would have to be stopped as well when Sage sends a STOP command.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #71  
Old 03-20-2015, 11:00 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by Fuzzy View Post
The HDHomeRun does 'lock resources', so that is likely what is happening. I've never dealt with the command line application, but I know you can see this Resource Lock on the web interface under the Tuner Status page for the affected tuner. At the bottom, it will list the IP address of the client that 'owns' that tuner. Just stopping grabbing the stream does not necessarily release the lock, it seems, so the tuner would have to be stopped as well when Sage sends a STOP command.
Something is sending the Stop command because when I disable the firewall the tuner stops but if the firewall is enabled the tuner will not stop ... It appears the firewall is blocking a command but I do not know what to unblock.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #72  
Old 03-20-2015, 11:08 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
I found this. I tested it and it does stop the tuner.


hdhomerun_config <id> get /sys/features
To stop the tuner set the channel to none:
format: hdhomerun_config <id> set /tuner<n>/channel none
eg: hdhomerun_config FFFFFFFF set /tuner0/channel none

https://www.silicondust.com/hdhomeru...evelopment.pdf

For now I will continue to run with the firewall turned off. Will await a new encoder or someone can figure out what firewall is blocking.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 03-20-2015 at 11:24 AM.
Reply With Quote
  #73  
Old 03-20-2015, 11:33 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
The firewall may be altering how the connection is either maintained, or terminated, which is affecting the HDHR's ability to detect when that channel is no longer needed. Who knows. Firewalls are pointless within a private network, and usually cause more problems than they are worth.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #74  
Old 03-20-2015, 11:41 AM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by Fuzzy View Post
The firewall may be altering how the connection is either maintained, or terminated, which is affecting the HDHR's ability to detect when that channel is no longer needed. Who knows. Firewalls are pointless within a private network, and usually cause more problems than they are worth.
Found this. You are probably right.

Resource lock:
The resource lock API is used to prevent conflicts when there are multiple hosts on the network
controlling the same set of tuners.
Low level: use hdhomerun_device_tuner_lockkey_request() to request exclusive control of the
tuner. This function will return success (1) if the request was successful, reject (0) if the tuner is
in use by anther host, or error (-1) if a communication error occurs.
When the tuner lock is no longer required use hdhomerun_device_tuner_lockkey_release() to
release the resource lock.
The hdhomerun_device_tuner_lockkey_force() API will cause a resource lock to be released
regardless of which host owns the lock. This function should only be called if the user has been
presented with a dialog and the user has explicitly requested that the lock be overridden.
The HDHomeRun will self expire the resource lock if not streaming and no commands are received
in a 30s period. If the host application crashes without releasing the resource lock this timeout will
allow the tuner to be used again. The exception - if the tuner is streaming video and the host has
a firewall that prevents ICMP port unreachable messages the tuner will not be informed that the
video is no longer being accepted by the host. Streaming will continue and the tuner will maintain
the lock.

To avoid this situation use the Device Selector API to request the resource lock. This will autodetect
and release dead locks - see Device Selector API section below.
Note: the detection and automatic release of dead resource locks is planned to be moved to
hdhomerun_device_tuner_lockkey_request(). If this affects your application please contact
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 03-20-2015 at 11:45 AM.
Reply With Quote
  #75  
Old 03-20-2015, 11:44 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Sounds like it's working as designed then. Just because ffmpeg is closed, and it stops listening for the stream, doesn't stop the HDHomeRun from sending the stream packets to the client. The firewall is blocking the traditional response to an unsolicited packet (ICMP port unreachable), so it just keeps on sending. Removing the firewall allows the ICMP error to make it to the HDHR, and it stops streaming and releases the lock. Not the preferred method of stopping, so hopefully he can roll a stop command into there.
__________________
Buy Fuzzy a beer! (Fuzzy likes beer)

unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers.
Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA.
Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S
Other Clients: Mi Box in Master Bedroom, HD-200 in kids room
Reply With Quote
  #76  
Old 03-20-2015, 02:28 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by Fuzzy View Post
Sounds like it's working as designed then. Just because ffmpeg is closed, and it stops listening for the stream, doesn't stop the HDHomeRun from sending the stream packets to the client. The firewall is blocking the traditional response to an unsolicited packet (ICMP port unreachable), so it just keeps on sending. Removing the firewall allows the ICMP error to make it to the HDHR, and it stops streaming and releases the lock. Not the preferred method of stopping, so hopefully he can roll a stop command into there.

Completely agree. Good research by nyplayer and Fuzzy. At a minimum I can set the channel to none which should stop the stream. I will look and see if I can stop the stream by setting the target to none.
Reply With Quote
  #77  
Old 03-20-2015, 02:33 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by jvl711 View Post
Completely agree. Good research by nyplayer and Fuzzy. At a minimum I can set the channel to none which should stop the stream. I will look and see if I can stop the stream by setting the target to none.
Thanks I am watching NCAA and channel surfing using your encoder has not failed me ... with Firewall off.
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.
Reply With Quote
  #78  
Old 03-20-2015, 06:07 PM
mechling-burgh mechling-burgh is offline
Sage Aficionado
 
Join Date: Feb 2006
Location: Pittsburgh, PA
Posts: 406
Well tested local and unc paths again no difference still get no signal. Checked the preview window in the silicondust preview while it is recording and it plays fine, but still getting 1 minute and 12 second long files.
Reply With Quote
  #79  
Old 03-20-2015, 06:34 PM
jvl711's Avatar
jvl711 jvl711 is offline
Sage Fanatic
 
Join Date: Jan 2004
Posts: 825
Quote:
Originally Posted by mechling-burgh View Post
Well tested local and unc paths again no difference still get no signal. Checked the preview window in the silicondust preview while it is recording and it plays fine, but still getting 1 minute and 12 second long files.
So it seems that the recording is starting, but for some reason sage beleives the recording did not start, and it stops the recording around 1 minute. Is it possible for some strange reason sage does not have proper rights to playback the file? From the logs does it seem that sage is stopping the recording and starting it again. Every 1 minute. Does the size of the recording file grow while it is recording, or only after the recording stops?
Reply With Quote
  #80  
Old 03-20-2015, 06:39 PM
nyplayer nyplayer is offline
SageTVaholic
 
Join Date: Sep 2005
Posts: 4,997
Quote:
Originally Posted by mechling-burgh View Post
Well tested local and unc paths again no difference still get no signal. Checked the preview window in the silicondust preview while it is recording and it plays fine, but still getting 1 minute and 12 second long files.
Mine is fully functional except that I have to keep the firewall off. I am using Java7 32 bit and ffmpeg 32 bit. I pointed my batch file to the Java 7 to make sure it uses that one as I have java 8 64 bit Installed. I do not use the runnable task in Sage. What javas do you have Installed and what version of ffmpeg are you using 64 or 32 bit? Maybe you should try a batchfile instead of runnable in sage properties. I like it because I have more control during testing I do not have to shutdown Sage in case there is a problem. Also you do know that if it fails it is possible you have to reboot your tuner if the light stays on or else you will get no signal once you try without rebooting.

cd "C:\PrimeNetEncoder v0.0.1"
c:
"C:\Program Files (x86)\Java\jre7\bin\java.exe" -jar PrimeNetEncoder.jar
__________________
Channels DVR UBUNTU Server 2 Primes 3 Connects TVE SageTV Docker with input from Channels DVR XMLTV and M3U VIA Opendct.

Last edited by nyplayer; 03-20-2015 at 06:43 PM.
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
Prime Encoder Script checkbin SageTV Linux 14 03-22-2015 07:50 AM
SageTV as a network encoder / recording on network encoder works, not from server perfessor101 SageTV Software 0 06-21-2014 05:59 AM
Ubuntu + HDHomerunPrime + Prime Encoder matt91 SageTV Linux 2 03-23-2014 03:46 PM
HDHomerun Prime? cenwesi Hardware Support 26 04-19-2011 05:40 PM


All times are GMT -6. The time now is 06:43 AM.


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