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
There is currently a bug in ffmpeg that causes hwaccel to not work for the RPi kernel 5.15.61 and above. For more information see https://github.com/blakeblackshear/frigate/issues/3780
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.
#Intel-based CPUs (<10th Generation) via Quicksync
NOTICE: With some of the processors, like the J4125, the default driver
iHD doesn't seem to work correctly for hardware acceleration. You may need to change the driver to
i965 by adding the following environment variable
LIBVA_DRIVER_NAME=i965 to your docker-compose file or in the frigate.yml for HA OS users.
#Intel-based CPUs (>=10th Generation) via Quicksync
#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.
Supported Nvidia GPUs for Decoding
These instructions are based on the jellyfin documentation
--gpus all to your docker run command or update your compose file.
If you have multiple Nvidia graphic card, you can add them with their ids obtained via
The decoder you need to pass in the
hwaccel_args will depend on the input video.
A list of supported codecs (you can use
ffmpeg -decoders | grep cuvid in the container to get a list)
For example, for H264 video, you'll select
If everything is working correctly, you should see a significant improvement in performance.
Verify that hardware decoding is working by running
docker exec -it frigate nvidia-smi, which should show the ffmpeg