I'm starting to experience Hardware Transcode Keep Buffering on DS918+

Server Version#: 1.32.5.7210
Player Version#: Samsung TV Plex version 5.62.0, Plex Web 4.108.0

Recently (about a month? or more), I noticed that transcoded videos (due to .ass sub) are getting very frequent buffering. So, I finally decided to check it out and found that the video is transcoding at 0.7 to 0.8 rate. I get the transcode rate on the Samsung TV Plex client when showing “Playback Information”.

I checked Plex Server on my Synology 918+ and noted that CPU usage is very low (around 5% due to hw decode and encode is being used). The dashboard states 720p (H.264) (hw) → 720p (H264) - Transcode (hw).

In Transcoder tab, the GPU is listed as “HD Graphics 500”

I tried the following config on Plex Server.

  1. HW Decode + HW Encode => transcode rate: around 0.7 to 0.8 (and rarely 1.0 for a while).
  2. HW Decode + SW Encode => transcode rate: around 0.7 to 0.8 (and rarely 1.0 for a while).
  3. SW Decode + SW Encode (burn my CPU) => transcode rate: 3.0 to 5.0. CPU is > 90%
  4. SW Decode + SW Encode (auto) => transcode rate: 3.0 to 5.0. CPU is > 60%, after a while the transcode rate become “0 (throttled)” with CPU around 5% to 40% due to the video being transcoded too much ahead. The previous behaviour will repeat again once transcoded portion is used up.

I actually never had this buffering issue with anime + .ass sub (HW transcode). Only lately. Perhaps due to Plex Server updates? I would prefer to use HW transcode to decrease the CPU usage and reduce heat on the NAS. I don’t mind lower video quality as its actually not noticeable (previous experience before the buffering events).

Please note that I have been using HW transcoding more than 3 years and never had this buffering issue with 720p H.264 HW transcoding when watching anime (due to .ass sub).

Below is the Plex Server log with Debug log enabled. I have it enabled during HW decode+encode only.
Plex Media Server Logs_2023-06-25_05-59-57.zip (1.0 MB)

Update: Anyone with this issue, the workaround is to revert PMS to version 1.32.1.6999. You can download it from https://downloads.plex.tv/plex-media-server-new/1.32.1.6999-91e1e2e2c/synology-dsm7/PlexMediaServer-1.32.1.6999-91e1e2e2c-x86_64_DSM7.spk

No one investigating in this issue?

@ChuckPa Any help on this?

I tried upgrading DSM 7.1.1 to DSM 7.2 and it’s not helping. Also tried the VaapiDriver="i965" trick and caused hardware transcode to be skipped.

Could it be that the ApolloLake fix is causing this issue with DS918+?

@programatix

  1. Remove the i965 clause from Preferences. It’s not applicable to ApolloLake anymore.

  2. In your logs, I see 6 people transcoding at once.

  3. I also see subtitles with the decision burn (use the CPU – which is slow)

Jun 25, 2023 05:42:34.848 [140287706053432] DEBUG - [Req#e5c/Transcode] Codecs: Testing with profile 'High'
Jun 25, 2023 05:42:34.849 [140287706053432] DEBUG - [Req#e5c/Transcode] MDE: My Love Story With Yamada-kun at Lv999 - S1 E13 - TBA: selected media 0 / 210842
Jun 25, 2023 05:42:34.849 [140287706053432] DEBUG - [Req#e5c/Transcode] Streaming Resource: Adding session 0x7f974cd7f808:itskmfqnou743355y4fqg4jb which is using transcoder slot.  Used slots is now 1
Jun 25, 2023 05:42:34.849 [140287706053432] DEBUG - [Req#e5c/Transcode] Streaming Resource: Added session 0x7f974cd7f808:itskmfqnou743355y4fqg4jb
Jun 25, 2023 05:42:34.850 [140287706053432] DEBUG - [Req#e5c/Transcode] Streaming Resource: Reached Decision id=173069 codes=(General=1001,Direct play not available; Conversion OK. Direct Play=3000,App cannot direct play this item. Direct play is disabled. Transcode=1001,Direct play not available; Conversion OK.) media=(id=210842 part=(id=214015 decision=transcode container=mp4 protocol=dash streams=(Video=(id=648768 decision=transcode bitrate=60000 encoder=h264_vaapi width=1280 height=720) Audio=(id=648769 decision=copy channels=2 rate=44100) Subtitle=(id=648770 decision=burn languageCode=eng location=embedded))))
Jun 25, 2023 05:42:34.851 [140287817726776] DEBUG - Completed: [192.168.2.188:50792] 200 GET /video/:/transcode/universal/decision?directPlay=0&directStream=0&directStreamAudio=1&protocol=dash&fastSeek=1&path=%2Flibrary%2Fmetadata%2F173069&session=d54uv3dcpx68xemxg0ek4u5m&mediaIndex=0&partIndex=0&mediaBufferSize=50000&hasMDE=1&subtitleSize=100&videoQuality=100&videoResolution=4096x2160&audioBoost=100&subtitles=burn&location=lan (32 live) #e5c TLS GZIP 26ms 1624 bytes (pipelined: 4)

subtitles=burn

Recommendations:

  1. Go to the players. Set ALL subtitle processing to Automatic or None if not already done.

  2. Be careful about media curation (acquisition and post-processing).
    – When I rip the disk, I keep only what I need

  3. Your TV series directories need work. You’ve got one directory for each episode. This is NOT recommended — AND — it watches “watch” slots for the transcoder

Below is recommended/standard

[chuck@glockner tv2.2006]$ ll /vol/media/tv*/*Strange*
total 12
drwxr-xr-x  5 chuck chuck   72 Jul 24 17:59 ./
drwxrwxr-x 53 chuck chuck 4096 Aug  1 00:19 ../
drwxrwxr-x  2 chuck chuck 4096 May 20 21:03 Season 01/
drwxr-xr-x  2 chuck chuck 4096 Aug  3 02:37 Season 02/
drwxrwxr-x  2 chuck chuck  113 Sep  7  2022 Specials/
[chuck@glockner tv2.2007]$ ll /vol/media/tv*/*Strange*/*
/vol/media/tv2/Star Trek Strange New Worlds/Season 01:
total 205696852
drwxrwxr-x 2 chuck chuck        4096 May 20 21:03 ./
drwxr-xr-x 5 chuck chuck          72 Jul 24 17:59 ../
-rw-rw-r-- 1 chuck chuck 22622969397 May 20 15:49 Star Trek - Strange New Worlds - S01E01 - Strange New Worlds.mkv
-rw-rw-r-- 1 chuck chuck 11529633978 May 20 16:01 Star Trek - Strange New Worlds - S01E02 - Children of the Comet.mkv
-rw-rw-r-- 1 chuck chuck  9491743857 May 20 16:31 Star Trek - Strange New Worlds - S01E03 - Ghosts of Illyria.mkv
-rw-rw-r-- 1 chuck chuck 12700813260 May 20 16:48 Star Trek - Strange New Worlds - S01E04 - Memento Mori.mkv
-rw-rw-r-- 1 chuck chuck 22030456238 May 20 20:28 Star Trek - Strange New Worlds - S01E05 - Spock Amok.mkv
-rw-rw-r-- 1 chuck chuck 21491337551 May 20 20:31 Star Trek - Strange New Worlds - S01E06 - Lift Us Where Suffering Cannot Reach.mkv
-rw-rw-r-- 1 chuck chuck 21111332082 May 20 20:34 Star Trek - Strange New Worlds - S01E07 - The Serene Squall.mkv
-rw-rw-r-- 1 chuck chuck 22686435640 May 20 20:44 Star Trek - Strange New Worlds - S01E08 - The Elysian Kingdom.mkv
-rw-rw-r-- 1 chuck chuck 30600573327 May 20 20:48 Star Trek - Strange New Worlds - S01E09 - All Those Who Wander.mkv
-rw-rw-r-- 1 chuck chuck 36368265746 May 20 21:03 Star Trek - Strange New Worlds - S01E10 - A Quality of Mercy.mkv

/vol/media/tv2/Star Trek Strange New Worlds/Season 02:
total 49585556
drwxr-xr-x 2 chuck chuck       4096 Aug  3 02:37 ./
drwxr-xr-x 5 chuck chuck         72 Jul 24 17:59 ../
-rw-rw-r-- 1 chuck chuck 5346610267 Jun 15 02:22 Star Trek - Strange New Worlds - S02E01 - The Broken Circle.mkv
-rw-rw-r-- 1 chuck chuck 5793453802 Jun 22 02:29 Star Trek - Strange New Worlds - S02E02 - Ad Astra Per Aspera.mkv
-rw-rw-r-- 1 chuck chuck 6388044443 Jun 29 16:51 Star Trek - Strange New Worlds - S02E03 - Tomorrow and Tomorrow and Tomorrow.mkv
-rw-rw-r-- 1 chuck chuck 6151936899 Jul  6 03:12 Star Trek - Strange New Worlds - S02E04 - Among the Lotus Eaters.mkv
-rw-rw-r-- 1 chuck chuck 6927034859 Jul 13 22:38 Star Trek - Strange New Worlds - S02E05 - Charades.mkv
-rw-rw-r-- 1 chuck chuck 2176178414 Jul 26 23:50 Star Trek - Strange New Worlds - S02E06 - Lost in Translation.mkv
-rw-r--r-- 1 chuck chuck 5068282065 Jul 24 11:37 Star Trek - Strange New Worlds - S02E07 - Those Old Scientists.mkv
-rw-rw-r-- 1 chuck chuck 5698365775 Jul 27 02:25 Star Trek - Strange New Worlds - S02E08 - Under the Cloak of War.mkv
-rw-rw-r-- 1 chuck chuck 7225683013 Aug  3 02:37 Star Trek - Strange New Worlds - S02E09 - Subspace Rhapsody.mkv

/vol/media/tv2/Star Trek Strange New Worlds/Specials:
total 1056616
drwxrwxr-x 2 chuck chuck        113 Sep  7  2022 ./
drwxr-xr-x 5 chuck chuck         72 Jul 24 17:59 ../
-rw-r--r-- 1 chuck chuck 1081972552 Sep  8  2021 Star Trek - Strange New Worlds - S00E01 - Star Trek Day 2020 - Strange New Worlds Panel.mkv
[chuck@glockner tv2.2008]$ 

TinyMediaManager or FileBot will do the trick. (I use FileBot)

I can confirm this problem. My PMS is running on a Synology DS1019+ (DSM 7.2-64570 Update 2) inside a Docker container. A friend of mine (without Plex Pass) who uses my PMS to stream media to his Android TV told me he’s having buffer timeouts frequently for about a month now. He never had any problems before. I didn’t change any settings relating transcoding. So I just tested it myself and can confirm I get buffer timeouts now too, which I never had before. Makes me wonder what is the problem.

Plex Media Server Logs_2023-08-03_18-45-09.zip (426.0 KB)

@Vcxy

Please turn on DEBUG logging.
Recreate the failure.
Grab fresh logs and attach.

I can’t see what’s happening.

I do see this – which is not good (DB not optimized / host overloaded )

Jul 31, 2023 22:55:25.667 [140038454934328] WARN - [Req#800] QueryParser: Invalid field 'pinnedContentDirectoryID' found, ignoring.
Jul 31, 2023 23:09:11.605 [140038379965240] WARN - NAT: PMP, timed out waiting for response.
Aug 01, 2023 00:05:35.468 [140038475811640] WARN - SLOW QUERY: It took 380.000000 ms to retrieve 1 items.
Aug 01, 2023 00:09:12.898 [140038477921080] WARN - NAT: PMP, timed out waiting for response.
Aug 01, 2023 00:12:45.483 [140038475811640] WARN - SLOW QUERY: It took 230.000000 ms to retrieve 1 items.
Aug 01, 2023 00:12:59.246 [140038475811640] WARN - SLOW QUERY: It took 240.000000 ms to retrieve 1 items.
Aug 01, 2023 00:13:26.303 [140038475811640] WARN - SLOW QUERY: It took 230.000000 ms to retrieve 1 items.
Aug 01, 2023 00:13:37.793 [140038475811640] WARN - SLOW QUERY: It took 230.000000 ms to retrieve 1 items.
Aug 01, 2023 00:13:47.227 [140038475811640] WARN - SLOW QUERY: It took 240.000000 ms to retrieve 1 items.
Aug 01, 2023 00:13:48.532 [140038475811640] WARN - SLOW QUERY: It took 220.000000 ms to retrieve 1 items.

This implies there are more directories being watched than DSM allows by default resulting in no EAE slots available.

Jul 31, 2023 22:09:21.857 [140038429158200] INFO - [Req#85/Transcode] CodecManager: starting EAE at "/tmp/pms-8cb76407-55bf-4e2c-9df6-415ddadce671/EasyAudioEncoder"
Jul 31, 2023 22:09:37.213 [140038524037944] ERROR - [TranscodeOutputStream] Session appears to have died from under us

Please turn on DEBUG logging.
Recreate the failure.
Grab fresh logs and attach.

I did just that before downloading the logs from my PMS to upload it here. Do you want me to recreate more failures then?

Debug logging is not enabled. Look in Plex Media Server.log in the ZIP file. There are no entries with DEBUG.

Do not enable verbose logging.

Settings → Server_Name → General + Show Advanced

To add to FordGuy,

Dont’ forget to click SAVE when done.

1 Like

Debug logging is not enabled. Look in Plex Media Server.log in the ZIP file. There are no entries with DEBUG.

Ah, sorry. I thought you were talking about Settings → Plex Web → Debug → Debug Level. Didn’t click the link. I’m dumb. :smiley:

Anyway I just watched a big part of an episode and got like three or four buffer timeouts. Of course I first enabled the “Enable Plex Media Server debug loggin” option.

Plex Media Server Logs_2023-08-03_22-34-57.zip (504.2 KB)

Hi ChuckPa,

  1. Yes, I already removed i965 clause from Preferences. Was testing it out and discovered that it totally break HW transcoding, meaning Plex Server couldn’t detect hardware and uses software transcoding.

  2. The log may have shown 6 people transcoding at once because I tried different players to generate the log. They are playing one at a time, not all at once. I already stopped them but somehow PMS still keep them in Dashboard, thinking that the client will resume playback?

  3. This is due to the anime using .ASS subtitle. Somehow Samsung TVs (and Plex web client?) doesn’t support it. They are the reason of this post. Previously my DS918+ was able to transcode them (with HW) without any buffering at all and it started a few months back, which I can’t exactly remember when.

On your recommendation, I’ll clean up the TV series directories but currently they are not giving any issue with transcoding due to the subtitles being .SRT, thus no transcoding occurred.

Also, is my log submitted in the first post sufficient? Do you need me to generate more?

I just did some more research and found this thread. So I reverted my PMS back to version 1.32.1.6999 and now the problems are gone. I watched the same episode with the same settings I used to create the logs in my previous post. PMS buffered MUCH faster than with the latest version and I didn’t run into any buffer timeouts.
According to this post in the mentioned thread above there should already be a fix for Apollolake CPUs (which I have, because my PMS is running inside Docker on a DS1019+ too, just like the OP of the linked thread) in the current version of PMS but from what I can tell now it still isn’t fixed.

1 Like

I get the same result result as @Vcxy. I tried downgrading to 1.32.1.6999 (from 1.32.6.7371) and it doesn’t buffer anymore when using hardware transcoding. The trancoding rate is now > 1.

I also tried installing Synology Video station and it also able to use HW transcode without any buffering (playing video with .ASS subtitle).

Folks:

  1. While there are “fixes” in 1.32.5.7210 and above …

  2. There are also new problems.

I have one user who’s still using 1.25.9 with NO ISSUES.

The question comes down to:

  • Do you want rock solid stability with a few quirks
    -OR-
  • Do you want the new features and some bug fixes with a new set of bugs ?

If the “best” and “newest” is desired, 1.31.3.6999 is what you want.
( Predates ApolloLake and GeminiLake regression )
I can and will make it available for those who request it.

It’s good to hear that the Plex Team is aware of those new problems. So I guess we’ll have to wait for the fixes for the new problems. Until then I’m gonna stay with 1.31.3.6999.

Will the team be fixing this issue or ds918+ owners will have to stay at 1.32.1.6999 permanently if hw transcoding is desired?

YES, We will fix this.

Will folks have to stay at 1.31.3.6999 permanently? Oh HECK NO.

A lot has happened to our teams. We’re still recovering from that.

We’re already working on the GeminiLake regression.
We know what the problem is and when it happened.

The task now is to walk through each individual code change and find the error.
We have code which works. That’s our guide.

1 Like

Hi @ChuckPa,

Is the problem fixed with 1.32.6.7468? I looked at the last two change logs and nothing seems to indicate that this issue has been worked on.

No, we’re still grappling with changes and figuring out what was left for us.

There are many things I can say about what we are finding and, unfortunately, none of which I can say in mixed company.

I hope that conveys my frustration level ?

(I’d have been shot if I ever did this in my active career)

1.32.6.7468 In the current 918+ DSM7.1 system, there will be a problem that 4K videos cannot be converted to 1080P HD quality. There will always be buffering.

Currently returned to 1.32.6.7371. There is no problem in converting 4K to 1080p HD quality, SRT subtitles can be displayed normally with the conversion, and the font size can be adjusted. There is no problem in directly outputting 4K HDR videos.

So currently 1.32.6.7371 is the most satisfactory version.