User Tools

Site Tools


ffmpeg:video:frame:extract_frames

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ffmpeg:video:frame:extract_frames [2025/01/29 22:51] – created peterffmpeg:video:frame:extract_frames [2025/05/27 09:07] (current) peter
Line 1: Line 1:
 ====== ffmpeg - Video - Frame - Extract Frames ====== ====== ffmpeg - Video - Frame - Extract Frames ======
 +
 +===== Extract a single frame at a specific time mark =====
 +
 +<code bash>
 +ffmpeg -ss 00:23:00 -i input.mkv -frames:v 1 out1.jpg
 +</code>
 +
 +<WRAP info>
 +**NOTE:** This extracts a single frame at the exact 23:00 time mark.
 +</WRAP>
 +
 +----
 +
 +===== Extract a single frame =====
 +
 +<code bash>
 +ffmpeg -i input.mp4 %02d_out.jpg -frames:v 1
 +</code>
 +
 +<WRAP info>
 +**NOTE:** Write a single image.
 +
 +</WRAP>
 +
 +----
 +
 +===== Extract a sequence of frames =====
 +
 +<code bash>
 +ffmpeg -i input.mp4 %02d_out.jpg
 +</code>
 +
 +<WRAP info>
 +**NOTE:** The output needs to be an image sequence pattern.
 +
 +  * **%02d**:  This is a pattern for an image sequence or use the -update option (with -frames:v 1 if needed) to write a single image.
 +
 +</WRAP>
 +
 +----
 +
 +===== Extract resized =====
 +
 +<code bash>
 +ffmpeg -i $(video_in) -vf scale=-1:$(resize_width),fps=$(FPS) $(path)/$(name)_%02d_out.jpg
 +</code>
 +
 +----
 +
 +==== References ====
 +
 +https://trac.ffmpeg.org/wiki/Seeking
  
ffmpeg/video/frame/extract_frames.1738191072.txt.gz · Last modified: 2025/01/29 22:51 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki