<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.squirrelslair.ca/index.php?action=history&amp;feed=atom&amp;title=Extract_Images_From_a_Video_With_FFMPEG</id>
	<title>Extract Images From a Video With FFMPEG - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.squirrelslair.ca/index.php?action=history&amp;feed=atom&amp;title=Extract_Images_From_a_Video_With_FFMPEG"/>
	<link rel="alternate" type="text/html" href="https://wiki.squirrelslair.ca/index.php?title=Extract_Images_From_a_Video_With_FFMPEG&amp;action=history"/>
	<updated>2026-04-29T16:43:56Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://wiki.squirrelslair.ca/index.php?title=Extract_Images_From_a_Video_With_FFMPEG&amp;diff=3422&amp;oldid=prev</id>
		<title>Hal: Using FFmpeg to extract frames from a source video</title>
		<link rel="alternate" type="text/html" href="https://wiki.squirrelslair.ca/index.php?title=Extract_Images_From_a_Video_With_FFMPEG&amp;diff=3422&amp;oldid=prev"/>
		<updated>2022-01-19T05:55:59Z</updated>

		<summary type="html">&lt;p&gt;Using FFmpeg to extract frames from a source video&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{TidBit&lt;br /&gt;
|shortDescription=If you have a video and want to extract a series of images from it, you can do it easily with FFmpeg&lt;br /&gt;
|skillSet=Programming; Raspberry Pi&lt;br /&gt;
|featured=Yes&lt;br /&gt;
}}&lt;br /&gt;
There are a lot of tools out there to process video or convert a series of images to video, but there don&amp;#039;t seem to be many that will do the opposite.&lt;br /&gt;
&lt;br /&gt;
FFmpeg is a very flexible tool that can do this (and many other) tasks very easily. Looking at the documentation can be a bit daunting because of the breadth of features it has, but if you want to quickly extract images from a video, you can use the following command:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;ffmpeg -i input_file.mpg -ss 00:05 -to 01:25 -vf scale=1920:1080 output_file%d.bmp&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s what these particular options do:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-i input_file.mpg&amp;lt;/code&amp;gt; - sets the input file to input_file.mpg&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-ss 00:05&amp;lt;/code&amp;gt; - start extracting images from the 5 second point in the video&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-to 01:25&amp;lt;/code&amp;gt; - extract images up until the 1 minute, 25 second point in the video&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;-vf scale=1920:1080&amp;lt;/code&amp;gt; - sets the dimensions of the output files to 1920x1080.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;output_file%d.bmp&amp;lt;/code&amp;gt; - name the created image files output_file#.bmp, where # is an incrementing number.&lt;br /&gt;
&lt;br /&gt;
The number of images you will get with these options depends on the frame rate of the video. For example, if ffmpeg is extracting from 00:05 to 01:25, that&amp;#039;ll be 1:20 (or 80 seconds) worth of video. If the frame rate of the video is 24FPS, you&amp;#039;ll get (80s)x(24F/s), which works out to 1920 images written to disk, each representing one frame.&lt;br /&gt;
&lt;br /&gt;
If you don&amp;#039;t use the &amp;lt;code&amp;gt;-ss tt:tt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;-to tt:tt&amp;lt;/code&amp;gt; options, ffmpeg will convert the entire input file to a series of images. Depending on the video and output options, this can take up a lot of disk space very quickly!&lt;br /&gt;
&lt;br /&gt;
if you don&amp;#039;t use the &amp;lt;code&amp;gt;-vf scale=x:y&amp;lt;/code&amp;gt; option, ffmpeg will produce output images that are the same dimensions as the input file.&lt;br /&gt;
&lt;br /&gt;
The highest-quality (but largest file size) extracted images will be those in formats with no compression, like .bmp. A format that uses compression like .jpg will give you smaller file sizes but with reduced quality.&lt;br /&gt;
&lt;br /&gt;
This is barely a scratch on the surface of the things that FFmpeg can do, but it&amp;#039;s a handy tool to remember. Check out the [https://ffmpeg.org/documentation.html FFmpeg Documentation Pages] for more information on what FFmpeg can do!&lt;/div&gt;</summary>
		<author><name>Hal</name></author>
	</entry>
</feed>