HW Transcoding only Using 1 Core?

Server Version#: 1.27.2.5929
Player Version#: Safari

I’m trying to use the DSM 7 version of pms to transcode 4k videos, but the server doesn’t appear to be utilizing all of the CPU cores of my NAS when. It tops out at around 40%.

I have a DS720+ with an Intel Celeron J4125. I have the 64bit server installed. I have HW transcoding and tone mapping turned on. Transcode quality is “make my CPU hurt”. I know the NAS is capable of better transcoding because I used Docker to host the server for a bit and it worked flawlessly, but I had some difficulty migrating my server to docker and wanted to maintain the library I already have. Anyone have any ideas? I’ve looked through the forum and wasn’t able to find anything specific to this. I appreciate the help.

If you want 4K HDR Transcoding + Tonemapping, you must run Plex Media Server in Docker.

See Synology FAQ #28. Using Docker for HW trancode & Tone Mapping - How To


Hardware accelerated transcoding uses the Intel Quick-Sync GPU embedded in the J4125, not the CPU cores. GPU Utilization is not displayed via Synology Resource Monitor, top/htop (cli), etc.

Tonemapping using the GPU requires the Intel Compute Runtime libraries. The libraries are not installed by Synology and not bundled with Plex Media Server. They are part of the Docker package. The J4125 is not powerful enough to tonemap in software, using the CPU cores. Hence the need to use Docker.

To add to FordGuy,

On Synology, you have two methods.

For the J4125, if you have an existing PMS server in the “PlexMediaServer” shared folder, then I recommend “Alternate Method” to install docker.

The alternate method gives full transparency including HW transcoding and tone mapping capability (whatever the host CPU provides)

So I tried that and it works initially, but as soon as the docker server restarts it won’t restart the container. I think it’s because the volumes aren’t mapped correctly. I tried fixing them before but was having a hell of a time getting it to work correctly. Hence why I tried the default app again. Tips?

You are using the alternate (docker run) method ?

When you follow my procedure to create it, you won’t have to change anything after creating it EXCEPT to update the code.

Attempting to modify the value of the container using Synology tools is dangerous and will break it.

At minimum, the page you show should look like this:

Yep, I’m using the alternate method. I didn’t change anything except check the GUID and PUID in the script to create it and remove volume 2 (which I don’t have). The GID and UID were the same as the provided script. Here’s the exact script I ran:

sudo docker run \
-d \
--name plex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-h dockerplex \
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp:/tmp \
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1:/volume1 \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

Returning to your original statement here:

  1. Is the native package running? You can run either Docker or Native PMS.
  2. what are you trying to change in the configuration I presented ?
  3. The GUI is failing for you because Synology doesn’t allow any access to /var/packages in the GUI.
  4. If you only have /volume1 created then, as your definition shows, everything which exists outside the container will also exist, in the same location, inside the container.

I do need to see the logs from Package Center.
you need either SSH (sudo cat /var/log/synopkg.log)
-or-
a scheduled task which runs that same command and emails you the results.

Nope, I stopped the native PMS before installed the Docker container

I wasn’t trying to change anything in the configuration. When the container wouldn’t restart, I went into the settings to try and see if something didn’t look right. Here’s a screen shot of the message I get when trying to restart the container.

I attached the logs. Thanks so much for your help! I did try deleting the container and recreating it a couple times over the past day or two. I haven’t played with the latest container.
Logs.txt (345.4 KB)

Everything checks out.

Would you please make a ZIP of the “Logs” directory under “PlexMediaServer/AppData/Plex Media Server” and attach it here please?

Logs.zip (1.7 MB)

here it is! Thanks again for your help.

@jakeaw

I am finding multiple errors in your logs.

The biggest error I’ve found is that you set the Transcoder temp directory to /transcode.

This directory does not, nor can it ever, exist on a Synology.
The directory structure for all Synology NAS units begins with the volume name, e.g. /volume1.

I suggest you remove /transcode from the transcoder temp directory setting.
Such a setting is common for Docker but not for the native app.

I am also seeing certificate errors and a strange lan IP.

What is address 192.168.1.1 ?

Jul 02, 2022 11:30:21.519 [0x7fd17ddf4b38] DEBUG - Completed: [192.168.1.1:62419] 200 GET /web/main-179-289bdfc5072e1e847598-plex-4.76.1.22469-3117cd9.css (7 live) GZIP 157ms 521458 bytes (pipelined: 1)

(Your NAS is 192.168.1.52)

I am also seeing where the hardware transcoding is not being found.

Since I see no login of the server with your username, I am forced to conclude the server isn’t signed in as an account with PlexPass. Is this true?

Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] DEBUG - [Req#220/Transcode] Found session GUID of nyb25u1zu2fu1tez5sc7nl9n in session start.
Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] DEBUG - [Req#220/Transcode] Cleaning directory for session nyb25u1zu2fu1tez5sc7nl9n ()
Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] DEBUG - [Req#220/Transcode] Starting a transcode session nyb25u1zu2fu1tez5sc7nl9n at offset -1.0 (state=3)
Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] ERROR - [Req#220/Transcode] Error creating directory "/transcode": Permission denied
Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] DEBUG - [Req#220/Transcode] TPU: hardware transcoding: enabled, but no hardware decode accelerator found
Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] DEBUG - [Req#220/Transcode] [Universal] Using local file path instead of URL: /volume1/Movies/Passengers.m4v
Jul 02, 2022 11:31:42.666 [0x7fd17d891b38] DEBUG - [Req#220/Transcode] TPU: hardware transcoding: final decoder: , final encoder: 
Jul 02, 2022 11:31:42.667 [0x7fd17d891b38] ERROR - [Req#220/Transcode] Error creating directory "/transcode": Permission denied

Note sure how that got changed. But I removed it. Thanks!

I have a mesh network with Linksys Velop and that’s the primary mesh node that my NAS is connected to.

The native app is logged into my Plex. I can see the HW transcoding in the native PMS too, which I thought shouldn’t be available on the native PMS. So I’d imagine that’s why it’s giving that error. Under account it says “Lifetime Plex Pass”, and under the General settings for the PMS native app it shows I’m signed in with my email.

Do you think these errors are what’s causing the docker container to not boot up?

Remember, you’ve overlayed the docker installation on top of your existing native app’s metadata.

  • If it’s signed in – then it’s signed in (the same Preferences.xml file is used)

Whatever you have in the native app IS EXACTLY what you’ve have in the container.
(why I defined the container as I did)

To make certain things aren’t getting corrupted, You aren’t trying to run both at the same time?

I DO see two servers named ‘Plex’ in your account: One is Docker, One is Syno native.

We’ll address that.

Regarding not having HW transcoding, there must be an error in your definition somewhere.

Can you SSH into the syno and type id PlexMediaServer at the prompt?

It’ll look like this.

chuck@ds418:~$ id PlexMediaServer
uid=297536(PlexMediaServer) gid=297536(PlexMediaServer) groups=297536(PlexMediaServer),999(synopkgs),937(videodriver)
chuck@ds418:~$

Let me know if the groups don’t match

Also please confirm you’ve not mistyped the group ID number when you created the container definition.

Nope. I’ve been running them separate. I don’t even think I could if I wanted to because the docker container won’t even run after a restart.

I SSH’d in and id’d and this is what I got

jakeaw@Plex:/$ id PlexMediaServer
uid=297536(PlexMediaServer) gid=297536(PlexMediaServer) groups=297536(PlexMediaServer),999(synopkgs),937(videodriver)

I am very concerned that even your native app can’t see the hardware.
There is something VERY wrong here.

DS920+ with DSM 7 and PMS working MUST see the hardware unless DSM is damaged.

As for the docker –
I don’t know what’s wrong with your docker installation but I would remove it and start over. I’ve never seen docker misbehave but PMS proper still work.

  1. With PMS stopped,
  2. You can remove the container without fear of removing the data
  3. You can then recreate the container using the Scheduled task method:

Here’s how I do it.

“DockerPlex” creation runs as ‘root’
Screenshot from 2022-07-04 18-49-34

Emails me the results.

For my setup (to change the name INSIDE the container only)
I have /volume1 and /volume2 (volume 2 also contains media)

docker run \
-d \
--name DockerPlex \
--network=host \
-e TZ="EST" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-h dockerplex \
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp:/tmp \
-v /var/packages/PlexMediaServer/shares/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1:/volume1 \
-v /volume2:/volume2 \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

I’m willing to help you fix this (outside of the forum) if you wish.

I used your same script and got the same result. The container creates and runs as intended, but then I can’t get the container to start back up again. I’d love some help outside the forums if you’re available. Just tell me what’s best for you and I’ll accommodate as best as I can. :slight_smile:

Where are you trying to get it to start ?
Are you using the Docker control app?

Yep, in the docker control app. I took a screen shot of it earlier in the thread with the error I receive.

I have problems with the Docker hardware transcoding as well.
Device: DS920+
OS: DS920+ 7.1-42661 Update 2
PMS native: 1.27.2.5929
PMS Docker: Latest plexpass (forgot to note the version before going back to native app :sweat_smile:)

With the native app it works perfectly, but the Docker container is still not using hardware transcoding.

I read in some other forums that the problem is related to permission issues to “/dev/dri” and can only be solved by changing access and execution right to all users (after every startup).
I’m not sure if this is right since I never give it a try.

I attached the logfiles from Docker and native app, maybe @ChuckPa can find something in there :smile:

Create container command:

sudo docker run \
-d \
--name Plex \
--network=host \
-e TZ="Europe/Berlin" \
-e LANG="en_US.UTF-8" \
-e PLEX_UID=297536 \
-e PLEX_GID=297536 \
-h dockerplex \
-v /volume1/PlexMediaServer/AppData:"/config/Library/Application Support" \
-v /volume1/PlexMediaServer/AppData/tmp:/tmp \
-v /volume1/PlexMediaServer/AppData/tmp:/transcode \
-v /volume1/Media/Filme:/volume1/Media/Filme \
-v /volume1/Media/Serien:/volume1/Media/Serien \
-v /volume1/Media/Musik:/volume1/Media/Musik \
-v /volume1/Media/Fotos:/volume1/Media/Fotos \
-v "/volume1/Plex Records/Filme":"/volume1/Plex Records/Filme" \
-v "/volume1/Plex Records/Serien":"/volume1/Plex Records/Serien" \
--device=/dev/dri:/dev/dri \
plexinc/pms-docker:plexpass

Docker Logs.zip (3.9 MB)
Native App Logs.zip (4.7 MB)

You do not manually change permissions on Synology.
The native package, because it’s installed, provides the access permissions to /dev/dri when you use the UID/GID of PlexMediaServer.

Your logs do not show Hardware Transcoding being enabled.
(Settings - Server - Transcoder - Show Advanced).

(Native app only) - HDR tone mapping OFF
(both) - decoding when available
(both) - encoding when available.

1 Like