add_text_overlay
Add custom text overlays to videos at specific times and positions. Define text, duration, font size, color, and position. Save the edited video with ease.
Instructions
Adds one or more text overlays to a video at specified times and positions.
Args: video_path: Path to the input main video file. output_video_path: Path to save the video with text overlays. text_elements: A list of dictionaries, where each dictionary defines a text overlay. Required keys for each text_element dict: - 'text': str - The text to display. - 'start_time': str or float - Start time (HH, or seconds). - 'end_time': str or float - End time (HH, or seconds). Optional keys for each text_element dict: - 'font_size': int (default: 24) - 'font_color': str (default: 'white') - 'x_pos': str or int (default: 'center') - 'y_pos': str or int (default: 'h-th-10') - 'box': bool (default: False) - 'box_color': str (default: 'black@0.5') - 'box_border_width': int (default: 0) Returns: A status message indicating success or failure.
Input Schema
Name | Required | Description | Default |
---|---|---|---|
output_video_path | Yes | ||
text_elements | Yes | ||
video_path | Yes |