How to find important frames from a video

while processing a video, I want to drop similar frames, wish to process frames that have some change in.
cosine similarity, optical flow, attention mechanism, motion saliency, SSIM which might go well. Also how to find if a video is compressed or not? if the real-time captured video compressed or saved to disk video compressed?
In cv2.VideoCapture will it apply ffmpeg encoding technique?