frigate/docs/docs/configuration/hardware_acceleration.md
Flaxee 25c4c7207b
Update hardware_acceleration.md
I had to set the environment variable "LIBVA_DRIVER_NAME: iHD" in my docker-compose.yml for hwaccel to work.
Perhaps this depends on host configuration/drivers, if it'll use i965 (default) or iHD?
My CPU is Intel i3-10320.
2022-05-20 20:56:53 +02:00

1.9 KiB

id title
hardware_acceleration Hardware Acceleration

It is recommended to update your configuration to enable hardware accelerated decoding in ffmpeg. Depending on your system, these parameters may not be compatible. More information on hardware accelerated decoding for ffmpeg can be found here: https://trac.ffmpeg.org/wiki/HWAccelIntro

Raspberry Pi 3/4 (32-bit OS)

Ensure you increase the allocated RAM for your GPU to at least 128 (raspi-config > Performance Options > GPU Memory). NOTICE: If you are using the addon, you may need to turn off Protection mode for hardware acceleration.

ffmpeg:
  hwaccel_args:
    - -c:v
    - h264_mmal

Raspberry Pi 3/4 (64-bit OS)

NOTICE: If you are using the addon, you may need to turn off Protection mode for hardware acceleration.

ffmpeg:
  hwaccel_args:
    - -c:v
    - h264_v4l2m2m

Intel-based CPUs (<10th Generation) via Quicksync

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128
    - -hwaccel_output_format
    - yuv420p

Intel-based CPUs (>=10th Generation) via Quicksync

Note: You might also need to set LIBVA_DRIVER_NAME=iHD as an environment variable on the container. Check with vainfo inside the container to see if it works.

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - qsv
    - -qsv_device
    - /dev/dri/renderD128

AMD/ATI GPUs (Radeon HD 2000 and newer GPUs) via libva-mesa-driver

Note: You also need to set LIBVA_DRIVER_NAME=radeonsi as an environment variable on the container.

ffmpeg:
  hwaccel_args:
    - -hwaccel
    - vaapi
    - -hwaccel_device
    - /dev/dri/renderD128

NVIDIA GPU

NVIDIA GPU based decoding via NVDEC is supported, but requires special configuration. See the NVIDIA NVDEC documentation for more details.