Jellyfin Forum
Exoplayer black screen on Android TV when transcoding ASS subtitles - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Support (https://forum.jellyfin.org/f-support)
+--- Forum: Troubleshooting (https://forum.jellyfin.org/f-troubleshooting)
+--- Thread: Exoplayer black screen on Android TV when transcoding ASS subtitles (/t-exoplayer-black-screen-on-android-tv-when-transcoding-ass-subtitles)

Pages: 1 2


Exoplayer black screen on Android TV when transcoding ASS subtitles - cheeselord - 2024-01-24

Hi all,

I keep finding conflicting threads all over the internet on whether Exoplayer is actually limited when it comes to rendering or displaying ASS subtitles, so I thought I'd ask and provide logs for my specific situation.  In my particular case, the ASS subtitles are associated with anime as my western media plays and transcodes just fine with SRT subtitles being extracted as separate files - no issue there.

Whenever I play media that has ASS subtitles embedded, my player shows a black screen and nothing actually plays.  My logs tell me that a transcode is happening, but it is quitting early, and then continually retrying until I exit out of the stream.  The log I captured shows 5 attempts to transcode I believe, after which I exited the stream.  There doesn't seem to be any sign of an error on the Android TV client, and the playback timer looks to be running on my Jellyfin dashboard as if it's playing the media.  I was under the assumption that if "Burn In" is set to "Auto" or "All" then subtitles should be able to display regardless of the player. 

If I switch the player to LibVLC the media plays, but it seems to be media-specific on whether the subtitles actually display.  I've read that could possibly be due to a font rendering issue on the device itself.

All in all, I was just curious on the expected behavior here.  Is there a known issue with Exoplayer showing a black screen with ASS subtitles?  Should this be happening even though I have my subtitle "Burn In" setting set to "Auto" or "All"?

Maybe one of you smart folks can see what I'm doing wrong by just looking at my logs!  I've attached a snippet of my Jellyfin server log along with one of the transcode logs.  Thanks!


.txt   jf-log.txt (Size: 31.41 KB / Downloads: 20)

.txt   transcode-log-ass.txt (Size: 21.89 KB / Downloads: 34)


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - TheDreadPirate - 2024-01-24

Does ANY transcoding work?

What is the host OS?

Can you share your docker compose?

What model GPU do you have?

Can you share screenshots of Dashboard > Playback in jellyfin?


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - cheeselord - 2024-01-24

Hi, thank you for the reply!  Transcoding does work. Locally, I have most media direct playing, but if I cap the bitrate on the player, I can see that it is transcoding.  This goes for users outside of my network, too.  I can see successful transcodes.

I'm running Ubuntu 22.04.3.

Here is my docker compose file.  This container is running version 10.8.13 of Jellyfin.

Code:
version: "3.8"
services:
  jellyfin:
    image: linuxserver/jellyfin
    container_name: jellyfin
    runtime: nvidia
    volumes:
      - /opt/docker/jellyfin/config:/config
      - /mnt/mergerfs/media:/data/media:ro
    networks:
      - jellyfin
      - jellyseerr
    environment:
      - PUID=998
      - PGID=998
      - UMASK=022
      - TZ=America/Los_Angeles
      - NVIDIA_VISIBLE_DEVICES=all
    restart: unless-stopped
networks:
  jellyfin:
    name: jellyfin
  jellyseerr:
    name: jellyseerr
    external: true

I use an NVIDIA GTX 1070.  The driver version for the GPU is 535.129.03, and I can confirm there is a load on the GPU when I transcode and execute nvidia-smi in the container.

I've attached a screenshot of the Playback page in the Jellyfin dashboard.

[attachment=2239]

I've also attached two more logs to show a successful transcode from outside of my network.  In this case, the user had to use libVLC.  They also reported that the ASS subtitles were not displaying.  For this media, the subtitles do exist since they are displaying in Firefox on my PC just fine.

.txt   successful-transcode-server-log.txt (Size: 3.68 KB / Downloads: 20)

.txt   transcode-log.txt (Size: 16.64 KB / Downloads: 31)

Thank you for taking the time.


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - TheDreadPirate - 2024-01-24

What kind of Android TV devices are you using? Built into the TV or some variety of dongle or box?


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - cheeselord - 2024-01-24

It is one of the dongle types that plug directly into an HDMI port. My local device is a Fire TV Stick (3rd generation) running Fire OS 7.6.6.8.  I believe the user that is also having issues has the same generation and OS version of Fire Stick.

I was looking at the Apple TV or Nvidia shield boxes to hopefully replace the Fire Stick at some point, but that won't be for some time.


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - TheDreadPirate - 2024-01-24

Make sure you're on the latest Jellyfin Android TV app (0.16.4) and latest Fire OS. Maybe even try signing up for Jellyfin app the beta, if there is an active beta, to see if that resolves your issues. I also see an open issue on the Android TV github that is similar to what you're describing.

https://github.com/jellyfin/jellyfin-androidtv/issues/3208


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - cheeselord - 2024-01-25

Thank you for the help. Both devices are using the 0.16.4 version of the Android TV app. At the moment, I do not see any beta releases on the Android TV repo to sideload onto the Fire Stick, so I may just need to play the waiting game. I will follow that Github issue you have linked.

Regarding subtitles being "Burned In", this just means they are burned into the video stream, correct? Meaning they do not rely on fonts or whatever is needed on the client to render them?


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - TheDreadPirate - 2024-01-25

Correct.  If the device doesn't have the fonts locally, they are attached in the file.  So that SHOULDN'T matter.


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - cheeselord - 2024-02-01

I have managed to capture more logs related to this.  Perhaps this is a bug with ExoPlayer on the Android TV client.  If it is, I can create an issue on Github.  However, I do not know for certain whether it is a bug as I do not really understand what is happening in the logs.

I've tested with two different series episodes of anime with my Android TV player set to ExoPlayer.  Both of them have .ASS subtitles.  The only difference that I can see is the amount of audio, subtitle tracks, and possibly fonts between them.

The Baki episode produces 2 different transcode logs before I backed out of ExoPlayer.  If I did not back out, it would continually try transcoding until I manually backed out.  I found it does not matter whether or not the ffmpeg process returns a 0 or 137 code.  During this time, no playback error seems to be reported in ExoPlayer, the screen is black, the progress bar does not move, and the play button is in the "paused" state. 

The Attack on Titan episode produces 2 different transcode logs as well but it actually plays.

I have tried to remove the excess audio and subtitle tracks in the Baki media using MKVToolNix, but the problem persists.  Using LibVLC is not ideal as the subtitles are never shown even with the Burn subtitles option set to "All". 

What is the difference between these two pieces of media to cause such consistent behavior?  Is there any reason that two transcode logs are generated for the media that actually plays?  For almost everything else that is not anime in my library, there is only ever one transcode log generated.


.txt   jf-server-log.txt (Size: 24.95 KB / Downloads: 26)
.txt   exo-1-aot-transcode-log.txt (Size: 16.79 KB / Downloads: 15)
.txt   exo-2-aot-transcode-log.txt (Size: 26.79 KB / Downloads: 18)
.txt   exo-1-baki-transcode-log.txt (Size: 23.75 KB / Downloads: 17)
.txt   exo-2-baki-transcode-log.txt (Size: 21.62 KB / Downloads: 17)


RE: Exoplayer black screen on Android TV when transcoding ASS subtitles - TheDreadPirate - 2024-02-01

Lets try two things.

Code:
/usr/lib/jellyfin-ffmpeg/ffmpeg -fflags genpts -i "/data/media/anime/sonarr-anime/Baki (2018)/Baki (2018) - S01E01 - 001 - Synchronicity [HDTV-1080p][8bit][x264][EAC3 2.0][JA].mkv" -map 0:v -map 0:a -map 0:s -map_chapters 0 -c:v copy -c:a copy -c:s copy outputFile.mkv

We are simply repacking the file to make sure there is nothing wrong with the container (more common than you think).

Also try uncheck Allow encoding in HEVC format in Dashboard > Playback. I know the 1070 can do HEVC, but I'm just curious.