Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to automatically extract slides out of a video? [closed]

the MVP that would satisfy my needs would be something scanning a video and (semi)intelligently extract the whole screen every time it changes (new slide appears)

The ideal tool would be configurable to only take a picture of a selected are.

I found many ways to pick stills from a video, but nothing looking for slides...or just looking for something.

Any ideas?

like image 351
Jan Kadera Avatar asked Oct 19 '25 01:10

Jan Kadera


1 Answers

ffmpeg tool can do this by differencing frames in the video. However, for this to work, you need to have a video consisting only of slides, or you need to crop a part of whole video frame if the video has a moving object, like a person's camera, so only the slide is visible. Otherwise, ffmpeg can capture the whole video frames.

Install ffmpeg:

sudo apt install ffmpeg

Then, capture differentiated frames into extracted_imgs folder, as an example:

ffmpeg -i my_video.mp4 -filter_complex "select=gt(scene\,0.01)" "extracted_imgs/%04d.jpg" -vsync drop -vb 20M

Here, you can change 0.01 to adjust how to difference the frames, more sensitively or more coarsely.

like image 63
Celuk Avatar answered Oct 22 '25 05:10

Celuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!