Extract Sub-Image from Video to BMP with FFmpeg

This article provides a quick and practical guide on how to extract a specific portion of a video frame (a sub-image) at a precise timestamp and save it as a BMP image using the powerful command-line tool FFmpeg. You will learn the exact command syntax and how to configure the cropping coordinates to get the perfect image extract.

To extract a cropped sub-image from a video and save it as a BMP, you need to combine FFmpeg’s seeking capability with its cropping video filter.

The FFmpeg Command

Run the following command in your terminal:

ffmpeg -ss 00:01:30 -i input.mp4 -vf "crop=w=400:h=300:x=100:y=150" -vframes 1 output.bmp

Parameter Breakdown