Lake Travis live cam: Frigate + Frigate+ for boats/birds, PTZ autotracking, YouTube chat-controlled presets #23221
pgregg88
started this conversation in
Show and tell
Replies: 1 comment
-
|
Thanks for sharing! As a fellow Texan, it's great to see code you've written used in such a unique way. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hey all — wanted to share a Frigate-based build that's been running 24/7 for a few months now. Lots of decisions that took trial-and-error to get right, so posting in case any of it saves someone time.
What it is
A EmpireTech (Dahua) PTZ4E25X-T180 pointed at Lake Travis (Texas), live on YouTube 24/7 with viewers able to type preset names in chat to move the camera.
Frigate is the central nervous system — detection, autotracking, recording, and the go2rtc restream that everything else hangs off of.
Hardware
/media/2tb)Frigate config highlights
Custom Frigate+ model for the lake
COCO out of the box was unusable — sun glare, jet skis, and shoreline rocks all kept getting called "boats." Submitted a few thousand tagged samples to Frigate+ and the lake-specific model is dramatically better.
Coral inference at ~9ms — never hits a bottleneck.
Killing motion noise from water ripples
This was the biggest tuning fight. Default motion settings light up constantly when wind hits the lake. What landed:
Reducing
frame_heightfrom 100 to 80 pushed ripples below the contour threshold.improve_contrast: falsewas counter-intuitive but key.Autotracker on a far-away scene
The lake is 200m+ out and the PTZ has 25x optical zoom, which makes calibration brittle. Small detections near the horizon try to drag the camera around.
Movement weights were arrived at empirically over weeks. Stationary classifier + interval 15 stops the detector from hammering on parked or anchored boats.
Detect resolution must match the sub-stream
Spent a while wondering why
lake_cam_ptzdetect was burning ~42% CPU. Turned out the detect block requested 1920x1080 @ 10fps but the actual sub-stream is 1280x720 @ 5fps — ffmpeg was upscaling and duplicating frames for nothing.After matching, CPU dropped from 42% to ~10%. Worth checking on every camera. The iGPU (
scale_vaapi) makes the rescale "free" but the CPU work to download, format-convert, and pipe the larger frames isn't.Recording strategy
With alerts (30d) and detections (14d) capturing every tracked event with 5s pre/post, continuous 24/7 recording is mostly redundant for cameras where you only care about events. After the cleanup:
Lake cam doesn't need recording — the only useful artifacts are the snapshots that go to Frigate+ for training. Snapshot retention bumped to 36500 days ("forever until manual delete").
Net: ~172 GB/day → ~73 GB/day, no loss of useful coverage.
YouTube chat → PTZ via MQTT
The fun bit. Architecture:
When a viewer types a preset name (or
!preset//preset):frigate/lake_cam_ptz/ptz(Frigate's standard MQTT topic — no Frigate fork required).Also greets first-time chatters once per session. YouTube Data API quota ledger with kill-switch and lockout state, because I learned the hard way when a runaway loop ate the daily 10k-unit quota at 3am.
pytchatfor reads (no quota), Data API for writes (greetings) only.Stack summary
Things that took longer than expected
Not yet solved
Thanks
To Blake and the Frigate team — six months ago I had no idea what an edge TPU was, and now I'm running a small surveillance + livestream system that I trust. The Frigate+ feedback loop is genuinely impressive.
Happy to answer questions or share more config. Repo isn't public yet (cleaning up paths and secrets), but planning to open-source the chat bot specifically since it's reusable for any Frigate+YouTube setup.
Beta Was this translation helpful? Give feedback.
All reactions