ffm_drawbox: Draw a Colored Box on the Videos in an FFmpeg Pipeline

View source: R/ffm.R

ffm_drawboxR Documentation

Draw a Colored Box on the Videos in an FFmpeg Pipeline

Description

Add a video filter to draw a colored rectangle on the input video.

Usage

ffm_drawbox(
  object,
  x = 0,
  y = 0,
  width = "in_w",
  height = "in_h",
  color = "black",
  thickness = "fill"
)

Arguments

object

An ffmpeg pipeline (ffm) object created by ffm_files().

x

The horizontal position, in the input video, of the left edge of the box (in pixels). Either a nonnegative real number or a string that contains an FFMPEG expression. (default = 0)

y

The vertical position, in the input video, of the top edge of the box (in pixels). Either a nonnegative real number or a string that contains an FFMPEG expression. (default = 0)

width

The width of the box (in pixels). Either a positive real number or a string that contains an FFmpeg expression. (default = "in_w")

height

The height of the box (in pixels). Either a positive real number or a string that contains an FFmpeg expression. (default = "in_h")

color

A string containing the color of the box in FFmpeg color syntax, see reference link below for more details. If the special value "invert" is used, the box color is teh same as tehv ideo with inverted luma. (default = "black")

thickness

A thickness of the box edge (in pixels). A value of "fill" will create a filled box. (default = "fill")

Value

object but with the added instruction to apply the drawbox filter.

References

https://ffmpeg.org/ffmpeg-filters.html#drawbox

https://ffmpeg.org/ffmpeg-utils.html#color-syntax


jmgirard/tidymedia documentation built on June 15, 2024, 1:52 p.m.