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 08-28-2016, 03:09 AM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
Android MiniClient - Aspect Ratio

Is there a way of changing the aspect ratio for 4:3 channels to something other than "Fill"? I found the SageTV\SageTV\clients\<mac address>.properties file and fooled with the "default_advanced_aspect_ratio" setting but couldn't make it do anything. Is there a trick to this or isn't the capability of changing the aspect ratio part of the MiniClient? I'd really like the default to be vertical black bars on 4:3 content rather than a horizontal stretch.
Reply With Quote
  #2  
Old 08-29-2016, 11:26 AM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
This would need to be something that is implemented in the MiniClient itself and I don't know if stuckless implemented it yet (it shouldn't actually be that hard to do, so if he's interested, he can ping me for help )
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #3  
Old 08-29-2016, 01:34 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
When you press and hold the "select" to bring on the on-screen navigation controls, there is an icon there that controls the aspect ratio. Initially I'm reading the AR from the stream and passing it to the player which then controls how to fill/stretch or use black bars. But the button does allow you to change the player AR.
Reply With Quote
  #4  
Old 08-29-2016, 03:14 PM
bialio's Avatar
bialio bialio is offline
SageTVaholic
 
Join Date: May 2007
Location: Frisco, TX
Posts: 3,445
But the normal sage Aspect command doesn't work? i.e. it's handled outside of the STV?
__________________
PHOENIX 3 is here!
Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient
Reply With Quote
  #5  
Old 08-30-2016, 02:22 AM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
I didn't even know that this menu/nav control thing existed. Thanks for the information. The aspect ratio button puts it at Native I guess but that kind of sucks for a lot of the Comcast channels since its black bars on top/bottom and sides.

I guess what works the best for these is simply going with your default aspect ratio and then changing it at the TV to 4:3. I'd think that this would be the same thing as choosing the aspect ratio alternative via the long press menu/nav control but it isn't. Reducing the full horizontal screen aspect ratio via the TV aspect control setting to 4:3 creates a wider viewable picture while still preserving the intended aspect ratio and not dropping any of the picture.

The normal Sage Aspect command doesn't do anything. I've mapped a key to change aspect ratio -- no effect. I've mapped to the individual settings: Aspect ratio fill, Aspect ratio 4x3, Aspect ratio 16x9, Aspect ratio source -- no effect.

Quote:
Originally Posted by stuckless View Post
When you press and hold the "select" to bring on the on-screen navigation controls, there is an icon there that controls the aspect ratio. Initially I'm reading the AR from the stream and passing it to the player which then controls how to fill/stretch or use black bars. But the button does allow you to change the player AR.

Last edited by mlcarson; 08-30-2016 at 04:41 AM.
Reply With Quote
  #6  
Old 08-30-2016, 05:27 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Narflex View Post
This would need to be something that is implemented in the MiniClient itself and I don't know if stuckless implemented it yet (it shouldn't actually be that hard to do, so if he's interested, he can ping me for help )
Jeff, I did implement AR code in the Android MiniClient... It's pretty minimal, ie, I think it just reads the video width/height and calculates an AR from that... and then player uses that information to determine how best fit the video. Previous to this the video would just be stretched to fill the horiz/vert extents of the view. I'm open to suggestions
Reply With Quote
  #7  
Old 08-30-2016, 12:40 PM
Narflex's Avatar
Narflex Narflex is offline
Sage
 
Join Date: Feb 2003
Location: Redondo Beach, CA
Posts: 6,349
Sean,

Look at the VIDEO_ADVANCED_ASPECT stuff in MCSR (MiniClientSageRenderer.java). That provides a means of the extender sending back a list of supported aspect ratios and then it all plugs into the UI for selecting from them. You can simply use String names and don't need to worry about all the advanced stuff it can do after the '|' character.

On Fiber, we ended up trimming this down to only 4 aspect ratio modes...which after applying extra logic on the client, covered essentially every case relating to broadcast TV.

They were: Source, Fill, Zoom and Stretch. What each did varied depending upon whether the source was 4:3 or 16:9 and whether the display was 4:3 or 16:9...fortunately, you only need to worry about 16:9 displays.

If you want me to elaborate on how those 4 modes can cover all cases, let me know and I'll list out all of the cases and what to do with them.
__________________
Jeffrey Kardatzke
Google
Founder of SageTV
Reply With Quote
  #8  
Old 08-30-2016, 01:35 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by Narflex View Post
Sean,

Look at the VIDEO_ADVANCED_ASPECT stuff in MCSR (MiniClientSageRenderer.java). That provides a means of the extender sending back a list of supported aspect ratios and then it all plugs into the UI for selecting from them. You can simply use String names and don't need to worry about all the advanced stuff it can do after the '|' character.

On Fiber, we ended up trimming this down to only 4 aspect ratio modes...which after applying extra logic on the client, covered essentially every case relating to broadcast TV.

They were: Source, Fill, Zoom and Stretch. What each did varied depending upon whether the source was 4:3 or 16:9 and whether the display was 4:3 or 16:9...fortunately, you only need to worry about 16:9 displays.

If you want me to elaborate on how those 4 modes can cover all cases, let me know and I'll list out all of the cases and what to do with them.
This actually seems similar to what the Android client is doing, although I'm not reading the VIDEO_ADVANCED_ASPECT, I'm just allowing the user switch between Fit,Fill, etc... the AR code for the player is in this file, which I didn't write, but rather I lifted from the ijkplayer sample code.

https://github.com/OpenSageTV/sagetv...ectHelper.java

EDIT: It would be worthwhile to document your AR implementation and how you covered all cases.
Reply With Quote
  #9  
Old 11-12-2016, 04:54 PM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
Resurrecting this because it's an issue that's affecting me again.
I'm trying to use just a FLIRC for my primary input so that I can map pretty much any remote control for use with SageTV. Right now I'm using the current Tivo remotes because I have them and am used to them, they have a great button layout, and are nearly indestructible. What they don't seem to have though is a longpress like the Logitech Harmony 650 does so I can't use an extended press of Select to bring up the built-in Android navigation menu to choose Aspect Ratio.

Is there a keystroke that I can send via the FLIRC that will bring up this menu? That would be an adequate workaround. How much work is it to have the SageTV command 96 "Aspect Ratio Toggle" to actually call the function that the Android navigation button uses for Aspect Ratio? It would fix my issue and provide consistency in the SageTV UI.
Reply With Quote
  #10  
Old 11-12-2016, 05:43 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by mlcarson View Post
Resurrecting this because it's an issue that's affecting me again.
I'm trying to use just a FLIRC for my primary input so that I can map pretty much any remote control for use with SageTV. Right now I'm using the current Tivo remotes because I have them and am used to them, they have a great button layout, and are nearly indestructible. What they don't seem to have though is a longpress like the Logitech Harmony 650 does so I can't use an extended press of Select to bring up the built-in Android navigation menu to choose Aspect Ratio.

Is there a keystroke that I can send via the FLIRC that will bring up this menu? That would be an adequate workaround. How much work is it to have the SageTV command 96 "Aspect Ratio Toggle" to actually call the function that the Android navigation button uses for Aspect Ratio? It would fix my issue and provide consistency in the SageTV UI.
Not a direct answer but the Active Aspects Ratio plugin will help you with this. It reads the AR of the recording and then allows you to map that to a Sage AR which will be used automatically when you press Play.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #11  
Old 11-12-2016, 06:51 PM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
Is this true even on the Android MiniClient?
Quote:
Originally Posted by tmiranda View Post
Not a direct answer but the Active Aspects Ratio plugin will help you with this. It reads the AR of the recording and then allows you to map that to a Sage AR which will be used automatically when you press Play.
Reply With Quote
  #12  
Old 11-12-2016, 08:03 PM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by mlcarson View Post
Is this true even on the Android MiniClient?
Yes. You will be able to use any AR the miniclient supports.
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #13  
Old 11-12-2016, 10:32 PM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
That might be technically true except the miniclient doesn't technically support any aspect ratios besides AR Fill. I believe it's using some native function of the AndroidTV environment to do its magic rather than SageTV which is why Aspect Ratio Toggle via Sage TV Command 96 doesn't do anything.

I didn't spend a lot of time with it. I just tried to do a fixed aspect ratio on a channel via the plugin and the problem is there are none to choose from. If I'm missing something, please point me in the right direction.

Quote:
Originally Posted by tmiranda View Post
Yes. You will be able to use any AR the miniclient supports.
Reply With Quote
  #14  
Old 11-13-2016, 05:34 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
You can probably open an issue around this. The MiniClient does have it's own AR handling independent of sagetv server. There are actually 6 AR modes that it supports, but, depending on the video and the screen size it can appear that there is is just 1.

The MiniClient reads the AR info from the video file when it starts, and it uses that information to setup the AR for the miniclient video frame.

There is a bigger issue around using SageTV's AR info in that currently the MiniClient ignores all sagetv requests to resize the video frame (due to other issues), which is why you can't have video window in menus.

But if you open a defect, at least it won't be forgotten, and when I get back to miniclient work, I can look into trying to process the sagetv AR commands and make use of them.
Reply With Quote
  #15  
Old 11-13-2016, 06:05 AM
tmiranda's Avatar
tmiranda tmiranda is offline
SageTVaholic
 
Join Date: Jul 2005
Location: Central Florida, USA
Posts: 5,851
Quote:
Originally Posted by mlcarson View Post
I didn't spend a lot of time with it. I just tried to do a fixed aspect ratio on a channel via the plugin and the problem is there are none to choose from. If I'm missing something, please point me in the right direction.
If there are none to choose from then it won't work
__________________

Sage Server: 8th gen Intel based system w/32GB RAM running Ubuntu Linux, HDHomeRun Prime with cable card for recording. Runs headless. Accessed via RD when necessary. Four HD-300 Extenders.
Reply With Quote
  #16  
Old 11-21-2016, 08:46 AM
DarkWolf77 DarkWolf77 is offline
Sage Advanced User
 
Join Date: Dec 2006
Posts: 169
Quote:
Originally Posted by tmiranda View Post
If there are none to choose from then it won't work
Yeah, I run into the same issue with it. I still have some SD sources where I end up with black bars across the top and bottom (part of the video). With Active AR, I used to switch to an AR that automatically zoomed to that part of the video and voila, black bars gone, but with the android app, it doesn't work.
Reply With Quote
  #17  
Old 11-22-2016, 09:14 PM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
AR Fill seems to be the wrong default choice Vertical black bars on 4:3 media should be the default since it preserves the source aspect ratio. The most annoying thing for me though is that the onscreen controls require a long key press to get to and there's no keyboard mapping which will do this with a Flirc. I love the Tivo Remote + Flirc combo as a remote control for the Nvidia Shield. This aspect ratio is the only thing that ruins it.

I need a keystroke which can activate the Aspect Ratio button on the miniclient. The obvious choice would be just to use whatever is mapped in Sage Command 96 to call what the Aspect Ratio onscreen button does. I think the controls are using long press codes so that Android TV remotes with just a D-pad can control the client but it screws anybody trying to use a standard remote with a Flirc.

I'm going to try an Inteset INT-422 remote as a workaround. Figure maybe it can learn the IR code that the long press select is doing on the Logitech Harmony 650 or I can just learn the TV IR code for changing the aspect ratio and ignore the SageTV mechanism.
Reply With Quote
  #18  
Old 11-23-2016, 06:57 AM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by mlcarson View Post
AR Fill seems to be the wrong default choice Vertical black bars on 4:3 media should be the default since it preserves the source aspect ratio. The most annoying thing for me though is that the onscreen controls require a long key press to get to and there's no keyboard mapping which will do this with a Flirc. I love the Tivo Remote + Flirc combo as a remote control for the Nvidia Shield. This aspect ratio is the only thing that ruins it.

I need a keystroke which can activate the Aspect Ratio button on the miniclient. The obvious choice would be just to use whatever is mapped in Sage Command 96 to call what the Aspect Ratio onscreen button does. I think the controls are using long press codes so that Android TV remotes with just a D-pad can control the client but it screws anybody trying to use a standard remote with a Flirc.

I'm going to try an Inteset INT-422 remote as a workaround. Figure maybe it can learn the IR code that the long press select is doing on the Logitech Harmony 650 or I can just learn the TV IR code for changing the aspect ratio and ignore the SageTV mechanism.
Maybe you could open a defect on the github site for this. I think the the MiniClient should respond to the SageTV AR command changes. By default, the miniclient uses the AR information in the video stream. I've seen a couple of these sample video posted, and while the content is 4:3 the video information is saying that it's 16:9 and so the miniclient is using the right AR, but the video isn't right. Either way, you should open a defect, and I can try to look at integrating the SageTV AR commands in there.
Reply With Quote
  #19  
Old 11-25-2016, 01:34 PM
mlcarson mlcarson is offline
Sage Advanced User
 
Join Date: Aug 2016
Location: Lompoc, CA
Posts: 87
Opened an issue on Github for the miniclient as suggested.
I thought this might app might have provided a workaround but I haven't found it yet:
Multilanguage Keymap Redefiner
https://play.google.com/store/apps/d...edefiner&hl=en

It did wonders for Amazon Prime on the Nvidia Shield by remapping the Enter Key to "Directional Pad Center". IT just seems that with all of the remapping capabilities of that program that it would be possible.
Reply With Quote
  #20  
Old 11-25-2016, 02:22 PM
stuckless's Avatar
stuckless stuckless is offline
SageTVaholic
 
Join Date: Oct 2007
Location: London, Ontario, Canada
Posts: 9,713
Quote:
Originally Posted by mlcarson View Post
Opened an issue on Github for the miniclient as suggested.
I thought this might app might have provided a workaround but I haven't found it yet:
Multilanguage Keymap Redefiner
https://play.google.com/store/apps/d...edefiner&hl=en

It did wonders for Amazon Prime on the Nvidia Shield by remapping the Enter Key to "Directional Pad Center". IT just seems that with all of the remapping capabilities of that program that it would be possible.
Yeah, you can't remap a "long press" since it's not a key. I saw the issue, thx.... I will try to find some time to play with the AR stuff in SageTV and see if I can't get the SageTV AR commands to work in the MiniClient.
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 MiniClient and Audio Passthrough stuckless SageTV Clients Development 10 11-30-2016 10:39 AM
Android MiniClient 1.0.5 - Released stuckless SageTV Clients Development 11 11-16-2016 01:32 PM
[Android MiniClient] Now in BETA stuckless SageTV Clients Development 487 07-03-2016 03:55 PM
[Android MiniClient] Need a better start screen stuckless SageTV Clients Development 16 01-29-2016 01:55 PM
MPEG2 Support in Android MiniClient stuckless SageTV Clients Development 24 01-03-2016 10:09 AM


All times are GMT -6. The time now is 12:55 PM.


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