I don’t know beans about available codecs specifically, but from a systems-design POV the idea is sound.
I suggest you’d end up doing the recoding in batches, not continuously. Say the original recording wrote to a file for 30 minutes before closing the file & switching to a new one. One approach would then be to have another process come along and rework the 30-minute file that just became 24 hours old.
My suggestion would be to take a more batch-oriented approach to archiving where in addition to reducing frame rate we combine files for ease of storage. This would have the side effect of keeping the data between 24 and 48 hours ago still at 30 fps as we transition from a continuous process to a more calendar-day-oriented process.
e.g. After midnight I’d take the calendar day 2 days prior and recode & combine the day’s files into a single file (i.e. at 0005 on Wed rework all 48 camera file chunks from Monday into a single new file named Monday recorded at 5 fps). This would reduce the quantity of 30 fps data on hand from 48 hours-worth to 24 hours-worth. Over the next 24 hours it will reaccumulate up to 48 hours total & then we trim it back to 24 again. Repeat daily ad infinitum.
Do something similar at the start of each week: If Monday is the start of your week, on Tuesday at 0105 gather the day files from Monday 15 days ago to Sunday 9 days ago & recode at 1fps into a single file for the week.
Use the same idea for the week-to-month & month-to-year transition. In each case you’ll have a little more data laying around in a larger format than if you somehow recoded continuously, but that’s a small price to pay for having a plan that you can actually pull off.
Also, because weeks & months and years aren’t uniformly meshable units of time, I’d choose to use 13 4-week intervals instead of the traditional months. Much easier.
Or bag the combining beyond days & simply shrink each appropriate day file when it becomes old enough.
As I said at the outset, I have no knowledge of codecs. But if they work anything like still-image file formats, you don’t so much need a special codec as simply some custom code to open a file using a codec that understands the file format, reset the desired frame rate (or equivalently, jettison every 1 of n frames for various n values) & resave the file using the same dumb codec.
If you’re a programmer this is easy. if you’re hoping for something you can do with some consumer video editor, I’m not optimistic.
I also don’t agree with Captain_G’s concerns. This is not that intensive. We’re just jettisoning frames. Every midnight we make a 6-to-1 cut (30fps to 5) converting 24 hours to 1 day. Once a week we make a 5-to-1 cut (5fps to 1) of 7 days into a week. Once a month we make a 2-to-1 cut (1 fps to 0.5 fps) of a month’s worth. The ~exponential decay of frame rate means the actual number of frames is easily handled at each step.