add_text_overlay
Insert custom text overlays into videos at specific times and positions, defining font, color, and placement for enhanced video editing and customization.
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:MM:SS, or seconds). - 'end_time': str or float - End time (HH:MM:SS, 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 |