Nvidia SHIELD/Android app SSA/ASS format anime subtitles + transcoding problems

Coming from an off-topic post on Killing PMP per request of @DaveBinM

This is a long standing issue with the Android TV app on Nvidia SHIELD TV (the android app in general actually, as this also affects mobile, but as they generally have less capable hardware decoders there is more of an excuse).

When playing certain video files (mostly fansubbed anime or Japanese TV in my case) with complex ASS subtitles, be they embedded or external, one of two things will happen depending on how the client is configured:

  1. (Burn in subs set to Auto or Always) The server will transcode and burn the subs into the stream. This absolutely murders quality and stutters like crazy in many cases - possibly due to the codecs typically used in this scene - to the point of being unwatcheable, even with a 720p or lower resolution file.

  2. (Burn in subs set to “Image Formats Only”) It will direct play and the video stream will be fine, but all the formatting of the subtitles are lost and only plain text is displayed, which becomes unreadable when the subs contain multiple lines intended to be placed in different parts of the screen (eg, during an opening song where both a transliteration and translation of the lyrics are displayed, often at top and bottom).

The way the server is configured for transcoding makes no difference. I have a reasonably powerful server (i7 4790K) with a good cooling solution and this occurs regardless of what setting I use (I usually have it at “make my CPU hurt”). Hardware transcoding via a Nvidia GT730 is the same or worse. This appears to be a client-side problem with whatever backend player the Plex app is using not being able to handle these subs correctly.

As a result, I use Kodi for Android and the Plex add-on for all my local streaming to the Shield which direct plays everything perfectly while rendering even complex ASS subs correctly, up to and including karaoke stuff. But as that add-on won’t be maintained going forward, I’m a little worried it’ll just stop working at some point.

For an example of what I mean, here are some screenshots taken directly from my Shield during playback of the same file:

The first is with sub burn in set to Auto - It renders the subs correctly, but is transcoding (lol at that quality - it stutters like crazy too as a bonus)

The second is with sub burn in set to Image Formats Only - It direct plays, but the subs are only rendered in plain text and are unreadable due to multple lines being mashed together (see here its only rendering a credit line, the lyrics kind of flash in and out or are mashed together seemingly at random)

The third is via the Kodi Plex Add-on - Directly play, original quality, correctly rendered subs

Here is the media info Plex spits out for the file itself:

Media

Duration 24:26
Bitrate 549 kbps
Width 1280
Height 720
Aspect Ratio 1.78
Video Resolution 720p
Container MKV
Video Frame Rate 24p
Audio Profile he-aac
Video Profile high

Part

Duration 24:26
File Polar Bear's Cafe - S01E02 - Everyone's Café _ The Café's Flower Viewing Party.mkv
Size 98.09 MB
Audio Profile he-aac
Container MKV
Video Profile high

Codec H264
Bitrate 482 kbps
Language English
Bit Depth 8
Chroma Location left
Chroma Subsampling 4:2:0
Frame Rate 23.976 fps
Height 720
Level 4.0
Profile high
Ref Frames 6
Scan Type progressive
Width 1280
Display Title 720p (H.264)

Codec AAC
Channels 2
Bitrate 64 kbps
Language 日本語
Audio Channel Layout stereo
Profile he-aac
Sampling Rate 48000 Hz
Title Japanese audio
Display Title 日本語 (HE-AAC Stereo)

Codec ASS
Bitrate 3 kbps
Language English
Title English styled subtitles
Display Title English (ASS)

This is one of my most egregious examples, probably due to how compressed the file is to begin with, but it happens with most of my ASS/SSA subtitled stuff.

I’m fairly sure there’s nothing to do configuration wise on my client and server and I spent a couple of weeks screwing around with it, going through old threads here and trying various solutions. But I thought I’d least report it and see if anybody has any new ideas or if maybe there is going to be some work done in moving a different backend on Android or giving the user a way to choose their own or something.

16 Likes

The behaviors you describe are intended. The video player the Plex app uses cannot render ASS subtitles so you get the 2 choices that you mention.

Yes, I figured as much. Though “intended behaviour” is a strange choice of words, given what you can clearly see in the screenshots, unless you intend for a very basic function to be performed inadequately. Presumably being incapable of dealing with one of the more common subtitle formats out there is not intentional, so much as an unfortunate side effect of the choice to continue to use a subpar backend player. Nevertheless…

I hope the team understands what is implied here. You are discontinuing a much loved and functional app in the PMP which many are using on their HTPCs (which my server box currently doubles as), and you have staff on the forums since that announcement telling users that want a TV style (“10 foot”) interface to buy streaming devices and use your apps there, with the Nvidia Shield getting particular mention. Yet the Shield TV app (and the android app broadly) is currently not up to the task of correctly rendering a very common subtitle format for foreign language media, and your transcoder on the server end is apparently not up to snuff when it comes to keeping image quality up in fallback cases.

So going forward, as somebody who watches a lot of Asian media in particular (where ASS subs are ubiquitous) the only viable solution in the cases of BOTH the Shield I use in one room and the PC I use in the other (assuming I want a UI that can be used without having to keep a keyboard and mouse handy at all times), is to use the Plex Add-on for Kodi, which uses a more serious backend player.

Now I’m happy to continue using it, but the question then becomes, will that add-on continue to receive basic maintenance in so far that it at least won’t have compatibility broken with some future update to the server software or to Kodi itself?

9 Likes

i have a question

that first PIC looks like the result of hardware decoding on a dated GPU

have you tried with hardware decoding disabled to see if that picture quality increases?

Doh, I missed the part about the quality drop when transcoding. Yeah, that doesn’t look right. Will need to see PMS and Shield logs to see why the quality looks like that. Althouhg your file having a bitrate of only 482 kbps doesn’t help.

This is with the work done on the CPU. It is the same or slightly worse when done on GPU (be that onboard Intel or discrete Nvidia)

Yeah, it’s by no means limited to this show, but I chose this file in particular as the result is so bad it’s obvious even in a static screenshot. I suspect the already low bitrate contributes to that though.

Which logs would be helpful and could you link me to a guide to finding them (on the shield in particular) if such a thing exists? Cheers.

Use Plex Web, Settings \ select your Shield \ Troubleshooting \ Download logs

You will get a zip file, upload that entire zip file.

I’m on the same page here. I’d love to finally see proper ssa/ass support on at least Android. I have Anime on my server and a lot of it has ass-subs. The lack of direct play support for those subs is an issue for me since I encode the data in HEVC so i can lower the bitrate to enable direct play on the go.

1 Like

+1 for supporting ASS subs on Android

9 Likes

Hi dude, sorry life got in the way of this. Appreciate your patience.

I don’t have a Plex server running on my Shield, it is a client only and streams from a dedicated linux server/HTPC in another room. I’ll attach the log zip from the server which I pulled immediately after playing an offending file, but I couldn’t see any way of extracting logs from the Shield client end. Is this what you need? Plex Media Server Logs_2019-10-07_13-50-12.zip (6.5 MB)

cheers

In the Plex app on the Shield, go to Settings → Advanced, and set Network Logging = On.

Look in the lower right corner of the screen. You will see a URL, something close to http://ip_of_shield:32500/logging (not in front of my Shield at the moment to verify exact URL).

After recreating the issue, leave the Plex app running in the foreground (*), and point a browser at that URL. You’ll see the log from the Shield client. Save it as a text file and attach to your reply.

(*) If you switch to another app you can’t pull the logs (my experience anyway).

Your logs look fine. PMS is transcoing the video including the subtitles properly. I’m not sure why the quality is so bad. Can you upload that file and subtitle to a sharing site and PM me a link so we can test and try to recreate on our end?

Sure, PM sent.

Subs are embedded. Keep in mind its not a problem unique to this set of files, it’s simply one of the worst examples.

Understood. Just thinking that your file has such a low bitrate that when trying to transcode it, there just isn’t enough data to maintain a good image. In the meantime, you can also try increasing the quality of the transcoder.

The transcoder setting is already at maximum (has been since I set the server up more or less).

You’re right about it likely coming down to the low bitrate of the file, which I’d largely already figured was probably the case as lot of these files tend to be compressed about as far as they will go before image quality significantly declines even before they get anywhere near a user end transcoder. There’s nothing you guys can do about the state of the files or availability of the content etc obviously and that’s no drama. Appreciate you taking the time to have a look at it anyhow.

But the original complaint remains - there is no good reason for these files to be transcoded in the first place. There is no hardware limitation here. The server is able to serve up the file, subs and all, just fine. The local network has plenty of bandwidth. The Shield (still touted, by staff no less, as a kind of gold standard for Plex-friendly devices) is perfectly capable of playing the video and rendering the subs correctly. This a 100% software problem with the official Plex app for Android TV.

As long as Kodi add-on at least continues receiving basic maintenance to stop it breaking, I can continue using that with minimal spousal complaints and all the rest. Kodi’s playback is typically flawless and the Plex add-on is adequate for interacting with our server. But this sub format is ubiquitous out there for all kinds of foreign language media, it’s not some esoteric proprietary format with no documentation or something. It’s a shame that after all the work you guys have been putting into the UI side of things that the official app on a heavily promoted device still has a huge hole like in this its baseline playback ability. If the backend player is the problem then I really hope the team will consider either replacing it with a proper, feature-complete player or at least exposing an option via Advanced/Expert settings to give the user some ability to do that themselves at their own risk.

Cheers :+1:

3 Likes

Main thing keeping me from plex is that the android app can’t direct play ASS subs

5 Likes

+1 to this. Is there a proper feature request we can +1?

It’s honestly embarrassing Plex can’t handle this. It’s such a basic requirement of a media player. Transcoding is not a solution, it’s a band-aid!

“The behaviours you describe are intended”

No they are not intended. What you mean to say is that they are a known problem and limitation with the current player the plex app uses. This needs to change.

The plex kodi addon is hardly even supported. It seems to still be up in the air if it’ll be dropped, just like how Plex dropped the embedded images.

1 Like

I can relate to this as I bought a shield sometime ago which I at the time thought was going to solve the issue to directly play all my media. when it comes .ass subs, this isn’t the case, my server is a Dell Poweredge with xeon gold platinum cpus,

I did however see that something that i never thought would solve this is Infuse so I would also second you guys to prioritize this for the PLEX-app if it is possible, which I am sure it is.

1 Like

Hi,
I was going to open a thread regarding ASS/SSA support for Android & AndroidTV, but there’s already this topic, so I’m just going to “+1”.
Please add ASS/SSA subtitles support for Android platform, my NAS/server has almost no compute power and I’m not expecting it to do any transcoding, especially for something like this.
Best,

1 Like

This problem could be solved very easily just by allowing the use of external player.
MX Player for android tv can play ASS/SSA subs with full effects and styling without transcoding.