A
A
Albert Kazan2019-09-02 03:31:09
Video processing
Albert Kazan, 2019-09-02 03:31:09

How with ffmpeg to split into a certain number of thumbnails?

Learned how to use

ffmpeg -i sample.mp4 -vf "fps=1/16,scale=240:135:force_original_aspect_ratio=increase,crop=240:135,tile=8*10" -qscale:v 2 -y thumbs/t_002.jpg

It puts multiple wamboofs in the image (depending on the length of the video). I need to put let's say exactly 80 frames.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey Sokolov, 2019-09-02
@sergiks

The first filter fps=1/16takes 1 frame out of 16 seconds.
To get exactly 80 frames, you need to know in advance the length of the video and calculate such that you fpsget 80 frames: fps=80/длина_видео_в_секундах
You should also pay attention to the filterthumbnail - it selects the most significant frame and a series of frames. It works a little slower and requires more memory, but the selected frames turn out better - without motion blur, etc. Here, too, you need to know the length of the video and the frame rate, i.e. the total number of frames in the video. And divide it by 80. For example, a 15 minute video with a frame rate of 30 gives 30 * 15 * 60 = 27000 frames. Divide by 80 to get 337.5 frames. Those. fps=.. it would be necessary to use a filter instead thumbnail=338
. But the speed may drop and memory consumption may increase.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question