Skip to content



Automatic video frame cropping detection based on ffmpeg commandline

Full documentation of the tool`s crop detection can be found here: ffmpeg - cropdetect

This implementation covers accurate detection of black bars across entire movies, with predefined parameters. The output output will be stored in a variable "cropdetect" which can be used for cropping instructions in subsequent ffmpeg commands.


  "parameters": {
    "inputfile": ""
  "tool": "transcode:cropdetect"

Returns frame dimensions without black bars, width:height:columns_indent:rows_indent, for example:


Example for cropping instructions with that output in a later ffmpeg command:

  "tool": "ffmpeg:cmd",
  "parameters": {
    "ignore_decoding_errors": "false",
    "arguments": [
      ""-filter_complex "[0:v]{cropdetect}[cropped];[cropped]scale='(trunc((ih*((16/9)/2))*2))':ih,setsar=1[cropped]"",
      "-map", "[cropped]
Parameter Properties Default Type Choice Description
inputfile required