FFmpeg 1.2.12
Since* 0.7
#

Draw a colored box on the input image.

The filter accepts parameters as a list of key=value pairs, separated by ":". If the key of the first options is omitted, the arguments are interpreted according to the syntax x:y:width:height:color:thickness.

A description of the accepted options follows.

x, y

Specify the top left corner coordinates of the box. Default to 0.

width, w, height, h

Specify the width and height of the box, if 0 they are interpreted as the input width and height. Default to 0.

color, c

Specify the color of the box to write, it can be the name of a color (case insensitive match) or a 0xRRGGBB[AA] sequence. If the special value invert is used, the box edge color is the same as the video with inverted luma.

thickness, t

Set the thickness of the box edge. Default value is 4.

#

Examples

  • Draw a black box around the edge of the input image:

    drawbox
    
  • Draw a box with color red and an opacity of 50%:

    drawbox=10:20:200:60:red@0.5

    The previous example can be specified as:

    drawbox=x=10:y=20:w=200:h=60:color=red@0.5
  • Fill the box with pink color:

    drawbox=x=10:y=10:w=100:h=100:color=pink@0.5:t=max