返回顶部
a

alibabacloud-video-editor阿里云视频编辑

Video editing tool that requires no ffmpeg installation. All video processing is executed in the cloud - no local ffmpeg installation needed. If both input and output are URLs or Alibaba Cloud OSS, this skill is the preferred choice. Can generate Timeline configuration based on editing requirements and material information, submit Alibaba Cloud editing tasks, wait for task completion, and output the final video URL. Use when the user wants to edit videos, mentions video editing, clipping, 剪辑,视频制

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 0.0.1
安全检测
已通过
116
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

alibabacloud-video-editor

视频编辑技能

基于提供的素材和编辑需求,自动提交阿里云剪辑任务,无需安装ffmpeg,等待任务完成并输出最终视频URL的自动化视频编辑工具。

核心设计理念

本技能采用关注点分离设计:

  1. 1. references/ - LLM知识库,包含各种场景的最佳实践文档
  2. scripts/ - 纯执行工具,仅负责提交任务和轮询状态

LLM应参考references/中的文档生成阿里云ICE格式的Timeline JSON,然后使用脚本提交任务。

前置条件

预检查:安装Python依赖
bash
pip install -r requirements.txt

预检查:需要阿里云凭证

脚本通过阿里云默认凭证链自动获取凭证,支持以下方式(按优先级):

  1. 1. 环境变量凭证
  2. 配置文件:~/.alibabacloud/credentials.ini
  3. ECS RAM角色(在ECS上运行时)

建议使用aliyun configure命令配置凭证:
bash
aliyun configure

或参考阿里云凭证配置文档配置默认凭证链。

OSS Bucket配置

OSS上传功能需要通过环境变量配置Bucket信息:
bash
export OSSBUCKET=yourbucket_name
export OSS_ENDPOINT=oss-cn-shanghai.aliyuncs.com

如果未配置OSS_BUCKET,则列出客户当前账号下的Bucket,让客户选择一个作为最终视频的输出Bucket。

OSS操作复用阿里云默认凭证链,无需单独配置OSS凭证。

User-Agent配置

所有阿里云服务调用必须将User-Agent设置为AlibabaCloud-Agent-Skills。
脚本scripts/video_editor.py已自动配置此User-Agent。

工作流程

步骤1:理解用户需求

分析用户想要创建的视频类型:

  • - 幻灯片视频(图片轮播)
  • 多轨音频混音(配音+音乐)
  • 多片段拼接
  • 添加字幕/标题
  • 特效和转场
  • 画中画/分屏效果

步骤2:参考最佳实践

查阅references/中对应的文档:

文档适用场景
01-timeline-basics.md时间线基本结构说明
02-multi-track-audio.md
多轨音频混音 |
| 03-subtitles-and-titles.md | 字幕和标题效果 |
| 04-effects-and-transitions.md | 视觉效果和转场 |
| 05-slideshow-template.md | 幻灯片视频模板 |
| 06-multi-clip-editing.md | 多片段视频剪辑 |

步骤3:准备素材URL

  • - 如果是本地文件,需要调用oss-upload技能上传并获取OSS URL,可直接拼接到时间线中
  • 如果已有URL,可直接拼接到时间线中

步骤4:生成Timeline JSON

根据参考文档生成阿里云ICE格式的Timeline:

json
{
VideoTracks: [...],
AudioTracks: [...],
SubtitleTracks: [...]
}

步骤5:提交剪辑任务

使用脚本提交任务(基于阿里云Common SDK):

bash

提交并等待完成


python scripts/video_editor.py submit \
--timeline timeline.json \
--output-config output.json \
--wait

仅提交,不等待

python scripts/video_editor.py submit \ --timeline timeline.json \ --output-config output.json

参数说明:

参数说明是否必填
--timeline, -tTimeline JSON文件路径或JSON字符串
--output-config, -o
输出配置JSON文件路径或JSON字符串 | 是 |
| --region, -r | 区域ID(默认:cn-shanghai) | 否 |
| --wait, -w | 等待任务完成 | 否 |

OutputMediaConfig示例:
json
{
MediaURL: https://{your-bucket}.oss-cn-shanghai.aliyuncs.com/{your-target-video-path},
Width: 1080,
Height: 1920
}

如果上下文中未明确指定输出分辨率,使用常用分辨率:10801920、19201080

任务提交后会返回JobId。

步骤6:轮询任务状态

使用脚本查询/等待任务完成:
bash

查询状态


python scripts/videoeditor.py status --job-id id>

等待任务完成

python scripts/videoeditor.py status --job-id id> --wait

当任务状态为Success时,根据返回的MediaId调用GetMediaInfo获取带鉴权的OSS URL,并返回。

Timeline示例

最简单的幻灯片

json
{
VideoTracks: [{
VideoTrackClips: [
{
Type: Image,
MediaURL: https://bucket.oss-cn-shanghai.aliyuncs.com/image1.jpg,
In: 0,
Out: 5,
TimelineIn: 0,
TimelineOut: 5
},
{
Type: Image,
MediaURL: https://bucket.oss-cn-shanghai.aliyuncs.com/image2.jpg,
In: 0,
Out: 5,
TimelineIn: 5,
TimelineOut: 10,
Effects: [
{
Type: Transition,
SubType: linearblur,
Duration:0.3
}
]
}
]
}],
AudioTracks: [{
AudioTrackClips: [{
Type: Audio,
MediaURL: https://bucket.oss-cn-shanghai.aliyuncs.com/music.mp3,
In: 0,
Out: 10,
TimelineIn: 0,
TimelineOut: 10,
Effects: [
{
Type: Volume,
Gain: 0.3
}
]
}]
}],
SubtitleTracks: []
}

LLM提示建议

生成Timeline时,按以下思路思考:

  1. 1. 用户需要什么类型的视频?→ 查找对应的参考文档
  2. 需要哪些轨道?(视频轨道、音频轨道、字幕轨道)
  3. 每个轨道中有哪些片段?
  4. 是否需要设置In/Out/TimelineIn/TimelineOut(简单拼接不需要设置)?如果需要设置,In/Out/TimelineIn/TimelineOut分别是什么?
  5. 是否需要特效、转场、音量调整等?
  6. 生成完整的JSON

相关文件

alibabacloud-video-editor/
├── SKILL.md # 本文档
├── references/
│ ├── 01-timeline-basics.md # 时间线基础
│ ├── 02-multi-track-audio.md # 多轨音频
│ ├── 03-subtitles-and-titles.md # 字幕和标题
│ ├── 04-effects-and-transitions.md # 特效和转场
│ ├── 05-slideshow-template.md # 幻灯片模板
│ └── 06-multi-clip-editing.md # 多片段剪辑
└── scripts/
├── requirements.txt # Python依赖
└── video_editor.py # Common SDK脚本

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 alibabacloud-video-editor-1775878263 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 alibabacloud-video-editor-1775878263 技能

通过命令行安装

skillhub install alibabacloud-video-editor-1775878263

下载

⬇ 下载 alibabacloud-video-editor v0.0.1(免费)

文件大小: 19.27 KB | 发布时间: 2026-4-12 08:53

v0.0.1 最新 2026-4-12 08:53
- Initial release of alibabacloud-video-editor.
- Cloud-based video editing with no need for local ffmpeg installation.
- Supports generating Alibaba Cloud ICE Timeline configurations for various editing scenarios (slideshow, audio mixing, multi-clip, subtitles, effects, and more).
- Automates task submission, polling, and retrieval of the final video URL from Alibaba Cloud.
- OSS integration included for handling local and remote media files via Alibaba Cloud's credential chain.
- Comprehensive documentation provided for workflow, best practices, and configuration.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large