ffmpeg:video:frame:extract_frames
Differences
This shows you the differences between two versions of the page.
ffmpeg:video:frame:extract_frames [2025/01/29 22:51] – created peter | ffmpeg:video:frame:extract_frames [2025/01/29 23:03] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ffmpeg - Video - Frame - Extract Frames ====== | ====== ffmpeg - Video - Frame - Extract Frames ====== | ||
+ | |||
+ | ===== Extract a single frame ===== | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i input.mp4 %02d_out.jpg -frames:v 1 | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** Write a single image. | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Extract a sequence of frames ===== | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i input.mp4 %02d_out.jpg | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE:** The output needs to be an image sequence pattern. | ||
+ | |||
+ | * **%02d**: | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Extract resized ===== | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i $(video_in) -vf scale=-1: | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
ffmpeg/video/frame/extract_frames.1738191072.txt.gz · Last modified: 2025/01/29 22:51 by peter