This version of mdhiggins original Docker container uses ffmpeg with vaapi support enabled to enable hardware accelleration on devices with Intel QuickSync (and some others), for example most Synology Diskstations with Intel CPUs.
On a Synology Diskstation DS920+ (CPU: J4125, RAM: 4GB, GPU: Intel UHD 600) throughput is about 72fps at ~15% CPU usage with the sample command ffmpeg -hwaccel vaapi -hwaccel_device /dev/dri/renderD128 -hwaccel_output_format vaapi -i input.mp4 -c:v h264_vaapi -b:v 2M -maxrate 2M output.mp4
on a typical 1080p movie.
Without hardware accelleration, it is just 20fps at 100% CPU usage.
Tag | Branch | Description |
---|---|---|
latest | build | Stable release from Radarr with FFMPEG compiled from jrottenberg/ffmpeg:4.4-vaapi2004 |
Unfortunately Synology disabled the use of "devices" in DSM 7, either on purpose or accidentally. So the old way does not work any more. But there is an alternative:
-
SSH into the diskstation with admin user
-
Create a file named docker-compose.yml (must be exactly this name) in a folder of your choice, for me it is
/volume1/configs/docker/radarr/docker-compose.yml
version: "2.1" services: radarr: container_name: radarr image: eikowagenknecht/radarr-sma-vaapi:latest environment: - PUID=1028 - PGID=65536 - TZ=Europe/Berlin - MAX_NAME=143 # max length for encrypted file system volumes: - /volume1/configs/sma_radarr:/usr/local/sma/config - /volume1/downloads/blackhole:/blackhole # added by me - /volume1/downloads/complete:/downloads - /volume1/filme:/movies - /volume1/configs/radarr:/config ports: - 38003:7878/tcp devices: - /dev/dri/renderD128:/dev/dri/renderD128 - /dev/dri/card0:/dev/dri/card0 network_mode: bridge
-
In this directory run docker-compose up --detach
After that you can stop and start the container using the UI if you want or continue using docker-compose.
If you use my image, just skip ahead to the next section.
If you build yourself, you have to rebuild the current image with the following commands on your local machine (not the DiskStation, for some reason it doesn't work there). Replace eikowagenknecht/radarr-sma-vaapi:latest
with your dockerhub repository.
cd /path/to/radarr-sma
docker build . -t eikowagenknecht/radarr-sma-vaapi:latest
docker push eikowagenknecht/radarr-sma-vaapi:latest
docker image rm eikowagenknecht/radarr-sma-vaapi:latest
- Stop the container in the diskstation with the Docker UI
- Download the new image from Dockerhub
- Reset the container
- Start the container
You should now be up to date with all settings carried over.
For usage on Synology Diskstation:
-
Download image
-
Create container using the information given in the official repository.
-
Do not start it yet
-
Export container as json and then delete it
-
Modify the devices section in the json file as follows
"devices" : [ { "CgroupPermissions" : "rwm", "PathInContainer" : "/dev/dri/renderD128", "PathOnHost" : "/dev/dri/renderD128" }, { "CgroupPermissions" : "rwm", "PathInContainer" : "/dev/dri/card0", "PathOnHost" : "/dev/dri/card0" } ],
-
Import the json container configuration into the diskstation
-
Now you can run it
Don't forget to also set the vaapi codec as the first entry in the autoProcess.ini file, otherwise the hardware accelleration will not be used. Example:
[Video]
...
codec = h264vaapi, h265vaapi, h264, x264, hevc, x265
...
Please see the official repository for everything else.
Docker Hub page: https://hub.docker.com/r/eikowagenknecht/radarr-sma-vaapi
All credits go to mdhiggins.