Find a VMS that records and exposes that recording stream over RTSP playback, then use FFMPEG to grab it and write it to a file over the selected period. I *think* the FFMPEG cli is capable of this, but not 100% sure.
I can recommend my own VMS from Monocle Security for this, because it support this feature, but you will have to pay for an additional 4 cameras, there may be others that are free up to 8. If FFMPEG isn't capable of doing what you need, I can modify the monocle command line interface to include your requirements.