Making thumbnail sheets with ffmpeg
Created on 2021-11-19T04:39:39-06:00
ffmpeg -ss 3 -i RHNEgWLWaZoRhBZ4F6U3464OkvsnEmVq.mp4 -frames 5 -vf "select=not(mod(n\,3000)),scale=320:240,tile=4x3" -vsync vfr -q:v 10 image-sheet-filename_%03d.jpg
The -vf at the beginning instructs FFMPEG to use a video filter. Select=not(mod(n\,3000)) is responsible for the selected frames in the final images. It divides the current frame’s number (“n”) with the provided number (“3000”). Has the video reached frame 3001? If we divide 3001 with the number 3000, we get 1, so this frame will be the first in the first produced image sheet. Have we reached frame 6001? Since 6001/3000 gives us 2, this will be the second frame, and so on. Thus, by reducing this number, you increase the frequency of frame selection and vice-versa.