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
  #21  
Old 10-31-2019, 12:20 PM
ojones ojones is offline
Sage User
 
Join Date: Dec 2005
Posts: 29
Streaming to Miniclient

So this thread has been pretty quiet last year or so but... with the prevent push flag set in the properties file, OpenDCT set to convert output to a compatible codec at a reasonable bit-rate, a very fast server and a router than can handle my site-to-site vpn I can get full-quality streaming to work MOST of the time using the miniclient loaded on a Sony/Android TV (hard wired lan to the router/vpn endpoint).

You need:
miniplayer/forced_max_push_size=0
miniplayer/min_bandwidth_for_no_transcode=1500000
miniplayer/wan_prevent_push=false

I've noticed that (depending on WAN network latency) the bandwidth detection can be off substantially. I don't mean its wrong but latency during testing can throw a wrench into the math. The magic here (I think) is the "=1500000". If I have my units right that's way lower than the bandwidth that should stream well but does a good job tricking sage into giving full quality streaming a try.

This is with a gigabit fiber uplink and 100-300mb/s cable downlink and latency +/- 60ms.
Reply With Quote
  #22  
Old 10-31-2019, 12:34 PM
ojones ojones is offline
Sage User
 
Join Date: Dec 2005
Posts: 29
Follow-up - in OpenDCT I am using the ultrafast1080p setting.

While on the same bare metal VM host as my win2016 sagetv VM I keep OpenDCT in a separate UBUNTU VM (not using docker).

The ultrafast settings then are set to force transcoding on all streams (several places - read the comments).

I have this set to 12 threads at an average bit-rate of 6,400,000
And... out comes h264...

I probably should play with this more but it works (mostly).
Reply With Quote
  #23  
Old 11-08-2019, 02:34 PM
phantomii phantomii is offline
Sage Advanced User
 
Join Date: Mar 2009
Location: North Carolina
Posts: 156
Thanks so much. I think this should do what i am looking for. Will give it a try and let you know how it works!
Reply With Quote
  #24  
Old 11-11-2019, 08:36 PM
phantomii phantomii is offline
Sage Advanced User
 
Join Date: Mar 2009
Location: North Carolina
Posts: 156
So I made these settings and I have found most of the time I get high quality video at the remote location:

miniplayer/forced_max_push_size=0
miniplayer/min_bandwidth_for_no_transcode=1500000
miniplayer/wan_prevent_push=false

However, occasionally I get the much lower quality video and I am not sure why?

Also I am not sure how to adjust the ultrafast1080p settings and I have not found any references in a quick search. Limited time now but will look again tomorrow.

Thanks again!
Reply With Quote
  #25  
Old 02-29-2020, 10:45 AM
trk2 trk2 is online now
Sage Aficionado
 
Join Date: Jan 2006
Location: Maine
Posts: 381
I've been playing around with this and everything works great (HD stream with 5.1 audio) using a remote connection and a HD300. However, these settings don't seem to work with a traditional placeshifter client which still transcodes regardless of the internet speed connection? I travel often and would prefer to use the placeshifter client on my work laptop to be able to watch local sports.
Reply With Quote
  #26  
Old 02-29-2020, 07:45 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
I'm also interested in seeing how to maximize the quality of remote viewing, primarily via the SageTV miniclient. Any input would be much appreciated.

Additionally, I am not clear on how to control the streaming quality for DYNAMIC, PULL, or the other one that I can't remember at the moment.

I'm happy to put some real horsepower behind the SageTV server, but I need to understand how.
Reply With Quote
  #27  
Old 03-01-2020, 09:18 PM
ojones ojones is offline
Sage User
 
Join Date: Dec 2005
Posts: 29
Full Quality - Viewing Over WAN

So far as I have been able to test this the best / only way to achieve "full quality" remote viewing is to set the trigger for full quality streaming vs transcoding at an artificially low value. Without transcoding the miniclient does a fairly good job at this - especially when its run on andriod TV inside a sony set. I've had better luck with that than with the shield or other versions.

This depends on having very fast wan links especially on the upload side but the overall link is still pretty susceptible to lag and packet loss as well. If there is any optimization to achieve better "streaming" it is on the hardware used to record / encode. I'm not doing much there right now but playing with ENE's compression settings looks like its the way to go for now.

@ phantomii (I know stale response...) the bandwidth test that triggers transcoding can be buggy (well not buggy but sensitive). Small amounts of packet loss or network issues can result in the test at the beginning of the file to be off and force transcoding even if the link firms up a few seconds later. This is why I had to force the bandwidth test to a much lower rate than would actually stream well - to make sure false positives (or is it negatives?) didn't trip transcoding accidentally.
Reply With Quote
  #28  
Old 03-02-2020, 03:14 PM
trk2 trk2 is online now
Sage Aficionado
 
Join Date: Jan 2006
Location: Maine
Posts: 381
It seems that placeshifter always defaults to push mode regardless of the bandwidth. Placeshifter:
Fri 2/21 11:19:53.498 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer got an estimate from the UI on bandwidth of 131168Kbps
Fri 2/21 11:19:53.498 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer is using Push mode playback
Fri 2/21 11:19:53.498 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer is using the MPEG4 transcoder
Fri 2/21 11:19:53.499 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer is using the transcoder

While extenders and the Android miniclient will properly change to pull mode. HD300:
Fri 2/21 11:21:56.525 [VideoFrame-e0d55e4d355e@1457c3e] Bandwidth test base=0 base*2=1 BW=131168000
Fri 2/21 11:21:56.526 [VideoFrame-e0d55e4d355e@1457c3e] MiniPlayer got an estimate from the UI on bandwidth of 131168Kbps
Fri 2/21 11:21:56.526 [VideoFrame-e0d55e4d355e@1457c3e] MiniPlayer is using Pull mode playback

Notice in both cases the detected bandwidth was identical.
Reply With Quote
  #29  
Old 03-02-2020, 06:26 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 1,881
Quote:
Originally Posted by trk2 View Post
It seems that placeshifter always defaults to push mode regardless of the bandwidth. Placeshifter:
Fri 2/21 11:19:53.498 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer got an estimate from the UI on bandwidth of 131168Kbps
Fri 2/21 11:19:53.498 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer is using Push mode playback
Fri 2/21 11:19:53.498 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer is using the MPEG4 transcoder
Fri 2/21 11:19:53.499 [VideoFrame-e0d55e4d355e@1f17f3a] MiniPlayer is using the transcoder

While extenders and the Android miniclient will properly change to pull mode. HD300:
Fri 2/21 11:21:56.525 [VideoFrame-e0d55e4d355e@1457c3e] Bandwidth test base=0 base*2=1 BW=131168000
Fri 2/21 11:21:56.526 [VideoFrame-e0d55e4d355e@1457c3e] MiniPlayer got an estimate from the UI on bandwidth of 131168Kbps
Fri 2/21 11:21:56.526 [VideoFrame-e0d55e4d355e@1457c3e] MiniPlayer is using Pull mode playback

Notice in both cases the detected bandwidth was identical.
Iím not sure, but this might depend on the file type you are trying to playback. The Windows Placeshfter Client is based on a very old version of mplayer. If it canít handle the video or audio format, Sage may have to transcode, regardless of bandwidth.
__________________
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
  #30  
Old 03-02-2020, 06:56 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
I have the miniclient running remotely while traveling on a Firetv stick (the non-4k model). Getting the username and password entered was quit a trick. It uses almost no resources on my SageTV server at home, and very little of my upload bandwidth. Is there a way to ramp it up a bit, to increase the quality?
Reply With Quote
  #31  
Old 03-02-2020, 07:41 PM
trk2 trk2 is online now
Sage Aficionado
 
Join Date: Jan 2006
Location: Maine
Posts: 381
Quote:
Originally Posted by Tiki View Post
Iím not sure, but this might depend on the file type you are trying to playback. The Windows Placeshfter Client is based on a very old version of mplayer. If it canít handle the video or audio format, Sage may have to transcode, regardless of bandwidth.
Good thought. My previous test was playback with live tv using a channel that is encoded with h.264. I just tried again using an mpeg2 station and had the same results. HD300 will play it back using pull, placeshifter using push.
Reply With Quote
  #32  
Old 03-02-2020, 07:45 PM
trk2 trk2 is online now
Sage Aficionado
 
Join Date: Jan 2006
Location: Maine
Posts: 381
Quote:
Originally Posted by KryptoNyte View Post
I have the miniclient running remotely while traveling on a Firetv stick (the non-4k model). Getting the username and password entered was quit a trick. It uses almost no resources on my SageTV server at home, and very little of my upload bandwidth. Is there a way to ramp it up a bit, to increase the quality?
Puts that old-school texting skills to use. What's your upload cap rate? You can try playing back the source in full quality by following the instructions in this thread; namely adding the following to your server's property file:

miniplayer/forced_max_push_size=0
miniplayer/min_bandwidth_for_no_transcode=1500000
miniplayer/wan_prevent_push=false
Reply With Quote
  #33  
Old 03-02-2020, 08:22 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
I don't think I can do full quality, trk. Upload speed is about 12 mbits/sec. I still need some transcode, just something better than 1 mbit/s.
Reply With Quote
  #34  
Old 03-03-2020, 08:22 AM
NetworkGuy NetworkGuy is offline
Sage Expert
 
Join Date: Dec 2009
Location: Central NJ
Posts: 725
Quote:
Originally Posted by KryptoNyte View Post
I have the miniclient running remotely while traveling on a Firetv stick (the non-4k model). Getting the username and password entered was quit a trick. It uses almost no resources on my SageTV server at home, and very little of my upload bandwidth. Is there a way to ramp it up a bit, to increase the quality?
How did you get the username and pswd into the mini-client on the Firestick? I tried and could not get it to work.
__________________
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: Mini-Client, Fire TV Stick 4K
Reply With Quote
  #35  
Old 03-03-2020, 10:29 AM
trk2 trk2 is online now
Sage Aficionado
 
Join Date: Jan 2006
Location: Maine
Posts: 381
Quote:
Originally Posted by KryptoNyte View Post
I don't think I can do full quality, trk. Upload speed is about 12 mbits/sec. I still need some transcode, just something better than 1 mbit/s.
On my system, with cablecard, I need about 8mbps upload for a channel that broadcasts in h.264. An mpeg2 channel needs about 13mbps. How are you capturing? If you are using opendct than the easiest method is to have opendct compress the stream.
Reply With Quote
  #36  
Old 03-03-2020, 12:19 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
Quote:
Originally Posted by NetworkGuy View Post
How did you get the username and pswd into the mini-client on the Firestick? I tried and could not get it to work.
After entering the username, somewhat blind, I would hit the home button on the remote, taking me back to Firestick main menu. Then I would re-enter the miniclient which is still running the background and select the password field. I think the keyboard doesn't always come up, so I had to long press the Select button (middle of circle) on the remote and select keyboard in Stuckless' overlay menu. I think I had to exit one more time to get rid of the keyboard and move fields at that point.
Reply With Quote
  #37  
Old 03-03-2020, 06:22 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
Quote:
Originally Posted by trk2 View Post
On my system, with cablecard, I need about 8mbps upload for a channel that broadcasts in h.264. An mpeg2 channel needs about 13mbps. How are you capturing? If you are using opendct than the easiest method is to have opendct compress the stream.
I'm capturing both of the ways that you mention, but even my h.264 content is upwards of 14mbps. mpeg2 can be as high as 15mbps. The reason I don't encode everything with OpenDCT is because I can record 6 programs at the same time, and I don't think my server can handle encoding 6 programs simultaneously. So I'm trying to determine a better way to view remotely while I'm traveling. I would typically just watch one channel, so that would seem to have a much smaller hit on the server during encoding.

Last edited by KryptoNyte; 03-03-2020 at 06:25 PM.
Reply With Quote
  #38  
Old 03-03-2020, 06:24 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
You do have me wondering if maybe I should be recording with all 6 tuners using an h.264 tuner at a lower bitrate. Hmmmm.
Reply With Quote
  #39  
Old 03-03-2020, 10:03 PM
trk2 trk2 is online now
Sage Aficionado
 
Join Date: Jan 2006
Location: Maine
Posts: 381
I only have three tuners, but I played around with using opendct to transcode my mpeg2 channels to h.264. I was able do it using 1 core for each tuner (i7-3770) as a reference. This is all configurable in opendct.

Quote:
Originally Posted by KryptoNyte View Post
I'm capturing both of the ways that you mention, but even my h.264 content is upwards of 14mbps. mpeg2 can be as high as 15mbps.
Great, now I'm suspicious that my cable company is screwing me on bitrate.
Reply With Quote
  #40  
Old 03-04-2020, 05:49 PM
KryptoNyte's Avatar
KryptoNyte KryptoNyte is offline
Sage Icon
 
Join Date: Dec 2006
Posts: 2,317
Quote:
Originally Posted by trk2 View Post
I only have three tuners, but I played around with using opendct to transcode my mpeg2 channels to h.264. I was able do it using 1 core for each tuner (i7-3770) as a reference. This is all configurable in opendct.



Great, now I'm suspicious that my cable company is screwing me on bitrate.
Just to be clear, my h.264 is coming via HDPVR2. I did just check the local ABC affiliate via Spectrum copy-freely at 15.8 Mbps overall (raw mpeg2 coming via cablecard).

Interesting how you did the one core per transcode channel. With some of the processors having so many cores these days, that's an option I hadn't considered. My old Corei5-2500k at 4.2ghz is still working for now.
Reply With Quote
Reply

Tags
miniclient, opendct, streaming, transcoding, wan


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
Miniclient 101 smdl SageTV Clients Development 5 11-28-2017 02:47 AM
Android Miniclient and UK TV rickgillyon SageTV Clients Development 6 12-01-2016 05:58 PM
Android miniclient; fuzzy/corrupt video when remote transcoding redondo_se SageTV Clients Development 12 11-10-2016 12:14 PM
SageTV miniclient - transcoding? dmelnyk SageTV Clients Development 1 10-02-2016 05:01 AM
Miniclient? BobbyDing General Discussion 3 09-08-2015 11:53 AM


All times are GMT -6. The time now is 09:23 AM.


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