# Hardware Transcoding issue (quicksync) in docker

**URL:** <https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624>\
**Category:** Plex Media Server\
**Tags:** server-linux, server-synology\
**Created:** [June 6, 2023, 1:30pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624 "2023-06-06T13:30:27Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 6, 2023, 1:30pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/1 "2023-06-06T13:30:27Z")

</div>

Synology DS1019+  
DSM 7.2-64561

I’m running plexinc/pms-docker. _(I’ve tried linuxserver/plex image as well but the same issue persists)_

I have a docker compose file that I use and it has “ **- /dev/dri:/dev/dri** ” added and when the container is started I see **“45-plex-hw-transcode-and-connnected-tuner: executing…”** but I still can’t transcode anything.

I can’t get anything to transcode. I’ve followed multiple tutorials and I’ve tried everything I know how to do, but the error I continue to get in the plex logs is

[FFMPEG] - Cannot load libcuda.so.1  
[FFMPEG] - Could not dynamically load CUDA  
[FFMPEG] - Failed to initialise VAAPI connection: -1 (unknown libva error).

I used to be able to transcode, but I’m honestly not sure how long this issue has been going on, I just started investigating recently because of high CPU usage.

I’ve used HW transcoding before on this NAS so I know it’s capable, but also verified using the links provided on [https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/](https://support.plex.tv/articles/115002178853-using-hardware-accelerated-streaming/)

Any help would be greatly appreciated!

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 6, 2023, 3:17pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/2 "2023-06-06T15:17:21Z")

</div>

1. Is this a volume definition or ?

> [@travis.s.lehman](#):
>
> “ **- /dev/dri:/dev/dri** ”

1. Do you have server debug logs ZIP which capture this ? (Can’t help by guessing)

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 6, 2023, 8:03pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/3 "2023-06-06T20:03:45Z")

</div>

Hey Chuck!

It’s a bind mount to the folder containing my kernel device. I used [this article](https://github.com/plexinc/pms-docker#intel-quick-sync-hardware-transcoding-support) as a guide.

[Plex Media Server Logs\_2023-06-06\_15-55-54.zip](https://forums.plex.tv/uploads/short-url/1v7SycAuNa4VKAwD6HGzLMTBQk1.zip) (2.5 MB)  
I’m attaching [server logs.](https://support.plex.tv/articles/200250417-plex-media-server-log-files/) Line 6926-6937 are where I see the error I posted about

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 6, 2023, 8:31pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/4 "2023-06-06T20:31:31Z")

</div>

Um… NO.

Bind mount is a filesystem mount.  
You want the device node mount

```auto
--device=/dev/dri:/dev/dri

```

Different privilege level for ioctl() . Bind does not provide it.

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 6, 2023, 10:07pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/5 "2023-06-06T22:07:14Z")

</div>

![Screenshot 2023-06-06 at 5.22.01 PM](https://global.discourse-cdn.com/plex/original/4X/b/6/a/b6a7934449f2e51b171714e47c4f6d65bf969c4a.png)

Chuck,

My apologies. I do have the --device prefix for it, I attached the Plex compose file I use.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 6, 2023, 10:30pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/6 "2023-06-06T22:30:48Z")

</div>

thank you. MUCH better.

Now, is UID 1031 a member of the group which owns /dev/dri/renderDxxx ?

PMS relies on udev group permissions to avoid any requirement to run as root.

```auto
[chuck@lizum docker.2008]$ groups $(grep 1000 /etc/passwd | awk -F: '{print $1}')
chuck : chuck adm cdrom sudo dip video plugdev render lpadmin lxd sambashare
[chuck@lizum docker.2009]$ ls -la /dev/dri
total 0
drwxr-xr-x 3 root root 140 May 31 21:10 ./
drwxr-xr-x 21 root root 5200 Jun 2 18:10 ../
drwxr-xr-x 2 root root 120 May 31 21:10 by-path/
crw-rw----+ 1 root render 226, 0 May 31 21:10 card0
crw-rw----+ 1 root render 226, 1 Jun 6 10:54 card1
crw-rw----+ 1 root render 226, 128 May 31 21:10 renderD128
crw-rw----+ 1 root render 226, 129 May 31 21:10 renderD129
[chuck@lizum docker.2010]$ 

```

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 6, 2023, 11:10pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/7 "2023-06-06T23:10:02Z")

</div>

![Screenshot 2023-06-06 at 7.09.29 PM](https://global.discourse-cdn.com/plex/original/4X/f/1/5/f1518a74d8c8964462a07b4f8f221fff6515b23f.png)

Chuck, is this what you’re looking for?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 6, 2023, 11:14pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/8 "2023-06-06T23:14:48Z")

</div>

Stupid me.

You’re doing this on Synology.

See the group “videodriver” ?

from the command line, `grep videodriver /etc/group`  
That’s the GID you need to use.

Syno won’t permit anything else.  
This is also why Docker on DSM 7 is a PITA and the native app works better.  
(I had to integrate the videodriver permission request into the package installation otherwise I had no access to it)

Do not be surprised if it continues to fail on DSM 7. They made it so tight that \*\*\*\* squeaks LOL

Why are you using Docker on Syno?  
Please don’t tell me because it’s easier. 🙄🤣

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 6, 2023, 11:24pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/9 "2023-06-06T23:24:06Z")

</div>

![Screenshot 2023-06-06 at 7.21.35 PM](https://global.discourse-cdn.com/plex/original/4X/d/6/b/d6b1d15915e35f05b84e441ae8ff6ad46c815a31.png)

The main reason for switching from Syno package Plex to docker was for auto updates to Plex, and I have about 13 other docker containers and the tiny shred of A.D.D. in me liked the idea.

Is there any way of auto-updating Syno Plex package?

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 6, 2023, 11:28pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/10 "2023-06-06T23:28:32Z")

</div>

There you go. There’s the GID.

Yes, you can auto update.

1. A Task Scheduler , user-script can  
– Download the file (use whichever tool you like; MrWorf? , etc)  
– Put it somewhere

2. since this is running as user `root` (IMPORTANT)

3. `synopkg install /path/to/filename.spk`

4. `synopkg restart PlexMediaServer`

> related info: What I have to do in the SPK file.

```auto
[chuck@lizum conf.2019]$ cat resource 
{
	"video-driver": {},
	"port-config": "conf/PlexMediaServer.sc",
	"data-share": {
		"shares": [{
			"name": "PlexMediaServer",
			"permission": {
				"rw": ["PlexMediaServer"]
			}
		}],
		"once": "false"
	}
}
[chuck@lizum conf.2020]$

```

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 6, 2023, 11:55pm UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/11 "2023-06-06T23:55:38Z")

</div>

If that’s the case then I’ll just plan on migrating Plex from Docker .spk, much less headache overall.

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 12:09am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/12 "2023-06-07T00:09:58Z")

</div>

IMHO,

Running native and then installing (Manual Install in Package Center) once a release has proven itself stable

makes the most sense to me.

I keep the last 5-10 SPK files anyway (they are only 85 MB each)… way less than a video file

If you want to migrate what you have from Docker → Native, I have the automation / how-to all set.

It’s not too difficult and only a few commands at the SSH command line.

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 7, 2023, 12:22am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/13 "2023-06-07T00:22:51Z")

</div>

That would be great I’d love that info, thanks!

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 12:37am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/14 "2023-06-07T00:37:30Z")

</div>

> [@Synology FAQ - Questions, Answers, and How-To's](https://forums.plex.tv/t/synology-faq-questions-answers-and-a-few-how-tos/490215/40):
>
> FAQ 32: Repairing the PlexMediaServer shared folder While DSM 7 manages the permission of the PlexMediaServer shared folder itself, it does not manage the permission of files placed inside. This means any modification of permissions can cause PMS to fail. Frequent causes: Placing media in the shared folder – Which should NEVER be done. This is for PMS internal (metadata) use only. Special allowed case of adding plug-ins but must be installed correctly. One of the biggest confusion po…

1. Install the native DSM 7 SPK file

2. STOP it.

3. Don’t bother initializing it. It’s about to be deleted.

4. In FileStation  
– Navigate PlexMediaServer/AppData  
– Delete “Plex Media Server”

5. Now put your Docker’s “Plex Media Server” (from /config/Library/Application Support) there in its place.

6. You will end up with the proper structure PlexMediaServer/AppData/Plex Media Server

7. Now run the above scheduled task.

- It will change the ownership and permissions of all the files

1. When you receive the email of successful completion, you can Start PMS.

2. Go into your server settings (Settings - Server)  
– make any changes you now want but it should be OK.

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 7, 2023, 1:37am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/15 "2023-06-07T01:37:20Z")

</div>

I did the above, all steps went as expected, but plex package starts, runs for 5 seconds then stops. I’m going to repeat the process above because on Step 1 I installed the package but unchecked the Run after installation option.

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 7, 2023, 1:56am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/16 "2023-06-07T01:56:58Z")

</div>

Realized that I didn’t run the bash task as root.

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 7, 2023, 2:38am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/17 "2023-06-07T02:38:16Z")

</div>

Plex migrated successfully! It’s now running using DSM instead of Docker.

I am still getting the same error as before when attempting to transcode, in the log it’s lines 8682-8697.

I had followed a [blog post](https://medium.com/@MrNick4B/plex-on-docker-on-synology-enabling-hardware-transcoding-fa017190cad7) that had me change permissions for the /dev/dri folder, I’m not sure if that’s affecting this now or not.

[Plex Media Server.log](https://forums.plex.tv/uploads/short-url/eubBfJBtiD4wA8iS7GGOgwr5rTW.log) (1.6 MB)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 3:07am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/18 "2023-06-07T03:07:04Z")

</div>

You have an ApolloLake CPU. (J3455)

There was a regression.

There is this file: (This is the Engineer’s build which will be in the next PMS release)

> **[PlexMediaServer-1.32.5.7145-eb78fdd17-x86\_64\_DSM7.spk](https://drive.google.com/file/d/1moCDAiAQw7hinRFtDu_AwgKwPk9YjQn1/view?usp=sharing)**
>
> Google Drive file.

and this driver.

> **[i965\_drv\_video.zip](https://drive.google.com/file/d/1bzelnPRI-Cmbi9jqfNRwP_NG1Jqk9vZc/view?usp=sharing)**
>
> Google Drive file.

The i965 driver goes in “Cache/va-dri-linux-x86\_64” under “Plex Media Server”

Then install the file.

Make certain you aren’t calling out the `VaapiDriver="i965"` in your Preferences.

(been a long day – think I got it right)

```auto
[chuck@glockner Cache.2005]$ cd va-dri-linux-x86_64/
[chuck@glockner va-dri-linux-x86_64.2006]$ ls -la
total 9176
drwxr-xr-x 2 plex plex 69 May 30 12:00 ./
drwxr-xr-x 9 plex plex 4096 Jun 6 22:38 ../
-rwxrwxrwx 1 root root 7815088 May 30 10:49 i965_drv_video.so*
-rw-r--r-- 1 root root 1576222 May 30 12:00 i965_drv_video.zip
[chuck@glockner va-dri-linux-x86_64.2007]$ 

```

The upcoming build with all these fixes properly integrated are coming up shortly.  
You can use build .6999 if you need to

---

<div class="post-metadata">

**Author:** ![travis.s.lehman](https://avatars.discourse-cdn.com/v4/letter/t/34f0e0/32.png) [@travis.s.lehman](https://forums.plex.tv/u/travis.s.lehman)\
**Post date:** [June 7, 2023, 3:28am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/19 "2023-06-07T03:28:11Z")

</div>

THANK you!!!

 ![Screenshot 2023-06-06 at 11.27.30 PM](https://global.discourse-cdn.com/plex/original/4X/9/6/6/966d3db0ff3b1c9555837d2cb544fb4c67189c32.png)

---

<div class="post-metadata">

**Author:** ![ChuckPa](https://sea1.discourse-cdn.com/plex/user_avatar/forums.plex.tv/chuckpa/32/79710_2.png) [@ChuckPa](https://forums.plex.tv/u/ChuckPa)\
**Post date:** [June 7, 2023, 3:32am UTC](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624/20 "2023-06-07T03:32:54Z")

</div>

All ship shape and working? (Looks it from here)

PS, might want to improve that Player quality setting …

2 Mbps is kinda rough LOL

[Next page](https://forums.plex.tv/t/hardware-transcoding-issue-quicksync-in-docker/843624.md?page=2)
