jellyfin / jellyfin-android

Android Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
1.33k stars 223 forks source link

ASS subtitles not rendered properly but fine on browsers #1388

Open SodaWithoutSparkles opened 1 month ago

SodaWithoutSparkles commented 1 month ago

Describe the bug

  1. Have a video file that:
    • has ASS subtitles with special styles and fonts
      1. Playback the videp file on jellyfin android and select that subtitle
      2. observe that the subtitles are not working correctly
        • Incorrect font
        • Correct color
        • Black background behind text
        • Simultaneous subtitles became jibbrish mess after displaying "correct-ish" subtitles for 1 frame
  2. Use a browser to view the same video
  3. observe that everything works correctly when the video was remuxed:
    • Font is correct without dark background
    • Simultaneous subtitles are displayed correctly

Logs

Attached upon further request

Application version

2.6.1

Where did you install the app from?

Google Play

Device information

Poco X4 GT

Android version

Android 13, MIUI 13.2.5.0

Jellyfin server version

10.9.1

Which video player implementations does this bug apply to?

SodaWithoutSparkles commented 1 month ago

It turns out that it doesnt matter what the video file is. The same ASS subtitle can be pasted to basically any video file and it would have an issue.

It also does not matter if the video is remuxed or directly played.

Pic1: Chrome (correct) (with subtitles from another file): Screenshot_2024-05-17-00-25-36-722_com android chrome-edit

Pic2: Chrome (correct simultaneous with font and no background) (See those tiny text at top and bottom) : Screenshot_2024-05-17-00-29-25-648_com android chrome


Pic3: Jellyfin android, incorrect font and background, and subtitles from another file. Compare it with Pic1: Screenshot_2024-05-17-00-23-34-332_org jellyfin mobile

Jellyfin android, flash 1 frame with "half correct" subtitles then jibbrish which looks like ASS styling. The "half correct" subtitles were supposed to be simultaneous, but the bottom was missing, font is wrong and background was back. These two should match with Pic2.

Pic4: Screenshot_2024-05-17-00-27-23-059_org jellyfin mobile

Pic5: Screenshot_2024-05-17-00-27-30-200_org jellyfin mobile

vincejv commented 1 month ago

Last time i recall JMP doesn't have any control on external players like Android's ExoPlayer when it comes to specific rendering issues like these, integrated means it's embedded in the app and doesnt call an external activity to trigger it, but still it's an external library or dependency which the project cant control

You may want to report the issue here https://github.com/google/ExoPlayer/issues

vincejv commented 1 month ago

Actually the issue is already known in upstream

https://github.com/google/ExoPlayer/issues/8435

vincejv commented 1 month ago

Also dupe of #252

SodaWithoutSparkles commented 1 month ago

Sorry for the dupe. My search didnt find that issue probably because of different symptoms. I was searching for jibbrish ASS subtitle phenomenon as shown in Pic5.

It could also be related to https://github.com/google/ExoPlayer/issues/10295

SodaWithoutSparkles commented 1 month ago

It should also be noted that ExoPlayer is deprecated and this bug is probably not going to be fixed (if we dont move to the suggested library):

This project is deprecated. All users should migrate to AndroidX Media3. Please refer to our migration guide and script to move your codebase to the Media3 package names.

If it was not using AndroidX's version, maybe we should switch

If it was using AndroidX's version, maybe I should open another issue referencing the aforementioned issues as well? It doesnt seem like anyone has raised this ASS styling issues at the new repo, so I assume that this was either fixed or nobody noticed it?