If the JPEG encoding step is too performance intensive, you could always store the frames uncompressed as BMP images:

ffmpeg -i file.mpg -r 1/1 $filename%03d.bmp

This also has the advantage of not incurring more quality loss through quantization by transcoding to JPEG. (PNG is also lossless but tends to take much longer than JPEG to encode.)

Answer from Multimedia Mike on Stack Overflow
🌐
Shotstack
shotstack.io › home › learn › use ffmpeg to extract frames from video
Use FFmpeg to extract frames from video — Shotstack
March 26, 2024 - By default, if you don’t specify any timestamp, FFmpeg will extract the first frame. Here is the first frame of the video saved as a first.jpg: You can view the extracted image using any image viewer or photo editing software on your computer. Use the command below to extract a frame from a specific timestamp in your video.
Discussions

How to extract frames from a video using ffmpeg? - Video Production Stack Exchange
Basically I want to extract all frames from the video where the images will be resized to be 720p. All of this I know how to do. But for testing I want to extract every Nth frame. So every 30th image More on video.stackexchange.com
🌐 video.stackexchange.com
June 1, 2024
How can i extract all frames from a video on a specific folder?

Use

ffmpeg -i video.mp4 -vsync 0 foldername\img-%d.png
More on reddit.com
🌐 r/ffmpeg
12
3
February 11, 2017
Extract specific video frames - Video Production Stack Exchange
@Gyan I came to know of this from an another similar answer of yours. Please do edit it for other users convenience. I have the latest ffmpeg version. ... where XXX is the time in seconds. If you know which exactly frame you want to extract you can calculate the XXX by multiplying the number of the wanted frame * frame duration which is 1/fps. Please also note that since H.264 is using I, P and B frames it would be best if you first decode your video ... More on video.stackexchange.com
🌐 video.stackexchange.com
batch file - Extract all video frames as images with FFMPEG - Stack Overflow
I am trying to convert a MP4 video file into a series of jpg images (out-1.jpg, out-2.jpg etc.) using FFMPEG with, mkdir frames ffmpeg -i "%1" -r 1 frames/out-d.jpg However I keep getting error... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Bannerbear
bannerbear.com › blog › how-to-extract-images-from-a-video-using-ffmpeg
How to Extract Images from a Video Using FFmpeg - Bannerbear
November 18, 2024 - Here's a screenshot of the video paused at 00:06, which is 2 seconds from the specified starting time: ... To extract only an image at a given time like how you would normally take a screenshot, add -frames:v 1 to the command.
🌐
OTTVerse
ottverse.com › home › ffmpeg › extract frames using ffmpeg: a comprehensive guide
Extract Frames using FFmpeg: A Comprehensive Guide - OTTVerse
August 21, 2023 - The -frames:v 1 argument does all the hard work here. It tells FFmpeg to stop after extracting one video frame. Note that the order matters; if you put -frames:v 1 before -i input.mp4, it will not work correctly. In some situations, you might need to extract all frames from a video.
🌐
GitHub
gist.github.com › loretoparisi › a9277b2eb4425809066c380fed395ab3
Extract all frames from a movie using ffmpeg · GitHub
@illtellyoulater Just skip the frame rate parameters. It should look something like this: ffmpeg -i input.mkv outd.png ... If you have an HDR movie, you can extract high quality images using: ffmpeg -i HDR.mov -vf zscale=t=linear:npl=100,format=gbrpf32le,zscale=p=bt709,tonemap=tonemap=hable:desat=0,zscale=t=bt709:m=bt709:r=tv,format=yuv420p 'd.png' ... How to use AMD & NVIDIA hardware GPU acceleration while capturing screenshots of any given H264 or H265 video or movie?
Find elsewhere
🌐
npm
npmjs.com › package › ffmpeg-extract-frames
ffmpeg-extract-frames - npm
December 23, 2018 - Extracts frames from a video using fluent-ffmpeg.
      » npm install ffmpeg-extract-frames
    
Published: Dec 23, 2018
Version: 2.0.2
🌐
YouTube
youtube.com › watch
ffmpeg tutorial export every nth frame as image - YouTube
Learn how to efficiently extract specific frames from an MP4 video using FFmpeg in this step-by-step tutorial. Whether you need to export every 10th, 30th, o...
Published: January 22, 2025
🌐
Mux
mux.com › articles › clip-sections-of-a-video-with-ffmpeg
How to extract clips from videos using ffmpeg | Mux
This is the most straightforward method for extracting a clip from a video. ... For more precise cutting, especially at the beginning of the clip, you can place the -ss option before the input file and re-encode: ... This method is slower but can provide a more accurate cut, especially for the starting point. ... ffmpeg -i input_file.mp4 \ -filter_complex \ "[0:v][0:a]trim=start=00:01:30:end=00:02:00,setpts=PTS-STARTPTS[v1][a1]; \ [0:v][0:a]trim=start=00:03:00:end=00:03:30,setpts=PTS-STARTPTS[v2][a2]; \ [v1][a1][v2][a2]concat=n=2:v=1:a=1[outv][outa]" \ -map "[outv]" -map "[outa]" output.mp4
🌐
Stack Exchange
video.stackexchange.com › questions › 37503 › how-to-extract-frames-from-a-video-using-ffmpeg
How to extract frames from a video using ffmpeg? - Video Production Stack Exchange
June 1, 2024 - ffmpeg · See similar questions with these tags. Featured on Meta · How can we improve duplicate handling? We’ve reworked automatic question deletion. Let’s talk about why · The return of the network data dump · 5 Extract the frame (in image format) at exactly every minute (or second) from a video (by ffmpeg) 4 quickly extract video frames with ffmpeg ·
🌐
Reddit
reddit.com › r/ffmpeg › how can i extract all frames from a video on a specific folder?
r/ffmpeg on Reddit: How can i extract all frames from a video on a specific folder?
February 11, 2017 -

I want to extract all the frames of a video in it's original quality in a folder.

After google i see you can make FFMPEG to extract frames "every x amount of seconds" or extract 60 frames per second even if the video plays at 30 frames per second.

But what i want is to extract all the frames that originally exist in a video (no extra frames like 60 per second when the video originally has 30), without lose quality, in a determined output folder (not in the ffmpeg folder).

I will re-join them all later into a video so i don't want to lose quality.

What kind of syntax should i use?

🌐
FFmpeg
ffmpeg.org › ffmpeg.html
ffmpeg Documentation
August 10, 2026 - Frames from the third input are rescaled, then the duplicated into two identical streams. One of them is overlaid over the combined first two inputs, with the result exposed as the filtergraph’s first output. The other duplicate ends up being the filtergraph’s second output. Encoders receive raw audio, video, or subtitle frames and encode them into encoded packets.
🌐
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 - We can also extract multiple frames from the desired time offset. Let’s extract 25 frames from the video starting at five seconds with the rate of 10 frames per second: $ ffmpeg -i big_buck_bunny_720p_2mb.mp4 -ss 00:00:05 -r 10 -s 640x360 -q:v 2 -vframes 25 framed.jpg
🌐
Bogotobogo
bogotobogo.com › FFMpeg › ffmpeg_thumbnails_select_scene_iframe.php
FFmpeg Scene selection : extracting iframes and detecting scene change - 2020
If we want to extract just a single frame (-vframes 1) from the video (Yosemite) into an image file, we do: ffmpeg -i yosemiteA.mp4 -ss 00:00:18.123 -f image2 -vframes 1 yosemite.png
🌐
Medium
medium.com › @publiciscommerce › extracting-i-frames-keyframes-from-a-video-using-ffmpeg-cb7f2ae3add1
Extracting I-frames (Keyframes) from a Video Using ffmpeg | by Publicis Commerce – Global AI | Medium
November 25, 2022 - Alternatively, we can use 2 in place of vfr for the same result. -f image2 writes video frames to image files. The output filenames (i.e. imgFilenames) are specified by a pattern, which can be used to produce sequentially numbered series of files.
🌐
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 - For MacOS, simply do brew install ffmpeg and for Ubuntu, use sudo apt install ffmpeg. For Windows, it’s a bit trickier, you will have to download FFmpeg build and set it up manually.
🌐
Medium
medium.com › @alibugra › extract-frames-as-an-image-from-video-files-using-ffmpeg-65b52d3d97db
Extract frames as an image from video files using FFMPEG | by Ali Buğra Kanburoğlu, PhD | Medium
June 14, 2018 - After the installation of FFMPEG, terminal (command prompt) will recognize FFMPEG commands, so we can use it from terminal as below. ... In the above code, the command outputs a frame as an image for every second in “img” folder. By changing the “fps” parameter, output frames could be changed such as; fps=1 means every second, fps=1/60 means every minute, fps=1/600 means every ten minutes. I shared a structure that helps to extract images from video files with the help of Python’s subprocess module that runs the above command.