Skip to main content

Prerequisites

To use MoviePyVideoTools, you need to install moviepy and its dependency ffmpeg:
Important for Captioning Workflow: The create_srt and embed_captions tools require a transcription of the video’s audio. MoviePyVideoTools itself does not perform speech-to-text. You’ll typically use another tool, such as OpenAITools with its transcribe_audio function, to generate the transcription (often in SRT format) which is then used by these tools.

Example

The following example demonstrates a complete workflow where an agent uses MoviePyVideoTools in conjunction with OpenAITools to:
  1. Extract audio from a video file
  2. Transcribe the audio using OpenAI’s speech-to-text
  3. Generate an SRT caption file from the transcription
  4. Embed the captions into the video with word-level highlighting

Toolkit Functions

These are the functions exposed by MoviePyVideoTools:

Toolkit Params

These parameters are passed to the MoviePyVideoTools constructor:

Developer Resources