Local Storage Solution for Camera Stream in 1-Day Chunks

I’m looking for a way to save the video stream from my two cameras directly to my server. I want the files to be divided into 1-day chunks and stored for 30 days, with the oldest files automatically deleted after that period.

Does anyone know of a solution that can handle this? Any software or methods that can help me set this up would be much appreciated!

It might be challenging unless you have a lot of RAM, as the files could be quite large depending on the quality, resolution, and compression. But why do you need such large files? Wouldn’t 1-hour clips work just as well? They’re still big, but much more manageable.