Integrated libass-android to enable advanced subtitle rendering#5397
Integrated libass-android to enable advanced subtitle rendering#5397j3553a wants to merge 1 commit intojellyfin:masterfrom
Conversation
This commit integrates the `libass-android` library to enable advanced subtitle rendering (e.g., for ASS/SSA formats). Key changes include: - A new developer setting to enable/disable libass. - Configurable options for libass glyph and cache size. - Integration of libass into the ExoPlayer backend for both the TV app and the unified playback module. Inspired by changes initially created by nielsvanvelzen
|
Good evening, Apologies if I missed any contributing rules. I was hoping to receive feedback on these changes to integrate libass back into Jellyfin Android TV. I reused most of your initial implementation but added some settings in the developer options. |
|
How is this PR different from the existing PR? |
This PR is largely the same implementation with the addition of a configurable cache. There are now settings to allow adjusting the glyph and cache. Under the developer options you can enable the library:
****
and configure the glyph size and cache size.
Previous iterations of libass-android didn't allow you to configure the cache and glyph size but I recently made a change there to make it configurable and have found that increasing the glyph size to 10,000 and the cache size to 128 MB made everything substantially more stable. I was able to test these settings for months and was very happy with the changes. If you're interested you can find the changes to make the caching configurable in libass-android here. |
|
There are no plans to add configurable options for the gylph/cache sizes, otherwise this seems like a duplicate of #5121 which is waiting for a stable release of the library to be merged. |
|
That’s understandable. Even without exposing these values as user configurable, I’d still recommend altering the defaults used by libass-android. The upstream libass C library defaults to a glyph cache size of 10,000 and a cache size of 128 MB. In contrast, libass-android currently defaults the glyph cache to 1,024, which I’ve found to be unstable on an Nvidia Shield. In testing on an Nvidia Shield, increasing the glyph cache to 10,000 (while keeping the cache size at 128 MB) significantly improved stability. Based on this, I believe users would have a noticeably better experience if Jellyfin adopted these values as defaults, even if the settings themselves are not exposed in the UI. I appreciate your time and feedback. Please let me know if you'd prefer I close this PR. |
Preferably we should update the defaults upstream (@peerless2012 are you open for that?), but we can ofc change them in the client as well. With my own testing (also on a shield) I haven't found any stability issues since we switched to the OpenGL overlay, which you don't seem to be using in this PR. |
I think it is open, if there is a good enough default config, I can use it as default. |


This commit integrates the
libass-androidlibrary to enable advanced subtitle rendering (e.g., for ASS/SSA formats).Key changes include:
Inspired by changes initially created by nielsvanvelzen
Fixes #4728