Vidium is an open-source videosurveillance system. The project is actually discontinued, but feel free to download and share it