

Then I can do more or less exactly what you want and output PNG images of each slide: ffmpeg -y -i video.mov -vf "crop=80:120:500:180, select=gt(scene\,0.001)" -vsync 0 slides-%03d.png Note that the format of the crop filter is: crop=WIDTH:HEIGHT:X-COORDINATE:Y-COORDINATE That looks like this, again as a reduced size/quality animated GIF: Then, I crop out the counter and do scene-change detection within the cropped area: ffmpeg -y -i video.mov -vf "crop=80:120:500:180, select=gt(scene\,0.001)" -vsync 0 -pix_fmt yuv420p cropped.mov That is too big to upload to StackOverflow, so it looks like this as an animated GIF with reduced size, quality and frame rate:

I think it is much simpler to do cropping and scene change detection with ffmpeg, so I made a test video like this: ffmpeg -hide_banner -y -f lavfi -i testsrc=duration=10:size=640x480:rate=25 -pix_fmt yuv420p video.mov # Release all space and windows once done Name = './data/frame' + str(currentframe) + '.jpg' # if video is still left continue creating images Print ('Error: Creating directory of data') How to avoid them?Ĭam = cv2.VideoCapture("C:\\Users\\zoomrx\\Desktop\\Video\\1.mp4") I want to extract only the slides from the video.ĮDIT: Able to extract the slides, now there are lot of redundant frames being captured, example in the image. I have multiple conference video (.mp4) wherein the speakers are presenting a slide show and slides are changing randomly (depending on how much speaker wants to comment on it).
