← 返回
未分类 Key

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 a...
Video editing tool that requires no ffmpeg installation. All video processing is executed in the cloud - no local ffmpeg installation needed. If both input a...
sdk-team sdk-team 来源
未分类 clawhub v0.0.1 1 版本 99657.5 Key: 需要
★ 0
Stars
📥 291
下载
💾 0
安装
1
版本
#latest

概述

Video Editor Skill

Automated video editing tool that submits Alibaba Cloud editing tasks based on provided materials and editing requirements, without requiring ffmpeg installation, waits for task completion, and outputs the final video URL.

Core Design Philosophy

This skill adopts a separation of concerns design:

  1. references/ - LLM knowledge base containing best practice documentation for various scenarios
  2. scripts/ - Pure execution tools responsible only for submitting tasks and polling status

The LLM should refer to documents in references/ to generate Timeline JSON in Alibaba Cloud ICE format, then use scripts to submit tasks.

Prerequisites

> Pre-check: Install Python Dependencies

> ```bash

> pip install -r requirements.txt

> ```

> Pre-check: Alibaba Cloud Credentials Required

>

> Scripts automatically obtain credentials via the Alibaba Cloud default credential chain, supporting the following methods (in priority order):

> 1. Environment variable credentials

> 2. Configuration file: ~/.alibabacloud/credentials.ini

> 3. ECS RAM Role (when running on ECS)

>

> It is recommended to use the aliyun configure command to set up credentials:

> ```bash

> aliyun configure

> ```

> Or refer to the Alibaba Cloud Credential Configuration Documentation to configure the default credential chain.

> OSS Bucket Configuration

>

> OSS upload functionality requires Bucket information to be configured via environment variables:

> ```bash

> export OSS_BUCKET=your_bucket_name

> export OSS_ENDPOINT=oss-cn-shanghai.aliyuncs.com

> ```

> If OSS_BUCKET is not configured, list the buckets under the customer's current account and let the customer choose one as the output bucket for the final video.

>

> OSS operations reuse the Alibaba Cloud default credential chain; no separate OSS credential configuration is needed.

> User-Agent Configuration

>

> All Alibaba Cloud service calls must set User-Agent to AlibabaCloud-Agent-Skills.

> The script scripts/video_editor.py has already automatically configured this User-Agent.

Workflow

Step 1: Understand User Requirements

Analyze the type of video the user wants to create:

  • Slideshow video (image carousel)
  • Multi-track audio mixing (voiceover + music)
  • Multi-clip stitching
  • Add subtitles/titles
  • Effects and transitions
  • Picture-in-picture/split-screen effects

Step 2: Reference Best Practices

Consult the corresponding documents in references/:

DocumentApplicable Scenario
----------------
01-timeline-basics.mdTimeline basic structure explanation
02-multi-track-audio.mdMulti-track audio mixing
03-subtitles-and-titles.mdSubtitle and title effects
04-effects-and-transitions.mdVisual effects and transitions
05-slideshow-template.mdSlideshow video templates
06-multi-clip-editing.mdMulti-clip video editing

Step 3: Prepare Material URLs

  • If it is a local file, you need to call the oss-upload skill to upload it and obtain the OSS URL, which can be directly spliced into the timeline
  • If you already have a URL, you can directly splice it into the timeline

Step 4: Generate Timeline JSON

Generate a Timeline in Alibaba Cloud ICE format according to the reference documents:

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

Step 5: Submit Editing Task

Use the script to submit the task (based on Alibaba Cloud Common SDK):

# Submit and wait for completion
python scripts/video_editor.py submit \
  --timeline timeline.json \
  --output-config output.json \
  --wait

# Submit only, do not wait
python scripts/video_editor.py submit \
  --timeline timeline.json \
  --output-config output.json

Parameter Description:

ParameterDescriptionRequired
------------------
--timeline, -tTimeline JSON file path or JSON stringYes
--output-config, -oOutput configuration JSON file path or JSON stringYes
--region, -rRegion ID (default: cn-shanghai)No
--wait, -wWait for task completionNo

OutputMediaConfig example:

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

If the output resolution is not explicitly specified in the context, use common resolutions: 10801920, 19201080

After the task is submitted, a JobId will be returned.

Step 6: Poll Task Status

Use the script to query/wait for task completion:

# Query status
python scripts/video_editor.py status --job-id <job_id>

# Wait for task completion
python scripts/video_editor.py status --job-id <job_id> --wait

When the task status is Success, call GetMediaInfo based on the returned MediaId to obtain the OSS URL with authentication, and return it.

Timeline Example

Simplest Slideshow

{
  "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 Prompt Suggestions

When generating a Timeline, think like this:

  1. What type of video does the user need? → Find the corresponding reference document
  2. Which tracks are needed? (video track, audio track, subtitle track)
  3. What clips are in each track?
  4. Do you need to set In/Out/TimelineIn/TimelineOut (simple stitching does not require setting)? If setting is needed, what are In/Out/TimelineIn/TimelineOut respectively?
  5. Are effects, transitions, volume adjustments, etc. needed?
  6. Generate the complete JSON

Related Files

alibabacloud-video-editor/
├── SKILL.md                          # This document
├── references/
│   ├── 01-timeline-basics.md         # Timeline basics
│   ├── 02-multi-track-audio.md       # Multi-track audio
│   ├── 03-subtitles-and-titles.md    # Subtitles and titles
│   ├── 04-effects-and-transitions.md # Effects and transitions
│   ├── 05-slideshow-template.md      # Slideshow templates
│   └── 06-multi-clip-editing.md      # Multi-clip editing
└── scripts/
    ├── requirements.txt              # Python dependencies
    └── video_editor.py               # Common SDK script

版本历史

共 1 个版本

  • v0.0.1 当前
    2026-05-07 16:36 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

Alibabacloud Pds Intelligent Workspace

sdk-team
阿里云 PDS(智能云盘/网盘)文件操作技能。支持:文件搜索、文件上传、文件下载、文档/音视频分析、打包下载、图像编辑(缩放、裁剪、旋转、分割、移除、水印等)、以图搜图、挂载网盘、文件分享链接管理。 当用户提到 PDS、网盘、云盘、个人空间
★ 0 📥 589

Alibabacloud Find Skills

sdk-team
用于搜索、发现、浏览或查找阿里云(Alibaba Cloud)代理技能。触发词包括“查找X技能”“搜索阿里云…”等。
★ 0 📥 1,008

Alibabacloud Lindorm Agent Skill

sdk-team
阿里云Lindorm云原生多模型数据库技能,涵盖实例管理、监控、性能、存储、连接、备份、迁移等。
★ 1 📥 548