Sidehistorik
...
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 |
Kodeblok |
mqtt: host: 10.0.0.183 cameras: frigate_front_door_cam: ffmpeg: inputstimestamp: false bounding_box: True - path: rtsp://user:password@10.0.0.151:554//h264Preview_01_main retain: default: 2 rolesrecord: enabled: True - detectevents: - path: rtsp://user:password@10.0.0.151:554//h264Preview_01_subretain: rolesdefault: 10 frigate_behind_house_cam: ffmpeg: - record rtmpinputs: enabled: False - detect:path: rtsp://127.0.0.1:8554/frigate_behind_house_cam_sub?video=copy width: 640 height: 480input_args: preset-rtsp-restream fps: 10 objectsroles: track: - persondetect snapshots: - enabled: True timestamp: false path: rtsp://127.0.0.1:8554/frigate_behind_house_cam_main?video=copy&audio=aac boundinginput_boxargs: True preset-rtsp-restream retainroles: default: 2 frigate_garden_cam:- record ffmpegrtmp: inputsenabled: False detect: - path: rtsp://user:password@10.0.0.108:554//h264Preview_01_mainwidth: 640 height: 480 fps: 5 rolesobjects: track: - detectperson snapshots: - path: rtsp://user:password@10.0.0.108:554//h264Preview_01_subenabled: True timestamp: false roles: bounding_box: True retain: -default: record2 rtmprecord: enabled: FalseTrue detectevents: width retain: 2560 height: 1920 default: 10 fps: 10frigate_carport_cam: objectsffmpeg: trackinputs: - person snapshots:path: rtsp://127.0.0.1:8554/frigate_carport_cam_sub?video=copy enabled: True timestampinput_args: false preset-rtsp-restream bounding_box: True retainroles: default: 2 frigate_behind_house_cam:- detect ffmpeg: - inputs:path: rtsp://127.0.0.1:8554/frigate_carport_cam_main?video=copy&audio=aac - pathinput_args: rtsp://user:password@10.0.0.176:554//h264Preview_01_mainpreset-rtsp-restream roles: - detectrecord rtmp: - path: rtsp://user:password@10.0.0.176:554//h264Preview_01_subenabled: False detect: roleswidth: 640 height: 480 -fps: record5 rtmpobjects: enabledtrack: False detect: - person width snapshots: 2560 heightenabled: 1920True fpstimestamp: 10false objects: bounding_box: True trackretain: -default: person2 snapshotsrecord: enabled: True timestampevents: false bounding_box: True retain: default: 210 frigate_big_carportshed_cam: ffmpeg: inputs: - path: rtsp://user:password@10127.0.0.1911:554//h264Preview_01_main8554/frigate_big_shed_cam_sub?video=copy input_args: preset-rtsp-restream roles: - detect - path: rtsp://user:password@10127.0.0.1911:554//h264Preview_01_sub8554/frigate_big_shed_cam_main?video=copy&audio=aac input_args: preset-rtsp-restream roles: - record rtmp: enabled: False detect: width: 2560640 height: 1920480 fps: 105 objects: track: - person snapshots: enabled: True timestamp: 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:
...
If this is not improving / improved somehow, I will setup Frigate on a seperate piece of hardware.
This is 1 cam high res detect: