yuliskov / SmartTube

SmartTube - an advanced player for set-top boxes and tvs running Android OS
https://www.patreon.com/smarttube
Other
17.07k stars 959 forks source link

For 16:10 monitors/displays, custom aspect ratio options, especially 16:8.1 (1.9753:1) needed! #1724

Open DellendinMi opened 1 year ago

DellendinMi commented 1 year ago

SmartTube version: 15.30 Device: X96 Air S905X3 Android TV Box (Android 9 Pie) Monitor: Samsung SyncMaster 933NW+, 19" 1440x900, 16:10 (with a HDMI to VGA active converter) Sample Test Video: Youtube video named "FULL HD PM5644 test pattern - 1920 x 1080 60p - 1 Hour with 1Khz sound."

Problem: On 16:10 monitor, standard 16:9 youtube videos seem distorted, as vertically stretched and not proportional. Probable solutions: Adding custom aspect ratio option for editing, or at least a preset AR as 16:8.1 (1.9753:1) would solve most probably.

I still use an ancient 19" 16:10 1440x900 VGA Samsung monitor with a Windows PC and a X96 Air S905X3 Android TV Box. When i watch standard 16:9 youtube videos on Firefox on windows PC, the image is proportional and very well scaled. Of course there are approximately ~13mm black bars on top and bottom of the display, which is totally normal and expected. The photo below shows this situation, as you may see the circles, squares are totally scaled:

000 Windows PC Firefox Duzgun

But when i use this same 16:10 monitor on Android TV Box, the YT videos are full screen with no black bars on top and bottom, so the image is NOT proportional and NOT well scaled. This is also expected, because Android TV Box outputs only 16:9 resolutions such as 1920x1080 or 1280x720. There's no option to select a 16:10 output such as 1440x900 or 1280x800 etc. The vertically stretched image can be seen on the photo below (the distorted figures are obvious):

010 X96 Air SmartTube Bozuk

Then, how will we solve this problem? I know that a lot of people -want to- use their 16:10 monitors with their android Tv Boxes, mostly with HDMI to VGA converters, like me. I searched the web for a probable usage of custom resolutions on android tv boxes, at least with the rooted ones, but to NO avail. So i think the only solution will be using different aspect ratios for the videos. This will not solve the distorted images on TV Box menus, applications, games etc., but we can achieve well scaled images on videos, films at least.

So i checked the Aspect Ratio presets on the SmartTube app, but the available AR options are not the required one for 16:9 videos on 16:10 displays. Yes, there's a "16:10" option, but this is for the internal video scaling, just like the others. Choosing it makes an opposite effect on the display and we have black bars on the left and right sides, not up and down, the image seems squeezed from the sides. Choosing a bigger value like "2.21:1" makes a higher change than the required, and makes the image more squeezed vertically, the black bars become more wider than needed.

Then, we need a proper aspect ratio. I think it can be calculated as follows: 16:10 AR is 10/9=1.1111... times bigger vertically than the 16:9 AR. To make the opposite effect on the image, we need to divide 9 with that result: 9/1.1111...=8.1

So we need a custom aspect ratio of "16:8.1" (which is also "1.9753:1")

After calculating this result, i checked it with the 2 different android apps; MX Player and KODI.

MX Player doesn't have a "16:8.1" preset, but has a "Custom" option in "Aspect Ratio" setting. Editing "Custom Aspect Ratio" as "16:8.1" (or "1.9753:1") fixes the 16:9 video distortion on 16:10 monitor. I get the 13mm thick black bars both on top and bottom of the screen on this particular 19" 1440x900 monitor, just like the situation in windows PC:

021 X96 Air MXPlayer AR-16-8 1 Duzgun

KODI doesn't have a "16:8.1" preset, either. And i couldn't find other AR parameters or a custom AR option. But KODI has a "Pixel ratio" option in "Video settings". Setting "Pixel ratio" to "1.11" fixes the 16:9 video distortion on 16:10 monitor, on Android Tv Box: (I guess this "Pixel ratio" option may be a universal solution for appropriate image scaling on non-standard displays, I'm not sure though.)

031 X96 Air Kodi PR-1 11 Duzgun

So, long story short: @yuliskov Please find a proper solution to this relatively significant inconvenience :

Thanks a lot for your efforts on this great application! And thanks to all contributors!

yuliskov commented 1 year ago

Hi. Sure. I'll add 16:8.1 (1.9753:1) preset

yuliskov commented 1 year ago

@DellendinMi hello, friend. Try the latest update and tell me whether the problem is solved.

DellendinMi commented 1 year ago

Wow, i didn't expect such a quick response! Thanks for your kind interest @yuliskov !

I immediately updated to the latest SmartTube 15.62 version. And voila, it's solved! Now with 16:8.1 (1.9753:1) AR setting, 16:9 Youtube videos look properly scaled on 16:10 monitor! Distortion is fixed, proportion is OK, with the black bars! Here's how 16:9 YT Test Video appears with the new setting:

051 X96 Air Smarttube AR-1681 OK 01

Since most of the youtube videos are 16:9, this new 16:8.1 (1.9753:1) preset will be very sufficient for 16:10 monitor users, great!

But, as you already know, there are other non 16:9 videos on youtube, such as 4:3, 16:10, 21:9, ...etc and other non-standard resolutions as well. For videos with these different aspect ratios, we need to calculate new modified ratios. The formula is simple though, just multiplying the video's aspect ratio with 1.11111..... seems to maintain correct proportion on 16:10 displays:

If a video's aspect ratio (or resolution) is A:B then the required AR is (A/B)x1.11111...... for 16:10 monitors.

Examples: For 4:3 (1.3333:1) videos, the required preset is 4:2.7 (1.4815:1) For 21:9 (2.3333:1) videos, the required preset is 21:8.1 (2.5926:1)

Of course preparing new AR presets for every YT video resolution is not rational. So as i mentioned previously;

may be a better/wider solution.

Please consider these issues also, when you have time in the future. Thanks for all, friend!

yuliskov commented 1 year ago

OK. I'll add 16:10 monitor fix into the Settings/Player/Misc

yuliskov commented 1 year ago

I can provide you with test build if you wish. Contact with me via Telegram t.me/yurok9711

DellendinMi commented 1 year ago

Great news @yuliskov !

Sure, I would like to test the new option ASAP. Unfortunately, I don't use that Telegram software/application currently. Do we have chance to download it from here or https://smartyoutubetv.github.io/ , maybe?

yuliskov commented 1 year ago

Nevermind. You've described problem very well. I've already implemented the solution as radio options inside Settings/Player/Pixel ratio.

yuliskov commented 1 year ago

screen

yuliskov commented 1 year ago

@DellendinMi may I ask you question, friend. What's the preffered messenger you're using? This isn't a first time when user refuses to contact with me via Telegram.

DellendinMi commented 1 year ago

Hangouts(!) and SMS for very rare situations. LOL.

I hate texting and surfing with a smartphone. I work on a PC or have my netbook most of the time and surf the web with these, with real keyboard. So in general, for communication, i use the forum sites' own boards or private messengers.

Now google is finishing Hangouts and forces me to pass to Google Chat which appears very insufficient and premature. Seems it still has no video calls, etc. Hangouts was a great app though, used it for years.

I don't use even Whatsapp, never installed it. But from time to time people ask me for Whatsapp and lately Telegram mostly. Seems that I will have to start using at least one of these 3rd party apps, sooner or later.

Until that time i have to deal with the current situation. Greetings from my cave. :)

yuliskov commented 1 year ago

@DellendinMi thanks for the info, friend. Seems I have to avoid any chats at this moment. OK. I'll try to update the beta in a usual way within next weeks.

DellendinMi commented 1 year ago

I can install and start using this Telegram if it will be useful for further communication. I just didn't install and use Whatsapp, Telegram etc. before. They were not mandatory for my usage type, in general.

A quick reply/check; For the new implementation "Pixel ratio", i can say that if you made this option to get the YT video's particular aspect ratio (resolution) and multiply it with the multiplier 1.11111..., then it should be the perfect, ultimate solution for 16:10 monitors, i guess!

But keep in mind that, some day, a rare user may appear and ask for a new "Pixel ratio" preset for his 21:9 monitor, who knows. :)

So, it might be a good idea to add also a; (16:9)/(21:9)= 0.7619 Pixel ratio for 21:9 monitors, if i'm not wrong!

EDIT: I learned that there's no literally a 21:9 ultrawide monitor. The so-called 21:9 monitors are actually 64:27, 43:18, or 12:5 displays. So, instead of "0.7619:1 (21:9 display)" preset, you may add these 3 Pixel ratio presets to make your settings more precise;

yuliskov commented 1 year ago

@DellendinMi sounds good. What about 4:3 crt monitor? Am I right: (16:9)/(4:3)=1.3333

DellendinMi commented 1 year ago

@yuliskov Yep, totally correct! (As long as the device output resolution is regular 16:9, such as 4K 3840x2160, FHD 1920x1080, HD 1280x720, etc! And if my assumptions and calculations are logical! LOL)

This way, users can value their -mostly ancient- monitors with android tv boxes, without wrongly being exposed to thin/tall or conversely thick/short objects while watching videos, films. :)))

yuliskov commented 1 year ago

@DellendinMi great. I'll add entries for other monitors, then. I'm appreciate your help, friend.

DellendinMi commented 1 year ago

I hope that my calculations are true and can be verified in the next days. If that happens and helps some other users like me, i will be very happy to contribute a little to this wonderful app.

Though, a lot of people just want to watch videos full screen, without black bars. They don't care about the wrongly scaled images, etc. I guess they just want the biggest images possible, for their eye pleasure. Or maybe for the health/lifetime of their displays. They will never need these kind of settings most probably, irrespective of the displays they use. But there are also people like me, who just care about the correct scaling of the images, and are not offended bearing with the black bars (anyway, zoom options can be used as well).

I really appreciate your interest in the various requests for this great app, as well as your hard work! Thanks @yuliskov .

DellendinMi commented 1 year ago

I updated to the latest SmartTube Beta 15.67, and i can confirm that 16:10 monitor fix works EXCELLENT!

I chose the "Pixel ratio" option "1.11111:1 (16:10 display)" and checked several different YT videos with various aspect ratios, such as 16:9, 16:10, 4:3, 21:9, non-standard, etc. All of them appear correctly scaled on my 16:10 monitor currently, great! From now on, there's no need for modified "Aspect ratio" presets such as 16:8.1 (1.9753:1) to achieve proportional images; you can delete it.

I don't have a 4:3 monitor to try, but i'm quite sure that the "1.3333:1 (4:3 display)" preset will work as intended, too.

But, for the 21:9 displays, a change is necessary I guess. I learned that there's no literally a 21:9 ultrawide monitor. The so-called 21:9 monitors are actually 64:27, 43:18, or 12:5 displays:

UW Monitors 01

More information can be found here: https://en.wikipedia.org/wiki/21:9_aspect_ratio https://en.wikipedia.org/wiki/Ultrawide_formats

I also see that generally 2560x1080 (64:27) and 3440x1440 (43:18) ultrawide monitors are preferred and sold mostly.

So, instead of "0.7619:1 (21:9 display)" preset, you may add these 3 Pixel ratio presets to make your settings more precise;

I suppose that newer and more expensive monitors might have their own image settings that can switch inner AR/resolution to 4:3, 16:9, 16:10, 21:9, etc. But regardless of that, adding extra Pixel ratio presets to the applications will be more universal and practical, i guess. @yuliskov

yuliskov commented 1 year ago

@DellendinMi thanks for the help, friend. I'll do exactly as you suggest.

Masheroff commented 1 year ago

Hi @yuliskov ! Could you please implement same trick for 1280x720p to 1280x480p conversion? My android box connected to car's display via hdmi converter. So for android it looks like 720p display, but actually it 1280x480, so picture looks very stretched on a such wide display. It will be great if you'll add 0.66666 ratio (480 / 720).

cjmart1 commented 12 months ago

Hello! First thing first: STN is a GREAT youtube client !!! My eternal gratitud. Now, I'd like to remark that the video aspect ratio option on STN version17.80 has vanished... Is it me (just dumbhead) or this option is no longer available ?? Thanks for your kind answer Screenshot_2023-07-10-21-42-12-592_com liskovsoft smarttubetv beta

yuliskov commented 12 months ago

@cjmart1 Settings/Player/Buttons/Aspect ratio

cjmart1 commented 12 months ago

@yuliskof Thanks a lot, man! I found it at Settings/Player/Video zoom (but I'd prefer the way it was before, much easier) Excellent help. Appreciate very much! C.

cjmart1 commented 12 months ago

I've added the video zoom button to the video player interface. Thank you very much yuliskof!

SirFatCat commented 11 months ago

Hi!

Not sure if this is fixed on the beta versions but the fit to width option seems to be bugged. Seems to be the same as fit to height on my end. Please let me know if I'm doing something wrong if it works properly on your end.

Thank you!