How to remove steady video frames from 24/7 video? I have a surveillance camera video backup that works 24/7, and I need to store it for the record and ready to use if any checking is needed. (No Business usage just personal)

So I want a tool/software/..etc that can help me remove the duplicate frames or even check for example frames per minute and if they are not different remove the 60 seconds frames.

I'm sorry, I'm not a video editor so I've no XP in that matter.

If there is no such a tool, I'm a software developer with somewhat decent matlab experience with image processing, but I don't know if I can have something to help with the matter.
mpdecimate filter drop frames that do not differ greatly from the previous frame in order to reduce frame rate.
This command will filter the duplicate frames
ffmpeg -i input.mp4 -vf mpdecimate -loglevel debug -f null -

To remove these duplicates and generate a video
ffmpeg -i input.mp4 -vf mpdecimate,setpts=N/FRAME_RATE/TB out.mp4