Sure thing!
Info.zip (23.4 KB)
Hmm. The Android app does analyze files itself instead of relying on PMS.
Do you have any other programs that can provide info on video files? My guess is that the subtitle is in the file, but PMS is somehow not seeing it so there is a conflict when choosing a subtitle track. Not picking a subtitle removes the conflict so it plays just fine.
Hey, I used MediaInfo to extract some metadata.
MediaInfo.txt (3.4 KB)
MediaInfo_ExternalSub.txt (399 Bytes)
Could the ‘SubRip’ be the culprit?
If you look at the bottom of the mediainfo output for the main file, there is a utf-8 track in there. I don’t know what type of subtitle that is, but looks like the Android app is getting it mixed up and thinking it’s an SSA subtitle, which it might be but tagged wrong. PMS ignores this, but the app isn’t so it gets mixed up with how many subtitle tracks exist and ends up requesting the wrong one. This is a known issue and already brought up to the team. Just need to wait for a fix.
Alternatively, remux the file and remove that subtitle track.
I’ve recently come across this issue with my Synology DS220+ and I’ve got to say it’s very frustrating! I’m a new Synology user and having recently migrated my PMS from my Mac to this DS220+ (but not recently enough to return it), only to find out this whole system I spent months into researching can play 4K no problem, but can’t play SUBTITLES?! It’s pretty demoralizing, especially considering I’ve been putting media on my PMS for six years and it’s just bursting at the seams with PGS subtitles.
That said, finding this thread has been incredibly helpful! But I do have a few questions after performing the steps you’ve outlined here.
Firstly, I should say that nearly all of my media is 1080 or SD, so changing the preference file has fixed this issue nearly 100%, as basically nothing on my server will hit 30 Mbps. But here are my questions:
-
One movie I’ve come across on my server still can’t be played without significant buffering, and where there’s one, there may be more. But this movie streams at 19 Mbps, which seems well within the bit rate threshold you’ve described here. I’m curious then why it can’t play more than 1 minute at a time on any of my devices (various Rokus, iPhone 7, or web app via firefox on an iMac).
-
When I was trying to find out what was happening, I asked some friends that I’m sharing libraries with to test the same movie I was struggling with, and they could play it on their devices (an iPhone 11 and iPhone XS) for several minutes, never encountering any buffering. So if the issue is the DS220+ not being powerful enough to properly display the PGS subtitles, causing buffering and playback errors, how can my friends watch this movie properly when I can’t seem to get it to work on any of my devices?
Thank you so much for any advice or information you could give me on this. I really appreciate it!
(Edit to correct my Synology model number. It’s a DS220+, not a DS220, as originally written.)
Subtitle support varies by Plex client.
For example, the Plex LG webOS app does not support direct playing of PGS subtitles. Enabling those subtitles results in Plex Media Server transcoding the video to burn the subtitles into the video stream. Given the limitations of the Synology NAS, this generally results in buffering.
The Plex Android/Android TV app supports direct playing of PGS subtitles, even if the video is transcoding. A remote Android user may need the video transcoded due to bandwidth limitations. They can enable PGS subtitles and the Plex server does not have to burn them into the video stream, thereby avoiding the CPU limitations of the Synology NAS (the video will still be transcoded via hardware acceleration if the capability is enabled).
I believe the Plex iPhone app can also direct play subtitles (I don’t have one with which to test). That is probably why your friends did not encounter any buffering when streaming from your server.
Do you have 220 or 220+? Just for clarification.
Different Plex clients have different capabilities because of native support for formats and subtitle format support is spotty (though I think full PGS\SSA support is only Shield). My iOS devices can manage more formats of subtitles compared to my Roku but my 218+ can handle 720p\1080p SSA sub transcoding without a problem - even on 10bit - with hardware accelerated streaming enabled. It does choke on PGS subs though at which point I usually grab an SRT file instead.
Subtitle support is just plain weird to manage because client devices just don’t support it well - understandably - and transcoding subtitles is a heavy lift.
Thank you for that explanation! It seems to be a bummer there’s such a disparity between devices that can and can not support these subtitles. I’m sure its (far!) more technical than I realize, but my brain just wants to scream “C’mon! It’s 2021 and these are just transparency layers! Get with it!”
I know you said you don’t have an iPhone to test, but I’m guessing there’s just a raw power difference between my iPhone 7, which can’t play this file properly, and my friend’s iPhone 11 and XS, which can.
Oh! Sorry about that, I do actually have a DS220+, not just the regular DS220. That’s what I get for not double checking before posting.
It’s funny that you link that page. Everything on my server is an MKV with embedded subtitles from a DVD or Blu-Ray, and so much of it has PGS. But in my years of hosting my server from an iMac, I never had any playback issues in this regard and thus never had reason to look at this page to see that PGS was not a fully supported subtitle format.
With how well ChuckPa’s preference edit suggestion worked, it makes me think that there’s a software solution to this somewhere, but I certainly don’t know what it is.
I’ve seen, elsewhere on the forum, people suggest something called ‘Sub-Zero’ (I think?) that pulls SRT subtitles from…somewhere, but I haven’t had a chance to look into it as a solution yet.
Excellent! It’s always helpful when ChuckPa pops in. 
Sub-zero I believe is a plugin for additional subtitle download\matching automation so if you have lots to adjust\change that might be worth checking.
I use https://subscene.com to grab SRT subs manually when I need them. Particularly when I’m looking for “foreign audio only” subs (often called “forced subs” but is a misleading term).
Pretty much no matter which client you use there’ll always be extra management around subtitles just because of the nature of their use evolution, but luckily there’s a bunch of folks in these forums that have messed around with them to help out.
Just wanted to chime in here (my very first post on these forums) to say that I’m glad to see that this topic is under discussion. I’ve had this issue plaguing our household for quite a while - my wife and I prefer to watch everything with English subs enabled and this has been a problem for us on more than a few of our files. Thanks to all for the input!
Chiming in to say I’m seeing similar behavior in my Kubernetes environment - subtitle transcoding of all kinds causes 2-4s of playback followed by 15-20s of buffering for clients that require transcoding - the biggest offender in my environment being Chromecast playback.
Bare metal machines are all running on Intel i7-8700’s with GPU being passed to worker nodes that are Proxmox VMs.
K8s workers are running Ubuntu 21.04 running the 5.11.0-1016-aws kernel leveraging the Intel’s GPU intel-device-plugin.
I do have something you can try.
- Install the Synology Text Editor application
- Stop Plex
- Navigate into the Plex shared folder and down in until you see “Preferences.xml”
- Edit it (right-click, open in Text Editor)
- Cursor down to the closing
/>on the very bottom line.- Carefully add
VaapiDriver="i965"in front of it.- It will look like this when done:
SomePref="Value" VaapiDriver="i965" />- Save the file
- Start Plex
- retest
Just to confirm, would this adjustment be made in /config/Library/Application Support/Plex Media Server/Preferences.xml?
Is there any potential it could be passed as an PLEX_PREFERENCE_$INT akin to the FriendlyName, EnableIPv6, logDebug variables?
Edit
So adding PLEX_PREFERENCE_4: "VaapiDriver=i965" to the env section of my deployment did in fact add the string as desired in the Preferences.xml file:
LogVerbose="0" sendCrashReports="0" TranscoderCanOnlyRemuxVideo="0" TranscoderToneMapping="0" HardwareAcceleratedEncoders="1" TranscoderQuality="1" VaapiDriver="i965"/>
That being said, it does not appear to be making any difference in HW-transcoded playback w/ subtitles when casting to a Chromecast Ultra.
Turning off HW encode/decode and re-starting the stream then begins to perform smoothly, but is obviously more CPU intensive than desired.
Turning HW encode/decode back on then seems to bypass it entirely returning to the original issue.
Edit 2
On.a whim, I modified the VaapiDriver value to i915 and it appears that it is now SW transcoding as-needed and direct streaming otherwise with HW transcoding turned on.
I’m going through formats now to try and see if there’s any codecs/containers that are leveraging HW transcoding with this configuration.
If there’s anything I can provide, please let me know.
Thanks,
Dave
Thank you so much ChuckPa, I was resorting to move my subtitled files onto a separate server through my PC and it was driving me insane. Tried this out today and works like a charm. Cannot thank you enough for this.
Hi,
I have exactly the same issue as above
I’ve activated the HW transcode
I have a DS920+ and when my PS4 play a video with subtitles. you know… Burn, bad playback (15 seconds buffer to run 2 seconds of video)
i’ve tried “old driver tip” even if i don’t like to use the no “newest-version” of something. after all if the new is “new” that’s because there is a lot of bugs fixed
I see no difference
First should i restart plex to apply the change ?
then i will quote someone above
The least you guys could do is add an option in PMS (for NAS owners) to always handle subtitle transcode requests in software-only even if h/w acceleration is enabled for all other scenarios.
If an old driver can do the job why can you just add a option kind
-
Force the transcode in SOFTWARE when you have to burn the subtitle (for slower CPU like NAS)
We latched onto this “older driver” bit as a solution when ChuckPa menioned that they are using a new HW transcode driver available on the NAS, which is better for 4K streams. But it seems to perform worse for smaller streams.
Either way, I’m still unsatisfied with the “solution”, since I didn’t seem to get anyone at Plex to acknowledge that HW transcoding and adding a subtitle to the mix results in such unacceptable performance COMPARED to doing it all in software ahead of time.
As for the driver - assuming you have put the text into the appropriate .xml file - it needs to be added when the server is shut down. If the server is up then shut it down, double check that you are putting the proper text into the proper place in the proper file, and that it stays when you save the file. Then, start up the server, and try watching a show with a subtitle.
PLEASE do not confuse the i965 or iHD video driver with Subtitles. The two are NOT related.
i965 and iHD work in the hardware decode and encode layer. They have NO IMPACT on subtitles or Software encoding (ARM or non QSV-capable Xeon CPUs)
-
i965 works best for H.264 and, on the N3xxx (H264), J33xx (H264), and J34xx (HEVC) CPUs, for less than 80 Mbps converted to less than 20 Mbps. This is why it’s very popular for those with anime or 720p output.
-
iHD works best for anything above 50 Mbps source with output bitrate 20 Mbps or higher (“original quality H.264”). [ Personally, I use iHD (the default) in the entire house for everything because everything plays “Original Quality” ]
-
The complaint that subtitle burning performance is unacceptable is without merit. Consider the following
-
Whenever PMS must burn a subtitle on Synology – It is ALWAYS painful. This point has been acknowledged countless times. This is due to the extremely poor per-core speed of the CPUs used in Synology NAS products.
-
The issue is rooted in the Passmark performance of the CPU.
-
J3455 - 2254 total passmarks ( 563 / core )
PassMark - Intel Celeron J3455 @ 1.50GHz - Price performance comparison -
J4025 - 1633 total passmarks ( 408.25 / core-thread )
PassMark - Intel Celeron J4025 @ 2.00GHz - Price performance comparison -
I can grab all the results needed but the minimum for PMS to transcode in software (which is what subtitle burning is):
The actual process inside the transcoder
Source file
|
stream split
/ | \
Video / sub \ Audio
| | \
HW Decode | | audio transcoding (if needed on a CPU core)
| / |
| / |
Subtitle Burn (CPU) |
| |
HW Encode |
\ /
\ /
Multiplexer
|
|
V
H264, Subtitles burned into each image, with audio stream
-
The Complaint is based on the poor single-thread performance of burning the subtitle stream into EACH frame of the video image before encoding. Intel did not write an API to do this in hardware even though the chip does appear to have an “image overlay” capability
-
Playback stalls because , while the Video might be ready be decoded and the audio already transcoded, the subtitles have not been burned into the image.
-
As each frame is finished, the hardware is capable of encoding to H.264 in microseconds.
-
When all 3 streams are ready to be put back together into the composite stream for the player (time sync is required), the multiplexer creates the output H.264 stream and sends it to the player.
Re,
DS920+ with dsm 7.0 in a container docker linuxserver/plex with the devices /dev/dri added
here the comparison with the “old driver”(VaapiDriver=i965) the default driver (when you don’t change anything in the preferences.xml) with HW transcode enabled and disabled
yesterday I was watching this movie H264 SDR 13.4 MBPS on my ps4 with of course (that’s the topic !)the subtitles in mode BURN.
Default driver HW enabled

ratio betwteen 0.3 and 0.7 Unplayable
Now i’ll show you the result with the old driver HW ENABLED

as you can see
this is file with a bitrate lower than 20 mps and I recognize that the playing is smooth the ratio is~2
Now with HW DISABLED and default driver

Perfect but cpu 90 %
HW DISABLED and old driver

CPU 90% and ratio little bit Less efficient maybe below the default
I have test another movie in HEVC HDR 23.2 MBPS
Default driver HW enabled and hdr tonemapping


Yeah…sometimes stuck in 0.0 several seconds +sometimes in 0.4
Now the old driver

unplayable buffering all the time etc… as you can see with the ratio which oscillates between 0.1 and 1. Better but not enough
Now with HW transcode disabled and default driver

ratio between 0.5 and 1.0 cpu at 90 % not smooth at all
HW disabled old driver

same as above
I have the impression that the “old driver” works better with HW enabled and it is worse when it is disabled
i wonder if it possible to switch to another driver when burn is required
and above all, especially is this driver stable ? why it is an “old” ?
edit : i confirm that the old driver allow to run movies with subs burn after test with another movie
Fine, the single-thread performance of subtitle burning is bad. But what we can’t seem to get you to confirm is that the exact same CPU is perfectly capable of doing subtitle burning AND the entire video transcoding entirely in software, with much better performance than if you did part HW (video) and part SW (for subs). In theory if more of a CPU is tied-up doing SW video decoding/encoding, that should leave less available performance for subtitle burning. But that is just not the case here. Is there a step in that process you drew out that is skipped when doing software from the start?
If the i965 driver is unrelated to subtitling, then why does HW transcoding using this driver allow subtitle burning to run in real-time compared to not using that driver?
Show me the logs ZIP and XML of an example which demonstrates it please.
Here is the xml of the file I am using. It’s an HEVC file, with a forced-sub signs subtitle.
Video.txt (5.7 KB)
To test this, I have to use a web player on my computer. For some reason I am unable to force subtitle burning in the Windows Plex player, probably due to it supporting all subtitles right off-the-bat. I have an android fire TV nearby and a fire tablet I can attempt this on if you wish to have a different player attempting to burn subtitles on this video.
Test 1
Default Preferences.xml file. HW transcoding ENABLED. Forced burn-in (SSA sub).
I’m afraid I neglected to time these numbers, but it always buffered for far longer than it played.
1-Log (Default driver - HW).zip (6.8 MB)
-Began the video, and it took some time (15 seconds?) to start.
-It played for maybe 5 seconds.
-Buffered some time.
-Played for few seconds.
-Buffered again.
-Stopped playing video.
-Waited 15 seconds, downloaded logs.
Oh note, it was forcing the video to display at 1.4 Mbps (SD). Near the end, it was displaying at 0.3 Mbps (SD), and the video was quite blurry.
Test 2
Default Preferences.xml file. HW transcoding DISABLED. Forced burn-in (SSA sub).
The server was running between test 1 and 2. I went into the server settings and unchecked “Use Hardware Acceleration”. I waited a few minutes before playing file to generate time-gap in server log, and to ensure the HW transcode setting took.
2-Log (Default Driver - SW).zip (6.1 MB)
-Began video playback, one second of buffering
-Video starts playing. No buffering.
-Noticed that the video was again at 1.4 Mbps (SD) resolution.
-Attempted to change quality to “Maximum quality”
-Video rebuffered for half a second, then resumed at same “Automatic quality” 1.4 Mbps (SD).
-Attempted to change quality to “Maximum quality”
-Video rebuffered for half a second, then resumed at same “Automatic quality” 1.4 Mbps (SD).
-Stopped playback.
-Waited 15 seconds, downloaded logs.
-Test 3
i965 driver Preferences.xml. HW transcoding ENABLED. Forced burn-in (SSA sub).
I performed this test after shutting down server to apply change to preferences file. Not much of interest here, this is my default configuration now, as it performs excellently.
3-Log (i965 - HW).zip (5.3 MB)
-I began file playback.
-Half a second of buffering. Video begins.
-Encountered no further buffering.
-Noticed video quality set to “Maximum quality”
-Video quality excellent
Quality aside, I can’t get over how running the default VAAPI driver under software somehow performs in real-time, while hardware it chokes so badly doing the exact same thing. It’s nice that we have an “alternate” VAAPI driver that somehow makes subtitle burning work in real time using HW without video quality issues, but this is a workaround at best.
I’d wager that most synology Plex users are unlikely to be using 4K 60+ GB, 80 Mbps videos that the less-efficient-for-HEVC-files driver would be the default for Synology Plex builds. I’m sure I’m guilty of assuming a lot of a particular sample population, but if you are a video fanatic such that you’d be using large 4K files, you probably aren’t going to run Plex on a Synology NAS. I myself am reaching the limits of this NAS with these small files, and plan to expand to a stronger stand-alone server for future-proofing shortly. But the default setup for a Synology NAS should change to using the older driver (AT MINIMUM), but also get fixed so HW transcoding doesn’t choke so badly in some situations.