frigate: [HW Accel Support]: unable to use HW accell with intel N5100

Describe the problem you are having

Hi,

i’m using frigate addon within my HA setup (a vm running in proxmox on Asus PN41 running with an Intel N5100 CPU).

I tried differente configuration (also based on this discussion https://github.com/blakeblackshear/frigate/pull/6413/files/8c14cf7dcd09567103749b72e2b126f2979a9ce4#diff-f9cd271f7a12dbc553bb789cc9e91b10bdcf82ec76a6ab731dbc20305e404539) to enable HW accell without success.

This is the output of ls /dev/dri:

by-path card0

This are the tentative I made: v1)

ffmpeg: hwaccel_args: preset-vaapi

v2) ffmpeg: hwaccel_args: preset-vaapi environment_vars: LIBVA_DRIVER_NAME: i965

Any hint?

Version

0.12.1-367d724

Frigate config file

mqtt:
  enabled: True
  host: 192.168.2.101
  port: 1883
  topic_prefix: frigate
  client_id: frigate
  user: xxxxxxxxxxx
  password: xxxxxxxxxxx
  stats_interval: 60

detectors:
  coral:
    type: edgetpu
    device: usb
logger:
  default: error

# ffmpeg:
#   hwaccel_args: preset-vaapi
# environment_vars:
#   LIBVA_DRIVER_NAME: i965
# ffmpeg:
#   hwaccel_args: preset-intel-qsv-h264

birdseye:
  enabled: False

cameras:
  soggiorno:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/soggiorno # <----- The stream you want to use for detection
          input_args: preset-rtsp-restream          
          roles:
            - detect
            - record
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 1280 # <---- update for your camera's resolution
      height: 720 # <---- update for your camera's resolution
    record:
      enabled: True
      retain:
        days: 1
        mode: motion
      events:
        retain:
          default: 1
          mode: active_objects
    snapshots: # <----- Enable snapshots
      enabled: True
  cameretta:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/cameretta # <--- the name here must match the name of the camera in restream
          # input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/cameretta_sub # <--- the name here must match the name of the camera_sub in restream
          # input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
    record:
      enabled: True
      retain:
        days: 1
        mode: motion
      events:
        retain:
          default: 1
          mode: active_objects
    snapshots: # <----- Enable snapshots
      enabled: True
  veranda:
    enabled: True
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/veranda # <--- the name here must match the name of the camera in restream
          # input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/veranda_sub # <--- the name here must match the name of the camera_sub in restream
          # input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
    record:
      enabled: True
      retain:
        days: 1
        mode: motion
      events:
        retain:
          default: 1
          mode: active_objects
    snapshots: # <----- Enable snapshots
      enabled: True 
    motion:
      mask: 
        - 21,164,0,89,0,0,72,0,187,0,513,0,441,153,41,242  
  balcone:
    enabled: true
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/balcone # <--- the name here must match the name of the camera in restream
          # input_args: preset-rtsp-restream
          roles:
            - record
        - path: rtsp://127.0.0.1:8554/balcone_sub # <--- the name here must match the name of the camera_sub in restream
          # input_args: preset-rtsp-restream
          roles:
            - detect
    detect:
      enabled: True # <---- disable detection until you have a working camera feed
      width: 640 # <---- update for your camera's resolution
      height: 360 # <---- update for your camera's resolution
    record:
      enabled: True
      retain:
        days: 1
        mode: motion
      events:
        retain:
          default: 1
          mode: active_objects
    snapshots: # <----- Enable snapshots
      enabled: True 
    motion:
      mask:    
        - 248,2,242,53,241,87,238,110,314,207,450,360,638,359,639,0
go2rtc:
  streams:
    soggiorno:
      - rtsp://192.168.2.115:8554/unicast # <- stream which supports video & aac audio
  #    - "ffmpeg:rtsp_cam#audio=opus" # <- copy of the stream which transcodes audio to the missing codec (usually will be opus)      
    cameretta: 
      - rtsp://xxxxx:xxxxx@192.168.2.114:88/videoMain # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
    cameretta_sub:
      - rtsp://xxxxx:xxxxx@192.168.2.114:88/videoSub # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
    veranda: 
      - rtsp://xxxx:xxxxx@192.168.2.121:554/cam/realmonitor?channel=1&subtype=0 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
    veranda_sub:
      - rtsp://xxxxx:xxxxx@192.168.2.121:554/cam/realmonitor?channel=1&subtype=1 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
    balcone: 
      - rtsp://192.168.2.118/ch0_0.h264 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg
    balcone_sub:
      - rtsp://192.168.2.118/ch0_1.h264 # <- stream which supports video & aac audio. This is only supported for rtsp streams, http must use ffmpeg

docker-compose file or Docker CLI command

I run the addon

Relevant log output

2024-01-14 16:01:41.954303516  [2024-01-14 17:01:41] frigate.video                  ERROR   : veranda: Unable to read frames from ffmpeg process.
2024-01-14 16:01:41.955373138  [2024-01-14 17:01:41] frigate.video                  ERROR   : veranda: ffmpeg process is not running. exiting capture thread...
2024-01-14 16:01:42.621310784  [2024-01-14 17:01:42] frigate.video                  ERROR   : soggiorno: Unable to read frames from ffmpeg process.
2024-01-14 16:01:42.621315925  [2024-01-14 17:01:42] frigate.video                  ERROR   : soggiorno: ffmpeg process is not running. exiting capture thread...
2024-01-14 16:01:43.532263347  [2024-01-14 17:01:43] frigate.video                  ERROR   : cameretta: Unable to read frames from ffmpeg process.
2024-01-14 16:01:43.532268499  [2024-01-14 17:01:43] frigate.video                  ERROR   : cameretta: ffmpeg process is not running. exiting capture thread...
2024-01-14 16:01:44.825772201  [2024-01-14 17:01:44] frigate.util                   ERROR   : Unable to poll intel GPU stats: No device filter specified and no discrete/integrated i915 devices found
2024-01-14 16:01:44.825776249  
2024-01-14 16:01:45.037888143  [2024-01-14 17:01:45] frigate.video                  ERROR   : balcone: Unable to read frames from ffmpeg process.
2024-01-14 16:01:45.038364063  [2024-01-14 17:01:45] frigate.video                  ERROR   : balcone: ffmpeg process is not running. exiting capture thread..

and also

2024-01-14 16:02:00.518774553  [2024-01-14 17:02:00] ffmpeg.cameretta.detect        ERROR   : [AVHWDeviceContext @ 0x55d7916c7300] No VA display found for device /dev/dri/renderD128.
2024-01-14 16:02:00.518775815  [2024-01-14 17:02:00] ffmpeg.cameretta.detect        ERROR   : Device creation failed: -22.
2024-01-14 16:02:00.518777433  [2024-01-14 17:02:00] ffmpeg.cameretta.detect        ERROR   : [h264 @ 0x55d7916c7d80] No device available for decoder: device type vaapi needed for codec h264.

FFprobe output from your camera

I share vainfo instead:

{"return_code":3,"stderr":"error:XDG_RUNTIME_DIRisinvalidornotsetintheenvironment.nerror:can'tconnecttoXserver!nlibvainfo:VA-APIversion1.17.0nlibvainfo:Tryingtoopen/usr/lib/x86_64-linux-gnu/dri/simpledrm_drv_video.sonlibvainfo:va_openDriver()returns-1nvaInitializefailedwitherrorcode-1(unknownlibvaerror),exit","stdout":""}

Operating system

HassOS

Install method

HassOS Addon

Network connection

Mixed

Camera make and model

DAFANG, IMOU, FOSCAM

Any other information that may be helpful

No response

About this issue

  • Original URL
  • State: closed
  • Created 6 months ago
  • Comments: 17

Most upvoted comments

okay, then the GPU is not visible inside the frigate container. I don’t use proxmox so I can’t help you