I'm surprised more video surveillance software does not leverage the APIs of the cameras. Network cameras have built in motion, object, line cross, and facial detection. The work is done in the camera and the APIs allow you to subscribe through call backs or server side events.
You could support event recording for at least a half dozen cameras with a raspberry pi.<p>I've prototyped this but it ended up on my shelf of incomplete hobbies. Given that many camera brands are white label products made by the same manufacturer, I would think you could cover several brands with just the first API client implementation. Or maybe this is also covered with onvif?