-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
On Synology NAS devices (and possibly other setups, /dev/dri/renderD128 has permissions 'u=rw,g=,o=' and is owned by user "videodriver".
This configuration prevents hardware transcoding using h264_qsv as the VAAPI device cannot be unless the Synology user runs the docker package as root:
/usr/bin/ffmpeg -qsv_device /dev/dri/renderD128 -i /photoprism/originals/2022/02/27/IMG_8370.MOV -c:a aac -vf format=rgb32 -c:v h264_qsv -vsync vfr -r 30 -b:v 25M -maxrate 25M -f mp4 -y /photoprism/storage/sidecar/2022/02/27/IMG_8370.MOV.avc"
[SNIP]
Failed to create a VAAPI device
If the file permissions for /dev/dri/renderD128 inside the container is set to 'u=rw,g=rw,o=rw', PhotoPrism's invocation of ffmpeg with h264_qsv succeeds.
This is a common issue for docker containers using hardware transcoding and it seems the common pattern it to iterate across the dev/dri/render devices, ensuring groups have rw rights and adding whatever group the docker's user belongs to as group owners.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status