
为视频添加按时间区间显示的文本叠加。 Args: video_path: 输入视频文件路径。 output_video_path: 输出视频文件路径。 text_elements: 文本元素列表,每个元素为字典,常见键: - text: 文本内容(必填)。 - start_time/end_time: 起止时间(秒或 'HH:MM:SS')。 - font_size: 字号(整数,默认 24)。 - font_color: 字体颜色(默认 'white')。 - x_pos/y_pos: 位置表达式或像素(默认居中/底部上方)。 - box: 是否显示背景框(布尔)。 - box_color/box_border_width: 背景框颜色与边框宽度。 - font_file: 字体文件路径(可选)。 - box_padding: 背景框内边距(整数,默认 5)。 Returns: A status message indicating success or failure.
为视频添加按时间区间显示的文本叠加。
Args:
video_path: 输入视频文件路径。
output_video_path: 输出视频文件路径。
text_elements: 文本元素列表,每个元素为字典,常见键:
- text: 文本内容(必填)。
- start_time/end_time: 起止时间(秒或 'HH:MM:SS')。
- font_size: 字号(整数,默认 24)。
- font_color: 字体颜色(默认 'white')。
- x_pos/y_pos: 位置表达式或像素(默认居中/底部上方)。
- box: 是否显示背景框(布尔)。
- box_color/box_border_width: 背景框颜色与边框宽度。
- font_file: 字体文件路径(可选)。
- box_padding: 背景框内边距(整数,默认 5)。
Returns:
A status message indicating success or failure.