>>106256463
CCTV systems have really evolved and it's hard to compete against commercial stuff with diy solutions.
The cameras themselves run on ASICs that do advanced processing like 2D/3D noise reduction, WDR, h265 encoding and local inference. All for $50. Any diy camera is going to be lacking in comparison.
Most of the foss solutions like frigate, scrypted, shinobi hide the advanced stuff behind paid subscriptions.
Rolling you own solutions for things like apps, remote access, inference, push notifications is pretty involved. But if you already have a home server running home assistant or some other ecosystem I'd start there.