To tune Frigate, it can sometimes be useful to input saved clips in order to see how detection works. I've found the easiest way to accomplish this is by grabbing a clip (say, from your NVR), and streaming this on a loop via RTSP to Frigate. This will let you tune settings with an existing configuration, which is a bit different to using process_clip.py
that's included with Frigate.
- A sample clip, in a format supported by
ffmpeg
(.mp4
is good) - Docker on a machine that'll do the streaming
- A working
ffmpeg
install. I'm using a mac, so I typically install via Brew:brew install ffmpeg
To stream a file called trimmed.mp4
:
- Setup an RTSP server - run
docker run --rm -it -e RTSP_PROTOCOLS=tcp -p 8888:8554 aler9/rtsp-simple-server
- Stream the file:
ffmpeg -re -stream_loop -1 -i trimmed.mp4 -an -c copy -f rtsp rtsp://localhost:8888/mystream
- Update Frigate's
config.yml
to add a new test camera to point at our looping clip (assuming 192.168.1.180 is the host running the RTSP server):cameras: testcamera: ffmpeg: input: rtsp://192.168.1.180:8888/mystream
see: blakeblackshear/frigate#281