Loading...
Loading...
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, 剪辑,视频制作,视频拼接,视频合成,or needs to process media files into videos.
npx skill4agent add aliyun/alibabacloud-aiops-skills alibabacloud-video-editorreferences/Pre-check: Install Python Dependenciesbashpip install -r requirements.txt
Pre-check: Alibaba Cloud Credentials RequiredScripts automatically obtain credentials via the Alibaba Cloud default credential chain, supporting the following methods (in priority order):
- Environment variable credentials
- Configuration file:
~/.alibabacloud/credentials.ini- ECS RAM Role (when running on ECS)
It is recommended to use thecommand to set up credentials:aliyun configurebashaliyun configureOr refer to the [Alibaba Cloud Credential Configuration Documentation](https://help.aliyun.com/document_detail/China Site/2China Site/Chinese2Chinese10China Site/Chinese0China Site/Chinese6China Site/Chinese2China Site.html) to configure the default credential chain.
OSS Bucket ConfigurationOSS upload functionality requires Bucket information to be configured via environment variables:bashexport OSS_BUCKET=your_bucket_name export OSS_ENDPOINT=oss-cn-shanghai.aliyuncs.comIf 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 ConfigurationAll Alibaba Cloud service calls must set User-Agent to. The scriptAlibabaCloud-Agent-Skillshas already automatically configured this User-Agent.scripts/video_editor.py
references/| Document | Applicable Scenario |
|---|---|
| Timeline basic structure explanation |
| Multi-track audio mixing |
| Subtitle and title effects |
| Visual effects and transitions |
| Slideshow video templates |
| Multi-clip video editing |
{
"VideoTracks": [...],
"AudioTracks": [...],
"SubtitleTracks": [...]
}# 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 | Required |
|---|---|---|
| Timeline JSON file path or JSON string | Yes |
| Output configuration JSON file path or JSON string | Yes |
| Region ID (default: cn-shanghai) | No |
| Wait for task completion | No |
{
"MediaURL": "https://{your-bucket}.oss-cn-shanghai.aliyuncs.com/{your-target-video-path}",
"Width": 1080,
"Height": 1920
}JobId# 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> --waitSuccess{
"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": []
}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