Versioner sammenlignet

Nøgle

  • Linjen blev tilføjet.
  • Denne linje blev fjernet.
  • Formatering blev ændret.

...

This gave me ALL sort of trouble, and the cameras camera streams stalled within seconds; i tried all sort of streams, https, rstp, rmtp etc etc.

...

I tried all the (bad) advices from a lot of videos, and a lot or article pointing out the problem was the cams.


Then I came across this Youtube video, and found that a simple standard RTSP are working just fine (must be enabled on the Camera) - WITH more memory for 4 cams / 8 streams (--shm-size=256m).

My first working config: config.yml.std

Works fine and the camera streams does not stall


Also the setup of the docker container may require som tweaking, I You have (or not have) the Google Coral.

...

Kodeblok
docker run -d \  
  --name frigate \
  --restart=unless-stopped \
  --mount type=tmpfs,target=/tmp/cache,tmpfs-size=1000000000 \
  --device /dev/bus/usb:/dev/bus/usb \
  --shm-size=256m \
  -v /mnt/LaCie/nas/frigate:/media/frigate \
  -v /opt/frigate/config.yml:/config/config.yml:ro \
  -v /etc/localtime:/etc/localtime:ro \
  -e FRIGATE_RTSP_PASSWORD='***********' \
  -p 5000:5000 \
  -p 1935:1935 \
  ghcr.io/blakeblackshear/frigate:master-433bf69-tensorrt

A working/simple config

Tip

Previously, I did not use the go2rtc - and the playback of event clips was extreme chonky and studdering. After setting up go2rtc as proxy (see the code) the event clips are way better.

Great that it is embedded with Frigate.


Kodeblok
mqtt:
  host: 10.0.0.183
go2rtc:
  streams:
    frigate_front_door_cam_main: 
      - "ffmpeg:http://10.0.0.151/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
    frigate_front_door_cam_sub: 
      - "ffmpeg:http://10.0.0.151/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
    frigate_behind_house_cam_main:
      - "ffmpeg:http://10.0.0.176/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
    frigate_behind_house_cam_sub:
      - "ffmpeg:http://10.0.0.176/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
    frigate_carport_cam_main:
      - "ffmpeg:http://10.0.0.191/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
    frigate_carport_cam_sub:
      - "ffmpeg:http://10.0.0.191/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"
    frigate_big_shed_cam_main:
      - "ffmpeg:http://10.0.0.108/flv?port=1935&app=bcs&stream=channel0_main.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}#video=copy#audio=copy#audio=opus"
    frigate_big_shed_cam_sub:
      - "ffmpeg:http://10.0.0.108/flv?port=1935&app=bcs&stream=channel0_ext.bcs&user=readonly&password={FRIGATE_RTSP_PASSWORD}"

cameras:
  frigate_front_door_cam:
    ffmpeg:
      inputs:
        - path: rtsp://127.0.0.1:8554/frigate_front_door_cam_sub?video=copy
          input_args: preset-rtsp-restream
          roles:
            - detect
        - path: rtsp://127.0.0.1:8554/frigate_front_door_cam_main?video=copy&audio=aac
          input_args: preset-rtsp-restream
          roles:
            - record
    rtmp:
      enabled: False
    detect:
      width: 640
      height: 480
      fps: 5
    objects:
      track:
        - person
    snapshots:
      enabled: True
      timestamp: false
      bounding_box: True
      retain:
        default: 2
    record
Kodeblok
mqtt:
  host: 10.0.0.183
cameras:
  frigate_front_door_cam:
    ffmpeg:
      inputsenabled: True
      events:
      - path: rtsp://user:password@10.0.0.151:554//h264Preview_01_main retain:
          rolesdefault: 10
  frigate_behind_house_cam:
    ffmpeg:
      - detectinputs:
        - path: rtsp://user:password@10127.0.0.1511:554//h264Preview_01_sub8554/frigate_behind_house_cam_sub?video=copy
          input_args: preset-rtsp-restream
          roles:
            - record
detect
        -  rtmp:
path: rtsp://127.0.0.1:8554/frigate_behind_house_cam_main?video=copy&audio=aac
        enabled  input_args: Falsepreset-rtsp-restream
    detect:
      widthroles: 640
      height: 480
     - fps: 10record
    objectsrtmp:
      trackenabled: False
    detect:
    - person
    snapshots:width: 640
      enabledheight: True480
      timestampfps: false5
      bounding_box: Trueobjects:
      retaintrack:
        default:- 2person
  frigate_garden_cam  snapshots:
      ffmpegenabled: True
      inputstimestamp: false
      bounding_box: True
    - path: rtsp://user:password@10.0.0.108:554//h264Preview_01_main
retain:
        default: 2
    rolesrecord:
      enabled: True
     - detectevents:
        - path: rtsp://user:password@10.0.0.108:554//h264Preview_01_subretain:
          rolesdefault: 10
      frigate_carport_cam:
    ffmpeg:
  - record
    rtmpinputs:
      enabled: False
 -   detect:path: rtsp://127.0.0.1:8554/frigate_carport_cam_sub?video=copy
      width: 2560
      height: 1920input_args: preset-rtsp-restream
      fps: 10
    objectsroles:
      track:
        - persondetect
    snapshots:
    -  enabled: True
      timestamp: false
path: rtsp://127.0.0.1:8554/frigate_carport_cam_main?video=copy&audio=aac
          boundinginput_boxargs: True
preset-rtsp-restream
          retainroles:
          default: 2
  frigate_behind_house_cam:- record
    ffmpegrtmp:
      inputsenabled: False
    detect:
    -  path: rtsp://user:password@10.0.0.176:554//h264Preview_01_mainwidth: 640
      height: 480
      fps: 5
    rolesobjects:
      track:
        - detectperson
    snapshots:
    - path: rtsp://user:password@10.0.0.176:554//h264Preview_01_sub enabled: True
      timestamp: false
    roles:  bounding_box: True
      retain:
      - record  default: 2
    rtmprecord:
      enabled: FalseTrue
      detectevents:
      width  retain:
 2560
      height: 1920
  default: 10
   fps: 10frigate_big_shed_cam:
    objectsffmpeg:
      trackinputs:
        - person
    snapshots:
      enabled: True
  path: rtsp://127.0.0.1:8554/frigate_big_shed_cam_sub?video=copy
    timestamp: false
      boundinginput_boxargs: Truepreset-rtsp-restream
      retain:
        defaultroles:
 2
  frigate_carport_cam:
    ffmpeg:
     - inputs:detect
        - path: rtsp://user:password@10127.0.0.1911:554//h264Preview_01_main8554/frigate_big_shed_cam_main?video=copy&audio=aac
          roles:
input_args: preset-rtsp-restream
          roles:
   - detect
        - path: rtsp://user:password@10.0.0.191:554//h264Preview_01_subrecord
    rtmp:
      rolesenabled: False
    detect:
      width: 640
 - record
    rtmpheight: 480
      enabledfps: False5
    detectobjects:
      widthtrack: 2560
      height: 1920
 - person
    fpssnapshots:
  10
    objectsenabled: True
      tracktimestamp: false
      bounding_box: True
     - personretain:
        -default: car2
    snapshotsrecord:
      enabled: True
      timestampevents: false
      bounding_box: True
      retain:
          default: 210
detectors:
  coral:
    type: edgetpu
    device: usb
birdseye:
  enabled: True
  mode: continuous

CPU - With Google Coral

As the logs states:

...

I assume the Google Coral is working, but still Frigate is highly CPU intensive for 4 cams:

With frigate not running:

Image Added

If this is not improving / improved somehow, I will setup Frigate on a seperate piece of hardware.


This is 1 cam high res detect:

Image Added