Changes between Initial Version and Version 1 of Create a thumbnail image every X seconds of the video


Ignore:
Timestamp:
Jul 4, 2012, 4:11:10 AM (4 years ago)
Author:
burek
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Create a thumbnail image every X seconds of the video

    v1 v1  
     1If you want to extract just a single frame from the video into an image file, you can use the following command line: 
     2{{{ 
     3ffmpeg -i input.flv -ss 00:00:14.435 -f image2 -vframes 1 out.png 
     4}}} 
     5 
     6This will seek to the position of 0h:0m:14sec:435msec into the movie and extract one frame (-vframes 1) from that position into a png file. 
     7 
     8But, what if you want to extract thumbnails periodically? This will create one thumbnail image every second, named out1.png, out2.png, out3.png, ... 
     9{{{ 
     10ffmpeg -i input.flv -f image2 -r 1 out%d.png 
     11}}} 
     12 
     13This will create one thumbnail image every minute, named img001.jpg, img002.jpg, img003.jpg, ... 
     14''(%03d means that ordinal number of each thumbnail image should be formatted using 3 digits)'' 
     15{{{ 
     16ffmpeg -i myvideo.avi -f image2 -r 1/60 img%03d.jpg 
     17}}} 
     18 
     19This will create one thumbnail image every 10 minutes, named thumb0001.bmp, thumb0002.bmp, thumb0003.bmp, ... 
     20{{{ 
     21ffmpeg -i test.flv -f image2 -r 1/600 thumb%04d.bmp 
     22}}} 
     23 
     24'''Explanation:''' 
     25By telling FFmpeg to set the output file's FPS option (frames per second) to some very low value, we made FFmpeg drop a lot of frames at the output, in order to achieve such a low frame rate, effectively having our thumbnails generated every X seconds :) 
     26 
     27'''See also:''' 
     28[[Create a video slideshow from images]]