If you want 1/10 of what you have now (when you use -r 1) then use

 -r 0.1

It will get 1 frame every 10 seconds instead of 1 frame every 1 second.

 ffmpeg -i out1.avi -r 0.1 -f image2 image-%3d.jpeg

EDIT:

If you really what every 10th frame from video then you can use select with modulo 10

ffmpeg -i out1.mp4 -vf "select=not(mod(n\,10))" -vsync vfr image_%03d.jpg

but it may gives more images than before.

If video has 25fps then -r 1 gives image every 25th frame. And if video has 60fps then gives image every 60th frame. So it gives less images then this code which get image every 10th frame.

Answer from furas on Stack Exchange
🌐
Gumlet
gumlet.com › learn › ffmpeg-extract-frames
How to extract frames from video using FFmpeg? - Gumlet
July 3, 2024 - In this command, "-ss 00:00:10" tells FFmpeg to start extracting frames from the 10th second of the video. As a result, you'll get frames extracted every 10 seconds throughout the video.
Discussions

I'm trying to extract a frame every 10 seconds or 300 frames from a video but I keep getting errors
from which location you launch the ffmpeg command ? %04d.png -> you will save in the folder you launched the command, maybe you can add G:\%04d.png More on reddit.com
🌐 r/ffmpeg
5
3
June 9, 2023
What is I frame extraction option every 10 sec?
Duude your skipping all frames for 10 sec then taking one frame. Try googling „ffmpeg keyframe extraction“ Edit: I got that wrong. I meant I-frames, not key-frames. More on reddit.com
🌐 r/ffmpeg
2
3
April 11, 2021
video - Fastest way to extract frames using ffmpeg? - Stack Overflow
SOURCE: https://trac.ffmpeg.org/wiki/Create a thumbnail image every X seconds of the video ... I'm using this with a pipe to Imagemagick's montage to get 10 frames preview from any videos. More on stackoverflow.com
🌐 stackoverflow.com
framerate - Extract the frame (in image format) at exactly every minute (or second) from a video (by ffmpeg) - Video Production Stack Exchange
Motivation: I would like to seek the frame, then take high quality and exact time screenshots (images) from a video. The video is length is 00:48:43.71 and 23.98 fps (we can think it is 24 fps, is... More on video.stackexchange.com
🌐 video.stackexchange.com
July 8, 2015
People also ask

What's the difference between extracting frames and making a thumbnail?
A. Extracting frames saves plain stills at the rate you choose. The thumbnail guide is about one representative image: letting FFmpeg pick the frame, and setting its size.
🌐
ffmpeg-cookbook.com
ffmpeg-cookbook.com › home › video conversion › extract frames from video with ffmpeg — save as png or jpg
Extract Frames from Video with FFmpeg — Save as PNG or JPG
Top answer
1 of 8
131

It's very simple with ffmpeg, and it can output one frame every N seconds without extra scripting. To export as an image sequence just use myimage_%04d.png or similar as the output. The %0xd bit is converted to a zero-padded integer x digits long - the example I gave gets output as

  • myimage_0000.png,

  • myimage_0001.png,

  • myimage_0002.png

    etc..

You can use lots of still image formats, png, jpeg, tga, whatever (see ffmpeg -formats for a full list).

Ok so now we know how to export the movie as a sequence of images, but say we don't want to export every single frame?

The trick is to simply change the frame rate of the output to whatever we want using the -r n option where n is the number of frames per second. 1 frame per second would be -r 1, one frame every four seconds would be -r 0.25, one frame every ten seconds would be -r 0.1 and so on.

So to put it all together, this is how it would look to save one frame of input.mov every four seconds to output_0000.png, output_0001.png etc.:

ffmpeg -i input.mov -r 0.25 output_%04d.png

Note that the -r 0.25 option goes after the -i input.mov part, because it's controlling the frame rate of the output. If you put it before the input it would treat the input file as if it had the specified frame rate.

Change the %xd to however many digits you need, e.g. if the command would create more than 10,000 frames change the %04d to %05d. This also works for input files that are image sequence. Read more here.

Windows users: On the command line use %

example: ffmpeg -i inputFile.mp4 -r 1 outputFile_%02d.png

In CMD and BAT Scripts use %%

example: ffmpeg -i inputFile.mp4 -r 1 outputFile %%02d.png

So double %% in scripts, and single % on the interactive command line. Getting it wrong in either situation will generate an error.

Edit Worth checking out the discussion of file types in the comments below. There are advantages and disadvantages with each:

  • jpeg much smaller file sizes, lossy, only 8-bit colour, no alpha.
  • png lossless, large files, slow. 8-bit colour supports alpha.
  • tiff lossless, even larger files, fast, supports up to 16 colour and alpha.

To specify the file format, just use the required extension in the output file, e.g. myimage_%04d.jpg, myimage_%04d.png or myimage_%04d.tiff

2 of 8
36
mplayer -vo jpeg -sstep 5 file.avi

will save a frame as a jpeg file every 5 seconds.

However, it will not stop at the end of the file, it will continue producing copies of the last frame. To avoid this, find the duration of the video in seconds, using another player, or with mplayer:

mplayer -vo null -ao null -frames 0 -identify file.avi

and look for a line like "ID_LENGTH=147.00".

Subtract 2 from the length, and use this value for the -endposoption. For example, for a 147 second video:

mplayer -vo jpeg -sstep 5 -endpos 145 file.avi
🌐
OTTVerse
ottverse.com › home › ffmpeg › extract frames using ffmpeg: a comprehensive guide
Extract Frames using FFmpeg: A Comprehensive Guide - OTTVerse
August 21, 2023 - This command is quite similar to the basic frame extraction command we discussed earlier, with one difference – we’ve omitted the -vf "fps=1" parameter. The omission means FFmpeg will extract every frame, not just one per second.
🌐
Creatomate
creatomate.com › blog › how-to-extract-images-from-a-video-using-ffmpeg
How to Extract Images From a Video using FFmpeg - Creatomate
October 17, 2022 - $ ffmpeg -i input.mp4 -r 1/3 framed.png The -r 1/3 argument instructs FFmpeg to extract frames every 3 seconds. To extract every 10 seconds, use -r 1/10.
🌐
Reddit
reddit.com › r/ffmpeg › i'm trying to extract a frame every 10 seconds or 300 frames from a video but i keep getting errors
r/ffmpeg on Reddit: I'm trying to extract a frame every 10 seconds or 300 frames from a video but I keep getting errors
June 9, 2023 -

I think this is the correct line for it:

ffmpeg -i "G:\Series\[RH] Perritos bonitos Tai [Dual Audio] [BDRip] [1080p]" -vf fps=1/10 %04d.png

But now I keep getting:

Error opening input: Permission denied

I tried running CMD as an administrator, as a normal user and adding "G:" before the line, it didn't worked.

I already tried 3 easier programs to do this but all failed, now I have to use lines of code, please help.

Find elsewhere
🌐
Medium
hansheng0512.medium.com › extract-frames-from-video-with-ffmpeg-in-one-minute-526da15090ec
Extract Frames From Video with FFmpeg in One Minute | by Liang Han Sheng | Medium
December 25, 2022 - ... You can further specify how many frames to extract per second. For example, the command below with fps=2 will extract 2 frames per second. ... And fps=1/10 will extract 1 frame per 10 seconds.
🌐
Reddit
reddit.com › r/ffmpeg › what is i frame extraction option every 10 sec?
r/ffmpeg on Reddit: What is I frame extraction option every 10 sec?
April 11, 2021 -

Hello

I am trying to extract I frame every 10 sec for 24 fps video source.

Is it correct?

ffmpeg -i myvideo.mp4 -vf fps=1/600 img%03d.jpg

When it ran it, it looks like does not matched my video player timeframe.

Please correct me if I have worng.

Thanks

🌐
FFmpeg Cookbook
ffmpeg-cookbook.com › home › video conversion › extract frames from video with ffmpeg — save as png or jpg
Extract Frames from Video with FFmpeg — Save as PNG or JPG
June 27, 2026 - The thumbnail guide is about one representative image: letting FFmpeg pick the frame, and setting its size. Q2. How do I get one frame every N seconds? A. Use -vf fps=1/N. For example fps=1/10 gives one frame every 10 seconds.
🌐
GitHub
gist.github.com › loretoparisi › a9277b2eb4425809066c380fed395ab3
Extract all frames from a movie using ffmpeg · GitHub
Copy link · Copy Markdown · Author · @Soebb when you use 1/60 that means 1/60 frames per second, or 1 frame per 60 seconds: ffmpeg -i input.mov -vf fps=1/60 outd.jpg · so to extract every 100 milliseconds it should be possibile setting ...
Top answer
1 of 1
3

Using -r 0.1 sets the output framerate to 0.1Hz, but it's not guaranteed to get frame from the input video exactly every 10 seconds (I am not sure why).

One way for solving it is using select filter.

Example (without GPU acceleration):

ffmpeg -i input.mp4 -vf "select=bitor(gte(t-prev_selected_t\,10)\,isnan(prev_selected_t))" -vsync 0 f%09d.jpg

  • bitor(gte(t-prev_selected_t\,10) is 1 when difference between "passed" timestamps is grater of equal 10 seconds.
    When expression is evaluated to 1, the frame is "selected" and passed to the output.
  • bitor with isnan(prev_selected_t) passes the first frame, where prev_selected_t is NaN (has no value).
  • -vsync 0 applies "passthrough" - Each frame is passed with its timestamp from the demuxer to the muxer.

Here is an example with scale_cuda and thumbnail_cuda:

ffmpeg \
    -loglevel error \
    -hwaccel cuvid \
    -hwaccel_output_format cuda \
    -c:v h264_cuvid \
    -i "$video_file" \
    -filter:v "scale_cuda=w=-1:h=100,thumbnail_cuda=2,hwdownload,format=nv12,select=bitor(gte(t-prev_selected_t\,10)\,isnan(prev_selected_t))" \
    -vsync 0 \
    -color_range 2 \
    f%09d.jpg   
  • Due to the usage of thumbnail_cuda filter, we have to place the select filter at the end.

Testing:
Build synthetic video with frame counter at 10fps:

ffmpeg -y -f lavfi -r 10 -i testsrc=size=128x72:rate=1:duration=1000 -vf setpts=N/10/TB -vcodec libx264 -pix_fmt yuv420p input.mp4

Output frames after executing the above command:


As you can see, the selected frames are exactly every 10 seconds.

🌐
RenderIO
renderio.dev › blogs › ffmpeg-extract-frames
FFmpeg Extract Frames from Video: Every Method | RenderIO Blog
March 19, 2026 - If you want 10 frames per second (useful for creating sprite sheets or smooth previews): ffmpeg -i input.mp4 -vf "fps=10" frames/frame_d.png · A quick note on the d pattern: it's a C-style format string.
🌐
Baeldung
baeldung.com › home › scripting › extracting frames from a video using ffmpeg
Extracting Frames From a Video Using FFmpeg | Baeldung on Linux
March 18, 2024 - $ ffmpeg -i big_buck_bunny_720p_2mb.mp4 -ss 00:00:05 -r 10 -s 640x360 -q:v 2 -vframes 25 framed.jpg ... -q:v specifies the quality level of the output image, which ranges from 1 (highest quality) to 31 (lowest quality) framed.jpg specifies the output file name and format for extracted frames · The d sets the numbering used in file names to two digits, padded with zero if necessary. If we want to extract all frames after five seconds, we can run the above command without the -vframes option.
🌐
Bogotobogo
bogotobogo.com › FFMpeg › ffmpeg_thumbnails_select_scene_iframe.php
FFmpeg Scene selection : extracting iframes and detecting scene change - 2020
The advantage is that we'll get the frame at the right time, but the drawback is that it will take a lot of time until it finally reaches that time point. The bigger the seeking time is, the longer you will have to wait. - from Seeking with FFmpeg. ... Now, we want to extract thumbnails periodically. The following command will create one thumbnail image every 10 second...
🌐
Stack Exchange
video.stackexchange.com › questions › 15929 › extract-the-frame-in-image-format-at-exactly-every-minute-or-second-from-a-v
framerate - Extract the frame (in image format) at exactly every minute (or second) from a video (by ffmpeg) - Video Production Stack Exchange
July 8, 2015 - For example, to grab a frame every second from 00:03:00 to 00:04:00, the commend is: ffmpeg -i "video.mp4" -start_number 0 -vf fps=1 -ss 00:03:00 -to 00:04:00 "C 00-03-d.500.png" To verify them, we can extract all the frames from 00:03:29 to 00:03:31 :