FFmpeg 1.0.10
Since* 0.7
#

Auto-detect crop size.

Calculate necessary cropping parameters and prints the recommended parameters through the logging system. The detected dimensions correspond to the non-black area of the input video.

It accepts the syntax:

cropdetect[=limit[:round[:reset]]]
limit

Threshold, which can be optionally specified from nothing (0) to everything (255), defaults to 24.

round

Value which the width/height should be divisible by, defaults to 16. The offset is automatically adjusted to center the video. Use 2 to get only even dimensions (needed for 4:2:2 video). 16 is best when encoding to most video codecs.

reset

Counter that determines after how many frames cropdetect will reset the previously detected largest video area and start over to detect the current optimal crop area. Defaults to 0.

This can be useful when channel logos distort the video area. 0 indicates never reset and return the largest area encountered during playback.