SageTV Community  

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

Notices

SageTV Clients Development This forum is for discussions relating to SageTV Open Source Clients Development.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-23-2017, 05:02 AM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Android Mini Client Transcoding

I've had some poor WiFi traveling recently. The mini client paused quite a bit during playback so was pretty much unwatchable. I opened a VPN tunnel to my home server, (the same machine running the SageTV server), and streamed from the CBS app through there. (I could not stream directly from CBS because of regional restrictions.) The CBS app buffered a couple times, but then played back smoothly and without blocky artifacts.

So, I'm using the same Internet connection to the US for both streams, but the SageTV one does not seem to keep up/adjust. My CPU should have plenty of power in a single core to transcode on the fly. Any thoughts on getting a better experience through the mini client?
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #2  
Old 05-23-2017, 06:53 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by KarylFStein View Post
I've had some poor WiFi traveling recently. The mini client paused quite a bit during playback so was pretty much unwatchable. I opened a VPN tunnel to my home server, (the same machine running the SageTV server), and streamed from the CBS app through there. (I could not stream directly from CBS because of regional restrictions.) The CBS app buffered a couple times, but then played back smoothly and without blocky artifacts.

So, I'm using the same Internet connection to the US for both streams, but the SageTV one does not seem to keep up/adjust. My CPU should have plenty of power in a single core to transcode on the fly. Any thoughts on getting a better experience through the mini client?
Are you using the MiniClient as a placeshifter client (ie, placeshifter login). If so, then the SageTV should be transcoding on the server (to mpeg2) and then pushing that over the network connection.

Streaming sites like CBS, YouTube, Netflix, etc, all use adaptive streaming technoogies so they automatically adjust to the variances in the bandwidth... and most of those sites never transcode, they simply have the same file in many different streaming formats to allow for adaptive streaming.

My suggestion, would be to use Plex... since it does a decent job on the client and server for streaming, even though it does transcode on the fly... so if the server can handle it, it will create a decent stream for the client.
Reply With Quote
  #3  
Old 05-23-2017, 08:44 AM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Placeshifter actually transcodes to MPEG4 (not h.264), not MPEG2.. still not ideal, and the bitrate management and buffer control is a bit simplistic. It works, but it is really tuned for a steady slow connection, not an intermittent one.
__________________
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
  #4  
Old 05-23-2017, 04:24 PM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
Quote:
Originally Posted by stuckless View Post
Are you using the MiniClient as a placeshifter client (ie, placeshifter login). If so, then the SageTV should be transcoding on the server (to mpeg2) and then pushing that over the network connection.

Streaming sites like CBS, YouTube, Netflix, etc, all use adaptive streaming technoogies so they automatically adjust to the variances in the bandwidth... and most of those sites never transcode, they simply have the same file in many different streaming formats to allow for adaptive streaming.

My suggestion, would be to use Plex... since it does a decent job on the client and server for streaming, even though it does transcode on the fly... so if the server can handle it, it will create a decent stream for the client.
I was using the Android mini client as a Placeshifter client (Internet login and not over VPN). I didn't think to try Placeshifter on my laptop. I know the latter has an "adaptive" setting that I used to use and would work (except sometimes be blocky when I was on a poor connection). Does the Android version not do the adaptive bit?

I had Plex up at one point and it worked well except I didn't like some of the cloud things that didn't let me do things like share home videos/pictures to others without them having a Plex account to use SSL. Emby gives me more control over SSL and web-based (no account needed) access, so am using that, but without file renaming it does not work well with SageTV. And neither do automatic commercial skipping AFAIK. I was hoping to keep TV in the SageTV ecosystem and hoping for an Apple solution as while I do not buy Apple products my kids and family do. Well, I did get my daughter an iPhone when she turned 16 because I couldn't sell her on Android, but my son has told me that when he turns 16, (and is for some reason expecting a phone as his gift :P), he prefers Android.

It seems to be a case of disjointed solutions. I am a big fan of SageTV for CableCard and OTA, (automatic commercial skip is big for me along with the web interfaces). Plex seemed to work well with TV / movies / pictures / transcoding, but put restrictions on things like SSL and accounts. Emby opened things up more with control, but does not have the focus that Plex seems to have with SageTV integration.
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #5  
Old 05-23-2017, 05:56 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by KarylFStein View Post
I was using the Android mini client as a Placeshifter client (Internet login and not over VPN). I didn't think to try Placeshifter on my laptop. I know the latter has an "adaptive" setting that I used to use and would work (except sometimes be blocky when I was on a poor connection). Does the Android version not do the adaptive bit?

I had Plex up at one point and it worked well except I didn't like some of the cloud things that didn't let me do things like share home videos/pictures to others without them having a Plex account to use SSL. Emby gives me more control over SSL and web-based (no account needed) access, so am using that, but without file renaming it does not work well with SageTV. And neither do automatic commercial skipping AFAIK. I was hoping to keep TV in the SageTV ecosystem and hoping for an Apple solution as while I do not buy Apple products my kids and family do. Well, I did get my daughter an iPhone when she turned 16 because I couldn't sell her on Android, but my son has told me that when he turns 16, (and is for some reason expecting a phone as his gift :P), he prefers Android.

It seems to be a case of disjointed solutions. I am a big fan of SageTV for CableCard and OTA, (automatic commercial skip is big for me along with the web interfaces). Plex seemed to work well with TV / movies / pictures / transcoding, but put restrictions on things like SSL and accounts. Emby opened things up more with control, but does not have the focus that Plex seems to have with SageTV integration.
The Android Miniclient can likely do the adaptive steaming, if the placeshifter does it... just the option to "set" it is not exposed. To be honest, I've never used the Placeshifter, but that might change

I think Emby is a good contender to integrate with sage... It's on my todo list... which is far too long
Reply With Quote
  #6  
Old 05-23-2017, 07:15 PM
Tiki's Avatar
Tiki Tiki is offline
Sage Icon
 
Join Date: Feb 2005
Location: Southwest Florida, USA
Posts: 2,009
Quote:
Originally Posted by stuckless View Post
The Android Miniclient can likely do the adaptive steaming, if the placeshifter does it... just the option to "set" it is not exposed. To be honest, I've never used the Placeshifter, but that might change

I think Emby is a good contender to integrate with sage... It's on my todo list... which is far too long
It is my understanding that Placeshifter, Extenders, and Android Mini-Client all use the same protocols to talk to the Sage Server (and are all basically the same as far as the Sage Server is concerned - they are all "Mini-clients").

Also, I believe that the Extenders are setup to compare their IP address with the Sage Server's IP address to determine if they are on the same subnet or not. If they are not on the same subnet, the Server will transcode everything. It uses the MP4 protocol and the bitrate is adaptive, based on bandwidth (call this "remote mode"). If they are on the same subnet, the Server can send the raw files without transcoding (call this "local mode").

I think the Placeshifter works the same way, but it's possible that it transcodes all the time.

I think the Android Mini-client currently only operates in what I called "local mode", regardless of whether the client is on the same subnet or not.

I thought there was also a provision for the mini-clients to report which formats they support natively, so the server could transcode only the formats that the mini-client doesn't support, but I don't think the Android mini-client makes use of this yet.

Maybe I shouldn't post this at all, since I'm clearly not 100% sure about anything I am saying.
__________________
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
  #7  
Old 05-23-2017, 09:35 PM
KarylFStein KarylFStein is offline
Sage Fanatic
 
Join Date: Apr 2006
Location: Westland, Michigan, USA
Posts: 999
From what I've seen when I'm on the LAN Placeshifter will not transcode. It seems to detect and ignore the NAT even if I use the external IP to connect.

My job has me travelling a bit and WiFi is really hit-or-miss. And that's on top of not being able to stream several things when outside of the US without doing the VPN tunnel trick. Doesn't WWW stand for *World Wide* Web...?!

It's just weird that I can use a VPN tunnel to my home network over poor WiFi and stream things that look sharp on my tablet while the Android mini client craps out. I gave up on Placeshifter on my laptop because of skipping issues, but now that I transcode everything locally after recording, (to get ExoPlayer to work for surround sound as well as local Placeshifter on PCs), I should try it again. I'd like to skip the local transcoding as it seems to mess with the Android mini client, (menu navigation freezes on a regular basis when a transcoding job is running), but it has really helped playback on non-HD300 devices.

(The HD300 is a tank. I have not met a stream that it would not just handle. If whatever hardware magic is in there could be baked into the mini client, wow...)

I should probably dump Comcast, but CableCard is so darn convenient and Comcast is the only game in town here. I can't see going back to multiple STBs and capture cards.
__________________
Home Network: https://karylstein.com/technology.html
Reply With Quote
  #8  
Old 05-23-2017, 09:41 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Honestly, for remote viewing, it would probably be wise to use Plex, simply because it DOES have a much more advanced transcoding engine, and no one around here is really well versed on the best ways to improve sage's at this time (as well as it being pretty low on everyone's priorities).
__________________
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
  #9  
Old 06-17-2017, 01:54 PM
willieb willieb is offline
Sage Advanced User
 
Join Date: Jan 2008
Location: Philadelphia
Posts: 175
How hard would it be to have Sage ask you if you want to use placeshifter vs. regular SageTV across different subnets? I have a 100MB upload speed and a vpn to my home server running on unRAID. I would love to be able to just connect and not use transcoding when I have the bandwidth available. Seems like the change in logic would be pretty simple, but of course I would be completely reliant on someone changing the code for this.
Reply With Quote
  #10  
Old 06-17-2017, 03:49 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
There is an option in Placeshifter to disable transcoding. When you launch Placeshifter, on the Servers Manager window that pops up, click Settings at the bottom. On the Streaming tab, choose Playback media without transcoding (only recommended for LAN usage). This will stream the original file to placeshifter for playback.
__________________
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
  #11  
Old 08-24-2017, 04:57 PM
willieb willieb is offline
Sage Advanced User
 
Join Date: Jan 2008
Location: Philadelphia
Posts: 175
So I know I am replying to this way late, but I am using the mini client on my mibox. I have successfully set up an openvpn connection to my home server. Because of the way I have the vpn set up, the mibox is on a different subnet than the server so I get the placeshifter login when I try to connect. I can successfully log in to the placeshifter login screen but I cannot find the setting you are referring to anywhere. Am I missing something? Any way to prevent transcoding? I am getting over 30 mbit throughput.

Last edited by willieb; 08-24-2017 at 05:22 PM.
Reply With Quote
  #12  
Old 08-24-2017, 05:58 PM
wayner wayner is offline
SageTVaholic
 
Join Date: Jan 2008
Location: Toronto, ON
Posts: 7,491
@willieb - The setting that Fuzzy was referring to is on a PC and won't show up on the MiBox.

I saw some discussion on changes being made on github - isn't someone trying to deal with this issue and disable transcoding if the internet speed is fast enough?
__________________
New Server - Sage9 on unRAID 2xHD-PVR, HDHR for OTA
Old Server - Sage7 on Win7Pro-i660CPU with 4.6TB, HD-PVR, HDHR OTA, HVR-1850 OTA
Clients - 2xHD-300, 8xHD-200 Extenders, Client+2xPlaceshifter and a WHS which acts as a backup Sage server
Reply With Quote
  #13  
Old 08-24-2017, 06:51 PM
Fuzzy's Avatar
Fuzzy Fuzzy is offline
SageTVaholic
 
Join Date: Sep 2005
Location: Jurupa Valley, CA
Posts: 9,957
Quote:
Originally Posted by wayner View Post
@willieb - The setting that Fuzzy was referring to is on a PC and won't show up on the MiBox.

I saw some discussion on changes being made on github - isn't someone trying to deal with this issue and disable transcoding if the internet speed is fast enough?
In the Android Miniclient, I believe transcoding is disabled by setting the streaming mode to Pull in the miniclient's settings.
__________________
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
  #14  
Old 08-24-2017, 07:04 PM
willieb willieb is offline
Sage Advanced User
 
Join Date: Jan 2008
Location: Philadelphia
Posts: 175
Great. Thanks Wayner.
Reply With Quote
  #15  
Old 08-24-2017, 07:16 PM
willieb willieb is offline
Sage Advanced User
 
Join Date: Jan 2008
Location: Philadelphia
Posts: 175
And just to say it, I think a toggle on the login page would be just as good. I would think it would be easier to implement. I could decide if the bandwidth was acceptable and no one would have to worry about figuring out how to write code for dynamic testing of throughput. If the bandwidth turns out to be not good enough, I would just log out and toggle the switch back to transcode. That might be the fastest approach.
Reply With Quote
  #16  
Old 08-25-2017, 06:21 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by willieb View Post
And just to say it, I think a toggle on the login page would be just as good. I would think it would be easier to implement. I could decide if the bandwidth was acceptable and no one would have to worry about figuring out how to write code for dynamic testing of throughput. If the bandwidth turns out to be not good enough, I would just log out and toggle the switch back to transcode. That might be the fastest approach.
It's kind of a chicken and egg thing. The client needs to tell sagetv what modes it support BEFORE the UI is rendered. So at the point that the SageTV login UI is asking for you credenctials, it's already determined the supported modes.

This could be done better in the client connection part in the MiniApp, though. ie, I already allow some per connection settings (such as deviceid), so, in theory, the MiniClient connection profile could have a per connection setting that forces PUSH/PULL.

Personally I think the server should really manage/fix this by allowing higher bandwidth thoughputs. PUSH is used for transcoding, but, it's also used for LiveTV. PULL likely does support LiveTV as well, but, my guess is that it doesn't do it quite as well, or else the PUSH mode would have never been created.
Reply With Quote
  #17  
Old 08-26-2017, 09:57 PM
ojones ojones is offline
Sage User
 
Join Date: Dec 2005
Posts: 61
update on coding

Folks - the option to pull was actually disabled in the server codebase for most non lan streaming. Narflex approved a change to allow a setting in properties to override the override so this function would work as intended. Issue is, in the old days vpns were too slow for streaming and sage team didn't want users opening the wrong insecure ports in their firewalls.

Not sure when the next version will arrive but eager to test!
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
Android TV Mini-client observations panteragstk SageTV Clients Development 29 10-29-2017 04:07 PM
Android miniclient; fuzzy/corrupt video when remote transcoding redondo_se SageTV Clients Development 12 11-10-2016 12:14 PM
Android mini client screen draw issues Gustovier SageTV Clients Development 6 10-25-2016 02:33 PM
Mini-Client vs Full Client vs HD300 NetworkGuy SageTV Clients Development 5 09-12-2016 06:11 PM
[Android Mini Client] Integrate with Android TV 'Live Channels' dinki SageTV Clients Development 11 01-31-2016 09:43 AM


All times are GMT -6. The time now is 05:57 PM.


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