SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Github Development

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 02-26-2017, 11:34 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Odd problem with Network Encoder

I'm not sure what exactly is happening, but I'll do my best to explain.

I use the sage v9 docker and also a sage v7 installed on a windows 2012 VM to host my colossus cards as network tuners.

Everything works, but there has been some strange behavior recently.

First, I've tested gentuner and it is able to tune without issue on all three colossus cards, but for some reason the channel will change in the middle of a recording for something that should be recording on another tuner. I check the other tuner and the recording is fine. Huh? It's almost as if the channel is getting changed on two boxes at once. That makes no sense, but it's happening. I've tested repeatedly and can't figure out what could be causing the issue.

Second, at the end of a show I get "colossus stopped producing data" errors if I'm watching live TV. Happens every time. Nothing has changed in my setup so I'm not sure where to start. If I try to play the show that should be recording still I get filesystem access errors even though nothing is technically wrong. After about a minute it returns to normal.

This was especially annoying tonight during the Oscars since it went almost an hour over there were three different instances where the recording got interrupted for the above issue. The random channel changing issue also happened at around 9pm cst IIRC.

I've linked all the logs so hopefully it is something simple that I can fix.

Thanks for the help.

Logs
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #2  
Old 02-27-2017, 04:04 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
What channel did the oscars recording change to? the only thing that really happened at 9pm is the start of Bar Rescue (ch 241) on colossus 2, while the oscars were being recorded on colossus 1. Hard to look further into this without seeing your gentuner scripts as well, to see why the tuning for colossus 2 might be affecting colossus 1's stb.
__________________
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
  #3  
Old 02-27-2017, 12:34 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by Fuzzy View Post
What channel did the oscars recording change to? the only thing that really happened at 9pm is the start of Bar Rescue (ch 241) on colossus 2, while the oscars were being recorded on colossus 1. Hard to look further into this without seeing your gentuner scripts as well, to see why the tuning for colossus 2 might be affecting colossus 1's stb.
Bar rescue was it.

I uploaded the gentuner script and my properties file. I still have the ip control enabled on the host server. That wouldn't cause this to occur would it? It's almost as if sage doesn't realize that the tuner is in use.

Also, just confirmed that this is not an issue on the host server. It is able to transition from show to show without delay.
Attached Files
File Type: txt gentuner.txt (2.7 KB, 36 views)
File Type: txt Sage.properties.txt (257.6 KB, 131 views)
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.

Last edited by panteragstk; 02-27-2017 at 01:00 PM.
Reply With Quote
  #4  
Old 02-27-2017, 08:20 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by panteragstk View Post
Bar rescue was it.

I uploaded the gentuner script and my properties file. I still have the ip control enabled on the host server. That wouldn't cause this to occur would it? It's almost as if sage doesn't realize that the tuner is in use.

Also, just confirmed that this is not an issue on the host server. It is able to transition from show to show without delay.
So this is a network encoder in windows, but you are tuning it from the main server in the unRAID docker? Do you also by chance have the gentuner.log from that time period as well? That should show what gentuner was told to do. As far as I can tell, you have the following configs:

Hauppauge Colossus Capture 0 is tuning DirecTV-Tuner-1 @ 192.168.1.76
Hauppauge Colossus Capture 1 is tuning DirecTV-Tuner-2 @ 192.168.1.77
Hauppauge Colossus Capture 2 is tuning DirecTV-Tuner-3 @ 192.168.1.78

gentuner.log should reflect this behavior.
__________________
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
  #5  
Old 02-27-2017, 10:00 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
I've attached the log as requested.

I will say I looked at the properties file and saw some duplicate entries under device name. Some had multiple gentuner device names as well as old IP addresses that I used when the windows server was the primary. I edited the entries to reflect what should be correct. We'll see if that helps.

I also want to add that the tuning issue is odd and random, but the main issue I'm having is transitioning from show to show. It pretty much stops recording for around a minute and the log reflects a lot of activity. Insight into that would be very helpful since right now live tv is pretty much not working.
Attached Files
File Type: zip gentuner.zip (62.2 KB, 33 views)
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #6  
Old 02-28-2017, 03:41 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by panteragstk View Post
I've attached the log as requested.

I will say I looked at the properties file and saw some duplicate entries under device name. Some had multiple gentuner device names as well as old IP addresses that I used when the windows server was the primary. I edited the entries to reflect what should be correct. We'll see if that helps.

I also want to add that the tuning issue is odd and random, but the main issue I'm having is transitioning from show to show. It pretty much stops recording for around a minute and the log reflects a lot of activity. Insight into that would be very helpful since right now live tv is pretty much not working.
That log entry looks fine. On the 26th, at 21:00, the gentuner script was told to change DirecTV-Tuner-3 to channel 241, which should have only affected the STB connected to Hauppauge Colossus Capture 2. It should have had no impact on the STB that was tuned to the Oscars on Hauppauge Colossus Capture 1.

That said, I am only seeing entries in the logfile from the actual gentuner binary, NOT from the perl script (which should also be writing entries, since $debug is set to 1). So It would appear that either the gentuner script cannot write to the logfile (permissions issue maybe), or the script you posted isn't what is actually being run.
__________________
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

Last edited by Fuzzy; 02-28-2017 at 03:53 AM.
Reply With Quote
  #7  
Old 03-03-2017, 05:00 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
I upgraded my encoding server to v9. No change.

I totally removed sagetv from the encoding server and installed v9. No change.

I added a second sagetv docker on my unraid server with a new appdata folder. No change.

Tried installing the server on my win 10 machine, but it didn't find any network encoders. Odd. Didn't have time to dig into why.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #8  
Old 03-05-2017, 05:45 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,088
Have you tried setting seeker/fast_mux_switch=false on the main server?
Reply With Quote
  #9  
Old 03-06-2017, 11:31 AM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by wnjj View Post
Have you tried setting seeker/fast_mux_switch=false on the main server?
I tried that setting and the first test it seems to have solved the problem.

Thanks, but I still feel like there is another issue of some sort. What else can I provide to troubleshoot this one?
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #10  
Old 03-06-2017, 01:09 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,088
Quote:
Originally Posted by panteragstk View Post
I tried that setting and the first test it seems to have solved the problem.

Thanks, but I still feel like there is another issue of some sort. What else can I provide to troubleshoot this one?

I assume you mean the live show transition issue seems to be gone? I expected it might, since the strange file size queries Jeff pointed out are happening when fast_mux_switch simply changes the filename for encoding. Turning that off basically causes a stop/restart for the new file if I'm reading
the code correctly.

I'm still coming up to speed on how this all works but near as I can tell, the tuners are capturing on the windows machine but streaming the data back to a "file" which is actually an "stv://" path on the Linux main server or a network share. What I haven't found is which code processes that stv URL on the server.

The Windows machine MpegMux simply calls a standard Windows library 'CreateFile' with that "stv://" path. The thing is, if it fails the return code is passed back from the mux to the Encoder but is ignored in the switchOutputFile code that calls it. I suspect there's a clue in here as to why the live show fast switch isn't working.

I could be following the code trail wrong, though at there are plenty of options.


So is issue #1 in your original post (seemingly shared channel changes) what you're concerned about? Is that still happening?

Last edited by wnjj; 03-06-2017 at 01:16 PM.
Reply With Quote
  #11  
Old 03-06-2017, 01:39 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Quote:
Originally Posted by wnjj View Post
So is issue #1 in your original post (seemingly shared channel changes) what you're concerned about? Is that still happening?
That one appears to be gone. There were duplicate entries in the properties file that had more than one tuning device name. I changed those to what they should be and it seems to have corrected things.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #12  
Old 03-06-2017, 01:57 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,308
OK, I'm pretty sure I found the bug now...it's been there forever...apparently not many people used encoding server upload with seamless file switching on Windows....which is somewhat of a surprise.

If you look here:

https://github.com/google/sagetv/blo...2Dump.cpp#L657

That's where the dumper filter that writes out the data is in the mode where it's looking for an MPEG start code where it's a clean boundary to transition from one file to the next. Once it finds it, it writes out what's left up to that point in the current file....then closes the current file and opens the new file and continues writing from there.

The problem lies here:

https://github.com/google/sagetv/blo...Dump.cpp#L1102

When it closes the file...it also sets m_bRemoteFile to FALSE for some reason (likely me just trying to make the state known)...however, m_bRemoteFile has already been set to TRUE in the SetFilename method so now when OpenFile is called, it doesn't realize that it's supposed to be a remote file and tries to open the stv:// directly as a local file and will fail when it does that.

I've just checked in what should be a fix for this...but I can't compile Windows code currently so I have no way to test this.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #13  
Old 03-09-2017, 11:34 AM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Got the mpeg dump log. Let me know if anything else is needed.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #14  
Old 03-09-2017, 01:10 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,308
OK, I think I found the next problem. Hopefully this should do it. Before I go committing this...can you build this one Karly and then post the new .ax file for panteragtsk to try?

Thanks for adding that extra logging...it gave me the info I needed to figure out the problem.

The new issue was that it was using the wrong filename for the remote upload. It was setting the nextFilename BEFORE it was stripping out the stv:// stuff from the URL when it was doing a switch so it was sending an stv:// URL to the MediaServer to open rather than a normal file path.
Attached Files
File Type: zip MPEG2Dump.zip (13.4 KB, 25 views)
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #15  
Old 03-09-2017, 01:35 PM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Quote:
Originally Posted by Narflex View Post
OK, I think I found the next problem. Hopefully this should do it. Before I go committing this...can you build this one Karly and then post the new .ax file for panteragtsk to try?

Thanks for adding that extra logging...it gave me the info I needed to figure out the problem.

The new issue was that it was using the wrong filename for the remote upload. It was setting the nextFilename BEFORE it was stripping out the stv:// stuff from the URL when it was doing a switch so it was sending an stv:// URL to the MediaServer to open rather than a normal file path.
Sure, attached.

One small change on line 846:
Code:
- if (m_pFilename) {
+ if (m_pFileName) {
Attached Files
File Type: zip MPEG2Dump.zip (43.8 KB, 28 views)
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #16  
Old 03-09-2017, 02:46 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Nice. That seems to have done it. Thanks for all the work on this.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #17  
Old 03-09-2017, 03:59 PM
wnjj wnjj is offline
Sage Icon
 
Join Date: Jan 2009
Posts: 1,088
Quote:
Originally Posted by panteragstk View Post
Nice. That seems to have done it. Thanks for all the work on this.
That's great news! Thanks for being so willing to try and try again.
Reply With Quote
  #18  
Old 01-20-2018, 06:01 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
This issue seems to have come back. Were there any updates to the network encoder that could have made this come back? Worked fine until about a month ago.
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #19  
Old 01-26-2018, 01:13 PM
panteragstk's Avatar
panteragstk panteragstk is offline
SageTVaholic
 
Join Date: Oct 2008
Location: New Braunfels, TX
Posts: 3,312
Anyone else getting random pauses in recordings/live TV with Colossus network encoders? I don't get why this suddenly came back up. Nothing on my encoding server or the unraid docker has changed. Log is full of the below.

Quote:
Fri 1/26 13:13:29.656 [FSManager@42d00142] MMC connected to encoding server at 192.168.1.42:6969
Fri 1/26 13:13:29.656 [FSManager@42d00142] MMC sent request to 192.168.1.42:6969 of GET_FILE_SIZE /var/recorded_tv_2/PAWPatrol-S03E09-PupsSaveApolloPupsSavetheHippos-26678965-0.ts
Fri 1/26 13:13:29.657 [FSManager@42d00142] MMC received response from 192.168.1.42:6969 of 675972424
Fri 1/26 13:13:30.478 [NetEncoderMonitor@314862df] (Retryable)Error communicating with encoding server:java.net.ConnectException: Connection refused (Connection refused)
Fri 1/26 13:13:30.478 [NetEncoderMonitor@676f61f8] (Retryable)Error communicating with encoding server:java.net.ConnectException: Connection refused (Connection refused)
Fri 1/26 13:13:30.478 [NetEncoderMonitor@314862df] Error communicating with encoding server:java.net.ConnectException: Connection refused (Connection refused)
Fri 1/26 13:13:30.479 [NetEncoderMonitor@676f61f8] Error communicating with encoding server:java.net.ConnectException: Connection refused (Connection refused)
__________________
SageTV Server: unRAID Docker v9, S2600CPJ, Norco 24 hot swap bay case, 2x Xeon 2670, 64 GB DDR3, 3x Colossus for DirecTV, HDHR for OTA
Living room: nVidia Shield TV, Sage Mini Client, 65" Panasonic VT60
Bedroom: Xiomi Mi Box, Sage Mini Client, 42" Panasonic PZ800u
Theater: nVidia Shield TV, mini client, Plex for movies, 120" screen. Mitsubishi HC4000. Denon X4300H. 7.4.4 speaker setup.
Reply With Quote
  #20  
Old 02-01-2018, 12:19 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,308
If nothing has changed in the software and you're starting to get more random connection problems...maybe you've got a piece of network hardware that's causing the problem. I've definitely had switches start to flake out on me like that and go bad before. If you don't think that's it, then post the log from both ends when the connection problem occurs and I can take a look to see if it could be software related and not due to network connectivity problems.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
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
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 Problem nox71 SageTV Beta Test Software 0 06-22-2010 07:23 PM
Weird Network Encoder Problem interloper SageTV Beta Test Software 0 04-09-2009 06:50 AM
HD-PVR as network encoder problem phelme Hardware Support 9 07-28-2008 12:38 AM
Problem setting up network encoder Alfiegerner SageTV Software 1 12-29-2006 11:30 PM


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


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