edit: explained below, requires cpu to do the transcoding with image subtitles
Matthew,
As explained in other threads in the forum, Subtitle rendering is done by CPU and is single core per video stream.
25 % of a quad core is processor proves this. Thatās the nature of the tech. If all players could handle sending two video images (the subtitles layer and the actual image layer) just like a disc player does, it would be trivial but itās not that way. Web Browsers donāt support multi-plane rendering. 3D graphics cards do but not everyone has one.
Itās a no-win scenario. This is the one way it works
There are a lot of variables involved.
- PGS and VOBSUB are the two image formats which must be āmergedā into the video image. I explained this 1-2 days ago in another thread.
- Text based subtitles can be easily overlaid on video and is done by almost everything out there.
- Settings in the player are another BIG factor. Does it burn āAutomaticallyā, āAlwaysā , or āImage formats onlyā ?
- The strength of the CPU (J3355 vs J3455 actually makes a difference
- Also, I donāt know what the parameters of the video youāre giving it are. Maybe youāre giving in 4K HEVC HDR? Maybe itās 720p? I would need to see that to know better . As well as the player.
The combination of software transcoding of AAC 7.1 -> AAC 2.0 is part of that load. Adding the subtitles sounds like itās pushing it just over the edge of working.
Changing video resolution wonāt help because, regardless of size, āAn image is an image is an imageā
Iāve heard of the type problem youāre having with XBox. Microsoft is very restrictive on codecs and multi-channel AAC is one of them.
Thanks for this thread! I just upgraded to Plex Pass mainly because I figured hardware decoding (Synology 918+) would be a great idea for multiple streams. Everything I now play (with PGS subtitles) buffers now (single stream). CPU is not overloaded, but buffering occurs. I uncheck hardware acceleration and everything is good again.
Not sure why the hardware acceleration kills the performance but it 100% does (tested many files). Easy to show it to yourself if you have PGS subtitles. Not sure if it matters but I do encode using handbrake with an MKV container.
@GreenFern Did you ever resolve this? How about you, @pdxfisher?
.
Did you ever get this isolated, @ChuckPa?
Iām having the EXACT same issue. Same Synology 918+
HW acceleration on, turn on subtitles, video buffers every 10 seconds. 25% CPU usage
HW acceleration off, turn on subtitles, video plays just fine. 98% CPU usage.
The ONLY changed variable is HW acceleration on, and videos are unplayable. This is the reason I got the paid version of plex, to use the hardware acceleration.
Can you please help?
Thanks.
Sorry for forgetting to reply.
I nevre isolated it other than the fact IMAGE-based subtitles, in spite of being hardware decoded, must have software encoding of the subtitles and software merge onto the image. This is the nature of Image based subtitles and completely unavoidable because the ASIC in CPU does not support image merging this way.
Thanks for replying so quick, @ChuckPa, and providing the technical details.
Iāll keep playing with it,
Do you know what a good work-around, to apply to a whole library would be?
Iām assuming if Iām extracting a Blu-ray of my own to MKV, and keeping subtitles with as tracks within the file, they are image-based. Is that right? Would batch-extracting them to something like an SRT for every movie work?
If so, If a movie in MKV format had embedded image-based subtitles AND I extracted an SRT would there be a way for Plex to know to default to the SRT when turning subtitles on? (So I donāt have to re-encode)
Since there may not a be a solution for image-based subtitles + hardware acceleration, Iām trying to think of the next-best-thing, a way to retroactively prep my movies.
Thanks again for helping!
IF you are extracting yourself, select the TEXT-based subtitles you need and ignore the rest.
This is the best answer. Itās not a work around⦠It is the nature of dealing with video.
To restate, there is no way, other than pre-burning the image subtitles into the image, to do it in real-time using HW acelleration
Nope. I never was able to find a solution other than turning off hardware decoding. I see the bad behavior on both my Roku and on the native app of my Vizio TV.
So my understanding of the issue is that hardware accelerated decoding and encoding is performed in memory buffers the CPU doesnāt have access to. So to burn in the subtitles with hw acceleration on, the decoded frames need to be copied from the GPU buffer into CPU memory, have the subtitles merged, and then frames are copied back to the GPU buffer to be encoded to h264.
I think this copying is adding delays to the decode/encode pipeline - stalling it, so the CPU is just idling whilst it waits for a new frame.
My guess is not enough frame buffers on the GPU - if they arenāt released promptly, they canāt be reused to decode a new frame.
Iād be interested in what performance was like if only hardware decoding OR encoding was used, I suspect itd be much improved.
Using two instances of FFMPEG, one to decode, piping to another to bake in subtitles and encode might also work around the issue depending on how the buffers are assigned (though would probably thrash the memory, so maybe not)
- CPU reads file, pulling streams from container (file format)
- CPU + ASIC (GPU) decode
- CPU does audio
- ASIC (GPU) encodes base video
- CPU overlays subtitle onto video
- CPU packetizes and transmits
Subtitles are single-threaded task
Audio is single-threaded task
Video is multi-threaded if software, nearly instantaneous if hardware
Embedded VOBSUB subs have been broken forever. Iāve got really old files that used to work on every Plex client to date, and then somewhere around 6+ months ago they all stopped functioning properly.
Define ābrokenā?
Image subtitles are always transcoded by the CPU. Most NAS systems (with exception of QNAP models using an i3, i5, or i7 processor) do not have enough CPU power to handle the load of merging the subtitle (image) onto the main video stream image. It has always been this way.
I have a DS1019+ and am seeing the same performance profile.
When HW acceleration is on buffering every 10 seconds with 25% CPU usage by Plex Transcoder.
With HW acceleration off my CPU usage is 100% but no buffering.
Makes sense as to why.
Suggest feature:
Add new option to have Plex Transcode without HW acceleration for Image Subtitle transcode jobs only. That way we donāt have to keep toggling HW acceleration on and off.
(Since this is Plex Pass only feature it would be āpaid forā as an upgrade to the existing HW acceleration feature.)
Thanks for this thread all. Just installed my first NAS and quickly ran into the above well documented situation. I guess I might just use the NAS as the true storage location and continue to use my old media center/PC as the place where Plex crushes data.