HW acceleration via docker on intel

Forum for questions and support relating to the 1.34.x releases only.
Post Reply
klop2031
Posts: 6
Joined: Thu Nov 05, 2020 1:01 am

HW acceleration via docker on intel

Post by klop2031 »

Hi I am trying to use HW acceleration for my cameras. I have an intel processor that has quicksync, I am trying to use this docker imagehttps://github.com/dlandon/zoneminder but it seems that I can't get zoneminder to use hardware acceleration.

When looking at the logs I get an error:
2020-12-12 19:55:22.625064 zmc_m2[16229].ERR-zm_ffmpeg_camera.cpp/539 [Failed to create hwaccel device. Invalid argument]
2020-12-12 19:55:22.622086 zmc_m2[16229].WAR-zm_ffmpeg.cpp/70 [No VA display found for device: /dev/dri/renderD128.]
In my configuration of the camera I have:
DecoderHWAccelName: vaapi
DecoderHWAccelDevice : /dev/dri/renderD128

Here is my docker-compose.yml

Code: Select all

version: '3.1'
services:
    zoneminder:
        container_name: zoneminder
        image: dlandon/zoneminder:latest
        restart: unless-stopped
        ports:
            - 8080:80/tcp
            - 8443:443/tcp
            - 9000:9000/tcp
        network_mode: "bridge"
        privileged: true
        environment:
            - TZ=Europe/Stockholm
            - SHMEM=50%
            - PUID=1000
            - PGID=1000
            - INSTALL_HOOK=0
            - INSTALL_FACE=0
            - INSTALL_TINY_YOLO=0
            - INSTALL_YOLO=0
            - MULTI_PORT_START=0
            - MULTI_PORT_END=0
            - ADVANCED_SCRIPT=1
        devices:
            - /dev/dri:/dev/dri
            - /dev/dri/renderD128:/dev/dri/renderD128
            #- /dev/dri/card0:/dev/dri/card0
            #- /dev/dri:/dev/dri #optional
            #- /dev/vcsm:/dev/vcsm #optional
            #- /dev/vchiq:/dev/vchiq #optional
            #- /dev/video10:/dev/video10 #optional
            #- /dev/video11:/dev/video11 #optional
            #- /dev/video12:/dev/video12 #optional
        volumes:
            - /media/Disk3/zoneminder/config:/config:rw
            - /media/Disk3/zoneminder/data:/var/cache/zoneminder:rw
        group_add:
            - 109
I have added this to my userscript.sh:

Code: Select all

echo "Creating render group"
groupadd -g 109 render
echo "Adding www-data to render group"
usermod -a -G render www-data
Any advice on how to get this to work with HW acceleration? Or atleast can anyone help me view what the invalid argument was?
Post Reply