2

I went through this guide and found that below commands should give maximum of image-000.jpg to image-999.jpg

ffmpeg -i video.webm -vf fps=1 image-%03d.png

But after reaching image-999.jpg, ffmpeg keeps on creating 1000, 1001, ... 99999.jpg,

I tried with VLC, but VLC as well gives millions of images.

The problem: we work on the last 100 images at any instant. So to create images, we use ffmpeg. But this creates a lot of images, after time moves, so I have to delete older images as disk usage will increase.

Excellll
  • 12,847

1 Answers1

1

You can try this:

ffmpeg -i input -q:v 3 -f segment -segment_format mjpeg -segment_wrap 100 -segment_time 0.001 out%d.jpg

This will limit output to 100 files but it will reuse filenames, so you'll have to order files by time last modified to know the order of the last 100 frames.

Gyan
  • 38,955