ASS subtitle and Hardware Transcoding - Stuttering Playback

Hi,

Since I upgraded to Plex Pass and starting using Hardware Transcoding I have had a few issues. One of them is playback of videos with ASS subtitles.

  • If I turn off HW transcoding, the video playback is very smooth (although CPU usage is high at 70%+)
  • If I turn on HW transcoding, the video playback stutters regularly (although CPU usage is at around 25-30% only).

I have a lot of videos with ASS subtitles and using HW Transcoding (which is the primary reason I upgraded to Plex Pass, hoping to reduce CPU stress) cripples the playback experience. Would really appreciate the help here. Thanks.

Server Version#: 1.24.3.5033-757abe6b4
Player Version#: Web Player
QNAP version: TS453D
CPU: IntelĀ® CeleronĀ® J4125 quad-core 2.0 GHz processor

did you try subtitle option on your client? put ā€œburn subtitle as: only image formatā€

Thanks MkI, I did try that, and that solved the stuttering issue and CPU use even dropped to below 5%. However, it is not a satisfactory solution because:

  1. Not all ASS subtitles will display once I use that option. For 50% of video files that I tried, the subtitle will just disappear. For those, I had to find new subtitles in SRT format.
  2. My entire Movies/TV library uses ASS subtitltes, so it will be a pain to go through and find SRT subtitles for them.
  3. I will lose the nice formatting for ASS subtitles…

SRT is the best option for movies and tv shows. I use ASS only for anime and i had zero issues.

Thank you, understand SRT will work well - but like I mentioned before all of my library use ASS now so it will be time consuming to switch.

Taking a step back, Plex also supports ASS subtitle officially, and I had just paid for Plex Pass to use HW Transcoding. Therefore, I’d prefer to use the ASS function rather than having to resort to SRT. Would appreciate Plex Technical Support to look into this issue to resolve it.

I realize you would prefer to use what you have but you can probably do a work around and have both versions of subtitles. I’m guessing your .ass subs are muxed into your container, so what you could do is use ffmpeg to do an extract of the sub and then use Subtitle Edit (https://github.com/SubtitleEdit/subtitleedit/releases) to convert the sub to .srt. Save the .srt file as the same as the media file with the only difference being that you can put the 2 or 3 (I’d recommend 3 personally) digit language code so Plex knows what language it is (and you can then have multiple external subtitles in different languages.

If you are not familiar with ffmpeg you would want to use something similar to:

ffmpeg -i file.ext -map 0:s:0 -c:s copy file.lang.ass
or
ffmpeg -i file.ext -map 0:2 -c:s copy file.lang.ass

For additional info, -map 0:s:0 refers to the 1st input file [1st 0] (you can have multiple and it is 0 based indexing, so the 1st element starts at 0), the codec you are targeting [the s between the two colons] and finally the subtitle track you are targeting [again, in this case the first subtitle track as it is 0 based indexing].

The second version would have you specifying the track you want to extract, so you would be using the absolute track index (i.e., if the first track is video, track 0, the second track is audio, track 1, and the third track is your subtitle, track 2, the example commands would both extract your subtitle track).

For both the ā€˜lang’ portion would correspond to the language code, i.e., eng for English, chi for Chinese, jpn for Japanese etc. If you are the new scanners, you can also do lang.sdh if the subtitles are SDH/HI type subs and then Plex would show that info.

You can also run

ffprobe file.ext -show_entries stream=index:stream_tags=language -select_streams s -of compact=p=0:nk=1

and that will give you a list of all the subtitle tracks index (easily substituted into the 2nd ffmpeg command I gave) and language, if you have multiple subtitle tracks.

At least with Windows, ffprobe is included in the download, but I’m not sure about other OSes.

After you extracted the subtitle(s), you could then use Subtitle Edit to convert the file either one at a time or via a batch. I use it on Windows, the link I gave does have a Linux version but I’m not familiar with that and if it’s meant for GUI versions of Linux or command line. Also, I don’t know about Mac compatibility, so based on what OS you are on.

Actually, after typing all that up (I’ll keep it because it’s a valid way to do it), I realized you should just be able to actually use ffmpeg to do the conversion in one command. To modify the commands I mentioned earlier they would be updated to the following:

ffmpeg -i file.ext -map 0:s:0 -c:s srt file.lang.srt
or
ffmpeg -i file.ext -map 0:2 -c:s srt file.lang.srt

So basically the change would be switching ā€˜copy’ to ā€˜srt’ and then setting the extension of the output file to .srt. Once you do that, ffmpeg will convert the ass subtitle to srt and save it the file.

Either way you do the conversion, after you complete it, you would want to do a metadata refresh on the media (for a movie, do it at the movie level, for a TV show do it at the series level) and then you should see a new entry in the subtitle selection that says ā€œLanguage (SRT External)ā€ or ā€œLanguage SDH (SRT Externalā€ if you used the .lang.sdh.ext format.

Hopefully that was clear, but if not I’ll be happy to try and clarify.
I realize you would prefer Plex to resolve the issue, but having been using Plex for a few years and being on the forum, I can tell you that it’s kind of hit or miss what gets resolved quickly (or at all).

-Shark2k

What is the context of your playback? If you’re on your own desktop\laptop you might try using the desktop app vs the web-player for better SSA\ASS compatibility- it won’t even try to transcode and will play it natively.

Generally I leave my subtitle settings at ā€œautomaticā€ on the clients (Roku, iOS mostly).

I realize that HW transcoding is preferred to save CPU resources and should work for you (works for me on Synology 218+ doing SSA which is lower CPU than yours) but maybe the QNAP might need additional setting for the HW Transcoding to work better? Hopefully one of the QNAP folks will jump on that aspect for you.

CPU doing software transcoding isn’t a bad thing if you have the resources - lots of folks handle it that way with their devices - and sometimes the software transcoder handles it better than the HW transcoder.

1 Like

Thanks for the clarification. I encounter the issue for 2 players, one of them is WebPlayer, the other one is the Apple TV player.

Indeed as you say for some other players this can be circumvented (e.g. iPad, Windows), because the transcoding is handled by iPad and PC respectively. Somehow Apple TV is an exception to that…

Thank you for the incredibly detailed reply! Really appreciate it. However I am not very technically savvy so I am afraid this method is too complex for me. But thank you very much all the same! :slight_smile:

1 Like

You might fiddle with those settings on the ATV Plex app between new and old player and ā€œautomaticā€ for subtitles because I thought ATV supported SSA … similar to iOS. I could be remembering wrong but I was debating getting an ATV specifically for that support.

You can use a site like subscene.com to grab subtitles in SRT format and then as long as it’s named the same as the video file and in the same folder it’ll be an option to select in Plex. That way you don’t have to embed them. There are a few ways to automate or fiddle with that but might be better served with its own topic (and some forum searches and support articles) if you wanted to delve further into that area.

Thanks for the suggestion. I tried switching to the ā€œoldā€ player. However that still cannot handle ASS files well. (Incidentally, Apple TV Plex player also does not handle 4K videos well. I tried the switching between Old and New Players option, and that did not improve things either unfortunately).

Thanks, I will do that going forward. However to re-download subtitles all my old films (300+) is a pain.

Is there a way to get Plex technical support to notice this issue? I tried contacting them, but didn’t find an option to contact technical support at all (only billing support). Seems not acceptable they are neglecting paid users like this…

It’s really not a Plex dev issue so I wouldn’t put an expectation there. SSA\ASS is just not used for much of anything except pirated material … anime subs mostly (almost exclusively).

So device manufacturers just don’t have an investment to support it and in the past some devices were targeted for lawsuits and such from seeming to be too ā€œpirate formatā€ friendly and why build into a device something that isn’t common for non-pirated material? Same thing for PGS\VOBSOB - those are ā€œonly usedā€ on physical discs so why would a streaming box support something found only on physical discs? So it’s a piracy image and manufacturer cost savings situation for them.

Well, the Plex player will only playback what is supported on the device… that’s where the limitation comes into effect.

As far as the CPU requirements on the server side, burning subs into the video is VERY processor intensive so that’s also why it’s troublesome. It’s not just math removing bits out of the stream (transcoding to lower quality) but redoing all the bits and adding bits to every frame a subtitle is displayed. At least that’s how I understand it (my understanding is pretty generic as I haven’t been fighting encoding or codecs for years now - thankfully the software has gotten easier in that regard).

There are some solutions though.

  • FileBot is an often suggested app that can manage your files automatically for use with Plex including downloading subtitle files for you. It’s very impressive.
  • Nvidia Shield Pro device … so far this is the recommended ā€œmost native supportā€ device out there for playback
  • Infuse - This is an app you can install on your AppleTV and it has additional codec support for things such as SSA and it can tie directly to your Plex server setup. I haven’t used it myself but have looked at it in case I switch to AppleTV and have seen it recommended in these forums
  • Crunchyroll and\or Funimation Subscription - these services cover a lot of anime releases and have replaced most of the past grey market of fansubbing.
  • Desktop\Laptop\HTPC - full codec support
  • Server Setup (see next wall of text)

You can also look into your server setup because some servers can definitely transcode for you, but there will be limitations or trade-offs. I have a Synology 218+ and I watch anime with SSA subs … they get transcoded for my Roku without any problem except for an extra second or two buffer at the beginning. My files are typically 720p so it’s a lighter lift for the transcoder. I can do 1080p as long as the bitrate isn’t too high and I’ve even gotten away with some 10bit 1080p but that’s pushing it. My server can not transcode PGS subs … it dies … so I go to subscene and grab an SRT sub in that case - but mostly I try to make sure the files I have are as compatible as possible in the first place so any transcoding is a light as possible.

Your server seems like it has a better CPU than mine so I think it should do alright with transcoding SSA subs, depending on the video file, but I see folks complain that sub transcoding is impossible for them or kills their server despite being on seemingly better hardware than me. Your server seems like it’s better than mine in that regard as well so maybe one of the more QNAP familiar techies can help there.

Anyways, all of this is to say your frustrations aren’t yours alone - lots of anime fans feel the same pinch including myself - but there’s just limitations involved in managing the anime fandom’s use of tech to push the available playback boundaries; even back with the first VHS fansubs which is how I got started in it way back when - how many people had access to duplicators and title\subtitle decks? :slight_smile:

Good luck!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.