blakeblackshear / frigate

NVR with realtime local object detection for IP cameras
https://frigate.video
MIT License
19.52k stars 1.8k forks source link

[HW Accel Support]: RKMPP AARCH64 #6914

Closed a2nt closed 1 year ago

a2nt commented 1 year ago

Describe the problem you are having

Is it possible to use custom build of ffmpeg? I need rkmp codecs for Orange Pi 5 board

I have compiled ffmpeg for my architecture:

ffmpeg -decoders | grep rkmpp
ffmpeg version N-111280-gd51b0580e4 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 12 (Ubuntu 12.2.0-17ubuntu1)
  configuration: --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree --enable-hardcoded-tables --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp
  libavutil      58. 13.101 / 58. 13.101
  libavcodec     60. 21.100 / 60. 21.100
  libavformat    60.  9.100 / 60.  9.100
  libavdevice    60.  2.100 / 60.  2.100
  libavfilter     9.  8.102 /  9.  8.102
  libswscale      7.  3.100 /  7.  3.100
  libswresample   4. 11.100 /  4. 11.100
  libpostproc    57.  2.100 / 57.  2.100
 V..... h264_rkmpp           h264 (rkmpp) (codec h264)
 V..... hevc_rkmpp           hevc (rkmpp) (codec hevc)
 V..... vp8_rkmpp            vp8 (rkmpp) (codec vp8)
 V..... vp9_rkmpp            vp9 (rkmpp) (codec vp9)

But frigate docker image ffmpeg doesn't support rkmpp

docker exec -it frigate /bin/sh
ffmpeg -decoders | grep rkmpp
ffmpeg version 4.3.5-0+deb11u1+rpt3 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1+rpt3 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

Version

0.12.0-DA3E197

Frigate config file

ffmpeg:
   output_args:
     record: preset-record-generic-audio-aac
     detect: -f rawvideo -pix_fmt yuv420p -c:a aac
     rtmp: -c copy -f flv -c:v copy -c:a aac

docker-compose file or Docker CLI command

version: "3.9"
services:
  frigate:
    container_name: frigate
    hostname: 127.0.0.1
    privileged: true
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:stable

Relevant log output

docker exec -it frigate /bin/sh
ffmpeg -decoders | grep rkmpp
ffmpeg version 4.3.5-0+deb11u1+rpt3 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1+rpt3 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100

FFprobe output from your camera

ffprobe version 4.3.5-0+deb11u1+rpt3 Copyright (c) 2007-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --prefix=/usr --extra-version=0+deb11u1+rpt3 --toolchain=hardened --incdir=/usr/include/aarch64-linux-gnu --enable-gpl --disable-stripping --enable-avresample --disable-filter=resample --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librsvg --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --disable-mmal --enable-neon --enable-v4l2-request --enable-libudev --enable-epoxy --enable-sand --libdir=/usr/lib/aarch64-linux-gnu --arch=arm64 --enable-pocketsphinx --enable-libdc1394 --enable-libdrm --enable-vout-drm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
  libavutil      56. 51.100 / 56. 51.100
  libavcodec     58. 91.100 / 58. 91.100
  libavformat    58. 45.100 / 58. 45.100
  libavdevice    58. 10.100 / 58. 10.100
  libavfilter     7. 85.100 /  7. 85.100
  libavresample   4.  0.  0 /  4.  0.  0
  libswscale      5.  7.100 /  5.  7.100
  libswresample   3.  7.100 /  3.  7.100
  libpostproc    55.  7.100 / 55.  7.100
Input #0, rtsp, from 'rtsp://admin:xdc534xdc534@192.168.88.10:554':
  Metadata:
    title           : RTSP Session
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: h264 (Baseline), yuvj420p(pc, progressive), 2880x1616, 10 fps, 10 tbr, 90k tbn, 20 tbc
    Stream #0:1: Audio: pcm_alaw, 8000 Hz, 1 channels, s16, 64 kb/s

Operating system

Other Linux

Install method

Docker Compose

Network connection

Wired

Camera make and model

Misecu

Any other information that may be helpful

host: Linux Armbian

NickM-27 commented 1 year ago

https://docs.frigate.video/configuration/advanced#custom-ffmpeg-build

a2nt commented 1 year ago

@NickM-27

https://docs.frigate.video/configuration/advanced#custom-ffmpeg-build

Looks like it doesn't work cuz libraries are missing: /usr/lib/btbn-ffmpeg/bin/ffmpeg: error while loading shared libraries: libvpx.so.7: cannot open shared object file: No such file or directory

It requires:

/usr/lib/aarch64-linux-gnu
/lib/aarch64-linux-gnu
NickM-27 commented 1 year ago

You have to use a statically built binary

NateMeyer commented 1 year ago

@a2nt If you figure out building a static ffmpeg with rkmpp please share! I've had that on my todo list for a while now and I think it will be helpful for the efforts getting the RK3588 boards working.

a2nt commented 1 year ago

UPD: Built by docker image, runs ok with RKMPP codecs support, ffmpeg version 4.4 (should be less than 5)

@NateMeyer so I wasn't able to build ffmpeg using host machine. It works at armbian, but the resulting binary had missing libs at docker.

I was able to build it using frigate docker image.

git clone https://github.com/FFmpeg/FFmpeg

UPD: since frigate does not support the latest ffmpeg run this, see below why git checkout release/4.4 and continue

Add to volumes section at docker-compose.yml:

Get into docker image shell: docker exec -it frigate /bin/bash

Install dev libs at the docker image shell:

apt-get update -qq && apt-get -y install autoconf automake build-essential cmake git-core libass-dev libfreetype6-dev libgnutls28-dev libmp3lame-dev libsdl2-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev meson ninja-build pkg-config texinfo wget yasm zlib1g-dev

Install some extra libs: apt install libvorbis-dev libvpx-dev libx264-dev libaom-dev libdrm-dev libfdk-aac-dev libx265-dev libopus-dev

Install rkmpp libs (binary and dev) from https://repo.rock-chips.com/debian/pool/main/r/rockchip-mpp/

Run configure at /ffmpeg_build inside docker image:

cd /ffmpeg-build/
./configure --enable-static --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree --enable-hardcoded-tables --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --disable-shared
make
make install

Currently my make is still processing, will send u an update latter.

UPD: build is succesful But to get new ffmpeg running you need to install some libs each time you run docker image. (Solved)

A little hacky way:

dpkg -i /ffmpeg-build/rockchip-mpp_1.4.0-5_arm64.deb
apt update && apt install libfdk-aac2

Save installed libs to host from docker image shell:

cp /usr/lib/aarch64-linux-gnu/librockchip_mpp.so.* /ffmpeg-build
cp /usr/lib/aarch64-linux-gnu/libfdk-aac.so.* /ffmpeg-build

Stop docker container Setup docker-compose.yml volumes:

      - /root/FFmpeg/ffmpeg:/usr/bin/ffmpeg
      - /root/FFmpeg/ffprobe:/usr/bin/ffprobe
      - /root/FFmpeg:/ffmpeg-build
      - /root/FFmpeg/librockchip_mpp.so.0:/usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0
      - /root/FFmpeg/librockchip_mpp.so.1:/usr/lib/aarch64-linux-gnu/librockchip_mpp.so.1
      - /root/FFmpeg/libfdk-aac.so.2:/usr/lib/aarch64-linux-gnu/libfdk-aac.so.2
      - /root/FFmpeg/libfdk-aac.so.2.0.2:/usr/lib/aarch64-linux-gnu/libfdk-aac.so.2.0.2

UPD2: the latest ffmpeg is running and RKMPP codecs supported, but looks like frigate doesn't works with the latest ffmpeg Unrecognized option 'stimeout'.

The -stimeout option for rtsp has been renamed to -timeout in ffmpeg 5.0. This can be verified by comparing the rtsp section of the documentation to an older version. That's why I have switched to ffmpeg v4.4 above.

Check ffmpeg RKMPP support by running

docker exec -it frigate /bin/bash
ffmpeg -decoders | grep rkmpp

The result should look like:

ffmpeg version n4.4.4-6-gd5fa6e3a91 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --enable-static --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree --enable-hardcoded-tables --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --disable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
 V..... h264_rkmpp           h264 (rkmpp) (codec h264)
 V..... hevc_rkmpp           hevc (rkmpp) (codec hevc)
 V..... vp8_rkmpp            vp8 (rkmpp) (codec vp8)
 V..... vp9_rkmpp            vp9 (rkmpp) (codec vp9)
a2nt commented 1 year ago

https://github.com/jjm2473/ffmpeg-rk has more supported codecs But requires librga from https://repo.rock-chips.com/debian/pool/main/libr/librga/

Same installation method as above + extra lib

root@127:/ffmpeg-build# ./ffmpeg -decoders | grep rkmpp
ffmpeg version n4.3-dev-7616-gd306ef36a2 Copyright (c) 2000-2021 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --enable-static --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree --enable-hardcoded-tables --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --disable-shared
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
 V..... h263_rkmpp           h263 (rkmpp) (codec h263)
 V..... h264_rkmpp           h264 (rkmpp) (codec h264)
 V..... hevc_rkmpp           hevc (rkmpp) (codec hevc)
 V..... mpeg1_rkmpp          mpeg1 (rkmpp) (codec mpeg1video)
 V..... mpeg2_rkmpp          mpeg2 (rkmpp) (codec mpeg2video)
 V..... mpeg4_rkmpp          mpeg4 (rkmpp) (codec mpeg4)
 V..... vp8_rkmpp            vp8 (rkmpp) (codec vp8)
 V..... vp9_rkmpp            vp9 (rkmpp) (codec vp9)
a2nt commented 1 year ago

Getting following error logs, can you help?

2023-06-26 13:31:16.813376366  [2023-06-26 13:31:16] frigate.record                 ERROR   : Error occurred when attempting to maintain recording cache
2023-06-26 13:31:16.813773902  [2023-06-26 13:31:16] frigate.record                 ERROR   : could not convert string to float: 'Rga built version:1.04 10bbe03+2021-01-20 00:44:50\n10.244000'
a2nt commented 1 year ago

So I have found the best fork of ffmpeg for RKMPP https://github.com/hbiyik/FFmpeg

There's 4. branch and 5. branch, I have used 4.* for docker

It doesn't use librga, but libyuv is required. Also I had to compile mpp https://github.com/rockchip-linux/mpp cuz 1.4.* versions of mpp libs doesn't support this fork

root@127:/opt/frigate# ffmpeg -decoders | grep rkmpp
ffmpeg version 6b47e74766 Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 10 (Debian 10.2.1-6)
  configuration: --enable-static --enable-version3 --enable-libdrm --enable-libx265 --enable-nonfree --enable-gpl --enable-libaom --enable-libass --enable-libfdk-aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-rkmpp --enable-libwebp --disable-shared --enable-libaom
  libavutil      56. 70.100 / 56. 70.100
  libavcodec     58.134.100 / 58.134.100
  libavformat    58. 76.100 / 58. 76.100
  libavdevice    58. 13.100 / 58. 13.100
  libavfilter     7.110.100 /  7.110.100
  libswscale      5.  9.100 /  5.  9.100
  libswresample   3.  9.100 /  3.  9.100
  libpostproc    55.  9.100 / 55.  9.100
 V..... av1_rkmpp            av1 (rkmpp) (codec av1)
 V..... h263_rkmpp           h263 (rkmpp) (codec h263)
 V..... h264_rkmpp           h264 (rkmpp) (codec h264)
 V..... hevc_rkmpp           hevc (rkmpp) (codec hevc)
 V..... mpeg1_rkmpp          mpeg1 (rkmpp) (codec mpeg1video)
 V..... mpeg2_rkmpp          mpeg2 (rkmpp) (codec mpeg2video)
 V..... mpeg4_rkmpp          mpeg4 (rkmpp) (codec mpeg4)
 V..... vp8_rkmpp            vp8 (rkmpp) (codec vp8)
 V..... vp9_rkmpp            vp9 (rkmpp) (codec vp9)

Works perfect with, no errors at logs:

# Optional: ffmpeg configuration
ffmpeg:
   hwaccel_args: -hwaccel drm -hwaccel_device /dev/dri/renderD128 -c:v h264_rkmpp -vcodec h264_rkmpp
   output_args:
     detect: -f rawvideo
     record: -c:a aac -c:v copy -map 0 -f segment -strftime 1 -segment_time 60 -segment_format mp4 -reset_timestamps 1
     rtmp: -c copy -f flv -flvflags no_duration_filesize
zjd1988 commented 1 year ago

@a2nt nice work, can you share you docker image or Dockerfile?

a2nt commented 1 year ago

@a2nt nice work, can you share you docker image or Dockerfile?

nope, but if u will tell me how to do it I will. I have docker-compose with a lot of linked files:

version: "3.9"
services:
  frigate:
    container_name: frigate
    hostname: 127.0.0.1
    #network_mode: host
    privileged: true
    restart: unless-stopped
    image: ghcr.io/blakeblackshear/frigate:dev-ef14a43 #stable
    group_add:
      - "106" # render
      - "44"  # video
      - "46"  # plugdev
    shm_size: "300mb" # update for your cameras based on calculation above
    devices:
      #- /dev/bus/usb:/dev/bus/usb # passes the USB Coral, needs to be modified for other versions
      #- /dev/apex_0:/dev/apex_0 # passes a PCIe Coral, follow driver instructions here https://coral.ai/docs/m2/get-started/#2a-on-linux
      - /dev/dri/renderD128:/dev/dri/renderD128 # for intel hwaccel, needs to be updated for your hardware
      - /dev/dri/card0:/dev/dri/card0
      - /dev/rga
      - /dev/video-dec0:/dev/video-dec0
      - /dev/video-enc0:/dev/video-enc0
    volumes:
      - /etc/localtime:/etc/localtime:ro
      - /srv/docker/frigate/config.yml:/config/config.yml
      - /mnt/storage/frigate:/media/frigate
      - /root/host/FFmpeg:/ffmpeg-build
      - /root/ffmpeg-rk/libfdk-aac.so.2:/usr/lib/aarch64-linux-gnu/libfdk-aac.so.2
      - /root/ffmpeg-rk/libfdk-aac.so.2.0.2:/usr/lib/aarch64-linux-gnu/libfdk-aac.so.2.0.2
      - /root/ffmpeg-rk/librga.so:/usr/lib/aarch64-linux-gnu/librga.so
      - /root/ffmpeg-rk/librga.so.2:/usr/lib/aarch64-linux-gnu/librga.so.2
      - /root/ffmpeg-rk/librga.so.2.0.0:/usr/lib/aarch64-linux-gnu/librga.so.2.0.0
      - /root/host/FFmpeg/ffmpeg:/usr/bin/ffmpeg
      - /root/host/FFmpeg/ffprobe:/usr/bin/ffprobe
      - /root/host/FFmpeg/ffplay:/usr/bin/ffplay
      - /root/host/FFmpeg:/usr/lib/btbn-ffmpeg
      - /root/host/FFmpeg/librockchip_mpp.so:/usr/lib/aarch64-linux-gnu/librockchip_mpp.so
      - /root/host/FFmpeg/librockchip_mpp.so.0:/usr/lib/aarch64-linux-gnu/librockchip_mpp.so.0
      - /root/host/FFmpeg/librockchip_mpp.so.1:/usr/lib/aarch64-linux-gnu/librockchip_mpp.so.1
      - /root/host/FFmpeg/librockchip_vpu.so:/usr/lib/aarch64-linux-gnu/librockchip_vpu.so
      - /root/host/FFmpeg/librockchip_vpu.so.0:/usr/lib/aarch64-linux-gnu/librockchip_vpu.so.0
      - /root/host/FFmpeg/librockchip_vpu.so.1:/usr/lib/aarch64-linux-gnu/librockchip_vpu.so.1
      - /root/host/FFmpeg/libyuv.so:/usr/lib/aarch64-linux-gnu/libyuv.so
      - /root/host/FFmpeg/libyuv.so.0:/usr/lib/aarch64-linux-gnu/libyuv.so.0
      - /root/host/FFmpeg/libyuv.so.0.0.1873:/usr/lib/aarch64-linux-gnu/libyuv.so.0.0.1873
      - /root/host/FFmpeg/rockchip_vpu.pc:/usr/lib/aarch64-linux-gnu/pkgconfig/rockchip_vpu.pc
      - /root/host/FFmpeg/rockchip_mpp.pc:/usr/local/lib/aarch64-linux-gnu/pkgconfig/rockchip_mpp.pc
      - /root/host/FFmpeg/rockchip:/usr/local/include/rockchip
      - /root/frigate/frigate/detectors/plugins/armnn_tfl.py:/opt/frigate/frigate/detectors/plugins/armnn_tfl.py
      - /usr/lib/aarch64-linux-gnu/libarmnn.so.32:/usr/lib/aarch64-linux-gnu/libarmnn.so.32
      - /usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so:/usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so
      - /usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.24.6:/usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.24.6
      - /usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.24:/usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.24
      - /usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.22:/usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.22
      - /usr/lib/aarch64-linux-gnu/include/armnnTfLiteParser:/usr/lib/aarch64-linux-gnu/include/armnnTfLiteParser
      - /usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.22.0:/usr/lib/aarch64-linux-gnu/libarmnnTfLiteParser.so.22.0
      - /usr/lib/aarch64-linux-gnu/libOpenCL.so:/usr/lib/aarch64-linux-gnu/libOpenCL.so
      - /usr/lib/aarch64-linux-gnu/libmali-x11:/usr/lib/aarch64-linux-gnu/libmali-x11
      - /usr/lib/aarch64-linux-gnu/pkgconfig/OpenCL.pc:/usr/lib/aarch64-linux-gnu/pkgconfig/OpenCL.pc
      - /etc/OpenCL/vendors/mali-arm64.icd:/etc/OpenCL/vendors/mali-arm64.icd
      - /usr/lib/aarch64-linux-gnu/armnn22:/usr/lib/aarch64-linux-gnu/armnn22
      - /usr/lib/aarch64-linux-gnu/armnn32:/usr/lib/aarch64-linux-gnu/armnn32
      - /usr/lib/python3/dist-packages/pyarmnn:/usr/lib/python3/dist-packages/pyarmnn
      - /usr/lib/ArmNN-linux-aarch64:/usr/lib/ArmNN-linux-aarch64
      - /usr/lib/aarch64-linux-gnu/libarm_compute.so.31:/usr/lib/aarch64-linux-gnu/libarm_compute.so.31
      - /usr/lib/aarch64-linux-gnu/libarm_compute_core.so.31:/usr/lib/aarch64-linux-gnu/libarm_compute_core.so.31
      - /usr/lib/aarch64-linux-gnu/libarm_compute_graph.so.31:/usr/lib/aarch64-linux-gnu/libarm_compute_graph.so.31 
      - /usr/lib/aarch64-linux-gnu/libarmnnAclCommon.so.32:/usr/lib/aarch64-linux-gnu/libarmnnAclCommon.so.32
      - /usr/lib/aarch64-linux-gnu/libarmnnDeserializer.so.32:/usr/lib/aarch64-linux-gnu/libarmnnDeserializer.so.32
      - /usr/lib/aarch64-linux-gnu/libarmnnSerializer.so.32:/usr/lib/aarch64-linux-gnu/libarmnnSerializer.so.32
      - /srv/docker/frigate/armnn-23.05:/build/armnn-ZUc8OU/armnn-23.05
      - /usr/lib/aarch64-linux-gnu/libmali-x11/libmali-valhall-g610-g13p0-x11-wayland-gbm.so:/usr/lib/aarch64-linux-gnu/libmali.so
      - type: tmpfs # Optional: 1GB of memory, reduces SSD/SD Card wear
        target: /tmp/cache
        tmpfs:
          size: 1000000000
    ports:
      - "5000:5000" # HTTP
    environment:
      FFMPEG_RKMPP_PIXFMT: "YUV420P"
    extra_hosts:
      - "192.168.88.2:192.168.88.2"