Back to Autogpt

Video Text Overlay

docs/integrations/block-integrations/video/text_overlay.md

0.6.442.0 KB
Original Source

Video Text Overlay

<!-- MANUAL: file_description -->

This block adds customizable text captions or titles to videos, with control over positioning, timing, and styling.

<!-- END MANUAL -->

Video Text Overlay

What it is

Add text overlay/caption to video

How it works

<!-- MANUAL: how_it_works -->

The block uses MoviePy's TextClip and CompositeVideoClip to render text onto video frames. The text is created as a separate clip with configurable font size, color, and optional background color, then composited over the video at the specified position. Timing can be controlled to show text only during specific portions of the video. Position options include center alignments (top, center, bottom) and corner positions (top-left, top-right, bottom-left, bottom-right). The output is encoded with H.264 video codec and AAC audio codec.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
video_inInput video (URL, data URI, or local path)str (file)Yes
textText to overlay on videostrYes
positionPosition of text on screen"top" | "center" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right"No
start_timeWhen to show text (seconds). None = entire videofloatNo
end_timeWhen to hide text (seconds). None = until endfloatNo
font_sizeFont sizeintNo
font_colorFont color (hex or name)strNo
bg_colorBackground color behind text (None for transparent)strNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
video_outVideo with text overlay (path or data URI)str (file)

Possible use case

<!-- MANUAL: use_case -->
  • Adding titles or chapter headings to video content
  • Creating lower-thirds with speaker names or captions
  • Watermarking videos with branding text
  • Adding call-to-action text at specific moments in a video
<!-- END MANUAL -->