Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

subtitle font size is changing depending on video resolution height #4314

Open
lzongor opened this issue Dec 18, 2024 · 4 comments
Open

subtitle font size is changing depending on video resolution height #4314

lzongor opened this issue Dec 18, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@lzongor
Copy link

lzongor commented Dec 18, 2024

Describe the bug

Since the new subtitle handling implementation I noticed that I have to keep adjusting the subtitle size and it is mostly related to the aspect ratio of the media.

I did a quick check in the codebase and I think the issue is in the following line:
mExoPlayerView.getSubtitleView().setFractionalTextSize(0.0533f * userPreferences.get(UserPreferences.Companion.getSubtitlesTextSize()));

From the documentation of setFractionalTextSize:
fun setFractionalTextSize(fractionOfHeight: Float): Unit

  • Sets the text size to be a fraction of the view's remaining height after its top and bottom padding have been subtracted

My understanding from this is that the when the media height changes the subtitle size will be different. Using a constant here to calculate the text size may not be the solution.

Logs

No response

Application version

0.18.2

Where did you install the app from?

None

Device information

CCwGTV

Android version

Android TV 12

Jellyfin server version

10.10.3

@lzongor lzongor added the bug Something isn't working label Dec 18, 2024
@MMazurczuk
Copy link

It looks like there is a second version of this function that accepts two arguments -- the second one is boolean ignorePadding. If set to true it should fix this issue

@PCJones
Copy link

PCJones commented Dec 30, 2024

Related: #4234

@vjanitor
Copy link

vjanitor commented Jan 4, 2025

I confirm having the same issue ( jellyfin-androidtv 0.18.3)
Would very much appreciate consistent subtitle size per device (regardless vertical position), and not having to change it depending on aspect ratio. Currently struggling with 2.35:1

@maru801
Copy link

maru801 commented Jan 5, 2025

As stated in the linked PR above by @PCJones, the main dev behind ATV is thinking about making it a feature request that will be worked on in the future if there's enough demand for it.

The current behavior is "correct" though as what's happening is subs are using the dimensions of the video instead of the player.
When I say "correct", it's because this is to guarantee that subs that have specific data to position subtitles over exact positions on video are handled properly.

This isn't an issue on basic subtitles like SRT subs, so a toggle to revert to ignore the video dimensions and use the player dimensions would work there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants