Overlay Skill
This skill adds a variety of professional packaging and motion graphics to videos, enhancing their overall quality. It supports both FFmpeg and MoviePy as backend engines and provides a rich set of preset templates and flexible custom parameters.
Core Features
| Feature | Description | Example Use Case |
|---|
| Intro/Outro | Add an engaging opening or a professional closing. | Brand logo animation, "Thanks for watching" screen. |
| Subtitles/Titles |
Overlay static or dynamic text information. | Dialogue subtitles, chapter titles, call-to-action text. |
|
Transitions | Create smooth or dynamic transitions between clips. | Fade between scenes, wipe to reveal next shot. |
|
Watermark/Borders | Add copyright information or decorative borders. | Channel logo in corner, cinematic black bars. |
|
Lower Thirds | Display names, locations, or other info. | Interviewee name and title, location identifier. |
Workflow
To use this skill, the agent follows these general steps:
- 1. Select Feature: Choose one of the five core features based on the user's request.
- Choose Style/Template: Select a preset style from
templates/presets.json (e.g., modern, cyberpunk, business). - Configure Parameters: Provide the necessary parameters to the appropriate script (e.g., text content, image paths, colors, positions).
- Execute Script: Run the corresponding Python script from the
/scripts directory to generate the effect. - Preview & Deliver: The final video is generated and presented to the user.
Usage Guide (for Agent Development)
This section details the command-line interface for each script, intended for agent developers to understand how to execute the skill's functions.
1. Intro/Outro
Script: INLINECODE5
CODEBLOCK0
2. Subtitles/Titles
Script: INLINECODE6
CODEBLOCK1
3. Transitions
Script: INLINECODE7
CODEBLOCK2
4. Watermark/Borders
Script: INLINECODE8
CODEBLOCK3
5. Lower Thirds
Script: INLINECODE9
CODEBLOCK4
Resources
- -
/scripts/: Contains the Python implementation code for all features. /templates/presets.json: A JSON file containing preset styles for intros, subtitles, and lower thirds./references/ffmpeg_moviepy_cheatsheet.md: A cheatsheet with common commands and tips for FFmpeg and MoviePy.
叠加技能
该技能可为视频添加多种专业包装和动态图形,提升整体质量。它支持FFmpeg和MoviePy作为后端引擎,并提供丰富的预设模板和灵活的自定义参数。
核心功能
| 功能 | 描述 | 使用示例 |
|---|
| 片头/片尾 | 添加引人入胜的开场或专业收尾。 | 品牌标志动画、感谢观看画面。 |
| 字幕/标题 |
叠加静态或动态文字信息。 | 对话字幕、章节标题、行动号召文字。 |
|
转场 | 在片段之间创建流畅或动态的过渡效果。 | 场景淡入淡出、擦除揭示下一镜头。 |
|
水印/边框 | 添加版权信息或装饰性边框。 | 角落频道标志、电影黑边。 |
|
下三分之一 | 显示姓名、地点或其他信息。 | 受访者姓名和头衔、地点标识。 |
工作流程
使用此技能时,智能体遵循以下一般步骤:
- 1. 选择功能:根据用户请求选择五个核心功能之一。
- 选择样式/模板:从templates/presets.json中选择预设样式(例如modern、cyberpunk、business)。
- 配置参数:为相应脚本提供必要参数(例如文字内容、图片路径、颜色、位置)。
- 执行脚本:运行/scripts目录中对应的Python脚本以生成效果。
- 预览与交付:生成最终视频并呈现给用户。
使用指南(面向智能体开发)
本节详细说明每个脚本的命令行接口,供智能体开发者了解如何执行技能功能。
1. 片头/片尾
脚本:addintrooutro.py
bash
python /home/ubuntu/skills/overlay-skill/scripts/addintrooutro.py --input <视频> --output <视频> --type --text 您的文字 --template <名称>
2. 字幕/标题
脚本:add_subtitles.py
bash
python /home/ubuntu/skills/overlay-skill/scripts/add_subtitles.py --input <视频> --output <视频> --text 您的文字 --start HH:MM:SS --end HH:MM:SS --style <名称>
3. 转场
脚本:add_transition.py
bash
python /home/ubuntu/skills/overlay-skill/scripts/add_transition.py --input1 <视频1> --input2 <视频2> --output <视频> --type
4. 水印/边框
脚本:add_watermark.py
bash
python /home/ubuntu/skills/overlay-skill/scripts/add_watermark.py --input <视频> --output <视频> --image <图片> --position <位置> --border-color <颜色>
5. 下三分之一
脚本:addlowerthird.py
bash
python /home/ubuntu/skills/overlay-skill/scripts/addlowerthird.py --input <视频> --output <视频> --title 标题 --subtitle 副标题 --template <名称>
资源
- - /scripts/:包含所有功能的Python实现代码。
- /templates/presets.json:包含片头、字幕和下三分之一预设样式的JSON文件。
- /references/ffmpegmoviepycheatsheet.md:包含FFmpeg和MoviePy常用命令和技巧的速查表。