Enabling Quick Sync Video on Handbrake for Docker on Synology

I took to reading around the interwebs about this thinking the following :

  • I have an Intel Chip with QSV in my Synology NAS
  • I can run docker and Handbrake
  • It doesn’t have options for QSV encoding enabled.
  • My chip supports QSV and as janky as QSV is – I WANT IT ENABLED!!!

So I set about this task with ALL of the info on the inter webs at my disposal, and found no elegant, simple, solution that was going to cater for “the next man in the line”, the average user. So I made one.

1. Installing Handbrake from the registry

Goto the registry of docker on your Synology NAS, and go ahead and download the “jlesage/handbrake” image

Once your have the image and prior to launch you will need to set your environment variables, which will involve you creating a folder for Handbrake in your docker share and then making mount points for /watch, /output, /config & /storage. You may also want to mount other shares on your NAS into this docker instance that contain videos you want to convert, rather than copying them manually into /storage or /watch.

You will also need to setup the environment variables of GROUP_ID and USER_ID as you would for PGID and PUID in other containers. You can find out how to do that on countless other blogs on the interwebs.

You will find loads of useful information at the devs github pages

And, make sure you map your ports to real ports, not auto ports!!

 

2. So now we have a running container

Now you want to get the config out of this, so we can change it to run in QSV mode. Go right ahead and export the settings of this container to your personal computer for editing.

Now fire up your favourite text editor and edit the file you exported and make your devices line like mine in this file, it adds to my line 6 the following :

“devices” : “/dev/dri:/dev/dri”,

SAVE THIS FILE!!!

Now import this file back into docker, the same place you exported it from. You will now effectively have two docker instances – a QSV one, and a non QSV one.

3. But it doesn’t work yet!

One last thing to do to make this container work with QSV, which is enable “Execute container using high privilege

Now you can run your container (the modified one), and QSV will be enabled as below :

QSV may be janky, but its fast, and it’s working, and you have bragging rights, and oh, I showed you how to do it the simple way!

2 thoughts on “Enabling Quick Sync Video on Handbrake for Docker on Synology

  1. Hi,
    thank you for providing this guide.
    I have DS918+, which is supposedly able to Quick Sync, but the codec doesn’t show up for use. Might there have been something that I forgot to install or enable somewhere else?

    1. Have you set the correct GUID and PUID ? If you can open files from symlinked Synology shares your user and group I’d are correct. These are necessary for the correct operation of QSV as well as privileged execution.

Leave a Reply

Your email address will not be published. Required fields are marked *