Back to Autogpt

Video Loop

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

0.6.441.7 KB
Original Source

Video Loop

<!-- MANUAL: file_description -->

This block repeats a video to extend its duration, either to a specific length or a set number of repetitions.

<!-- END MANUAL -->

Loop Video

What it is

Block to loop a video to a given duration or number of repeats.

How it works

<!-- MANUAL: how_it_works -->

The block uses MoviePy's Loop effect to repeat a video clip. You can specify either a target duration (the video will repeat until reaching that length) or a number of loops (the video will repeat that many times). The Loop effect handles both video and audio looping automatically, maintaining sync. Either duration or n_loops must be provided. The output is encoded with H.264 video codec and AAC audio codec.

<!-- END MANUAL -->

Inputs

InputDescriptionTypeRequired
video_inThe input video (can be a URL, data URI, or local path).str (file)Yes
durationTarget duration (in seconds) to loop the video to. Either duration or n_loops must be provided.floatNo
n_loopsNumber of times to repeat the video. Either n_loops or duration must be provided.intNo

Outputs

OutputDescriptionType
errorError message if the operation failedstr
video_outLooped video returned either as a relative path or a data URI.str (file)

Possible use case

<!-- MANUAL: use_case -->
  • Extending a short background video to match the length of narration audio
  • Creating seamless looping content for digital signage
  • Repeating a product demo video multiple times for emphasis
  • Extending short clips to meet minimum duration requirements for platforms
<!-- END MANUAL -->