← 返回 Skills 市场
sdk-team

Alibabacloud Video Forge

作者 alibabacloud-skills-team · GitHub ↗ · v0.0.2 · MIT-0
cross-platform ⚠ suspicious
111
总下载
0
收藏
0
当前安装
2
版本数
在 OpenClaw 中安装
/install alibabacloud-video-forge
功能描述
Alibaba Cloud Media Processing Service (MPS) one-stop video processing skill. Use when users need video processing, transcoding, snapshot generation, content...
使用说明 (SKILL.md)

Alibaba Cloud Video Forge

One-stop video processing through Alibaba Cloud Media Processing Service (MPS), including cover generation, multi-resolution transcoding, content moderation, and more.

Prerequisites

Pre-check: Aliyun CLI >= 3.3.3 required Run aliyun version to verify >= 3.3.3. If not installed or version too low, run curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash to update, or see references/cli-installation-guide.md for installation instructions.

Pre-check: Aliyun CLI plugin update required [MUST] run aliyun configure set --auto-plugin-install true to enable automatic plugin installation. [MUST] run aliyun plugin update to ensure that any existing plugins are always up-to-date.

Pre-check: AI-Mode Configuration required [MUST] Before using aliyun CLI commands, configure AI-Mode:

  • aliyun configure ai-mode enable
  • aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-video-forge"
  • aliyun configure ai-mode disable

Pre-check: Python >= 3.10 required Run python3 --version to verify.

Pre-check: Alibaba Cloud Credentials Required

Run aliyun configure list to check credential status. If no valid profile, configure via aliyun configure. See references/security-guidelines.md for credential security rules.

🚀 Quick Start

Easiest Way - One-click video processing:

# Method 1: Use end-to-end workflow script (Recommended)
python scripts/video_workflow.py --input /path/to/video.mp4

# Method 2: Check environment first
python scripts/health_check.py

# Method 3: Execute steps manually
python scripts/oss_upload.py --local-file video.mp4 --oss-key input/video.mp4
python scripts/mps_transcode.py --oss-object input/video.mp4 --preset multi
python scripts/mps_audit.py --oss-object input/video.mp4

Common Scenarios

Scenario 1: Bilibili Video Publishing

python scripts/video_workflow.py \
  --input my_video.mov \
  --preset 720p \
  --generate-cover \
  --scenes porn terrorism ad

Scenario 2: UGC Content Moderation

python scripts/mps_audit.py --oss-object /input/user_uploaded.mp4

Scenario 3: Multi-Resolution Transcoding

python scripts/mps_transcode.py \
  --oss-object /input/course_video.mp4 \
  --preset multi \
  --output-prefix output/course_2024/

Scenario Description

This skill supports video distribution scenarios:

  1. Transcoding — Multi-resolution transcoding with Narrowband HD compression
  2. Content Moderation — Auto-detect sensitive content (pornography, terrorism, advertising)
  3. Snapshot — Generate cover images and sprite sheets
  4. Anti-piracy — Configure encryption for content protection

Architecture

OSS Bucket + MPS Pipeline + Transcoding Templates + Moderation Service

Components:

  • OSS: Store videos and outputs
  • MPS Pipeline: Task queue management
  • Transcoding Templates: Narrowband HD, Standard presets
  • Moderation: Auto content safety checks

Target Users: Video platforms, content creators, corporate training, education platforms

Capability Overview

See references/capability-overview.md for detailed feature tree and automatic pipeline management.

Environment Variables

Required environment variables:

  • ALIBABA_CLOUD_REGION - Service region (default: cn-shanghai)
  • ALIBABA_CLOUD_OSS_BUCKET - OSS Bucket name
  • ALIBABA_CLOUD_OSS_ENDPOINT - OSS endpoint
  • ALIBABA_CLOUD_MPS_PIPELINE_ID - MPS Pipeline ID (optional, auto-selected if not set)

Security Note: Credentials are managed via the Alibaba Cloud default credential chain. Configure credentials using aliyun configure command. NEVER handle AK/SK directly in scripts or commands.

🔒 Security Guidelines

See references/security-guidelines.md for complete security guidelines and credential management best practices.

SDK Installation

See references/sdk-installation.md for detailed installation guide and troubleshooting.

Run python3 --version to verify. Some scripts may fail with older Python versions.

RAM Permissions

[MUST] RAM Permission Pre-check: Verify that the current user has the following RAM permissions before execution. See references/ram-policies.md for complete permission list and details.

[MUST] Permission Failure Handling: When any command or API call fails due to permission errors at any point during execution, follow this process:

  1. Read references/ram-policies.md to get the full list of permissions required by this SKILL
  2. Use ram-permission-diagnose skill to guide the user through requesting the necessary permissions
  3. Pause and wait until the user confirms that the required permissions have been granted

Parameter Confirmation

IMPORTANT: Parameter Confirmation — Before executing any command or API call, ALL user-customizable parameters (e.g., input video path, output bucket, template ID, etc.) MUST be confirmed with the user. Do NOT assume or use default values without explicit user approval.

Parameter Required/Optional Description Default
input-url Required Input video URL or local path -
output-bucket Optional Output OSS Bucket Environment variable value
output-path Optional Output path prefix output/
template-id Optional Transcoding template ID System preset template
resolutions Optional Transcoding resolution list 720p,1080p
audit Optional Whether to perform content moderation true
pipeline-id Optional MPS Pipeline ID Auto-select

Core Workflow

Scenario 1: One-stop Video Standardization

Complete workflow: User provides video → Upload to OSS → Media info probe → Cover generation (snapshot) → Multi-resolution transcoding → Content moderation → Summary results (with download links)

Step 0: Automatic Pipeline Selection (Optional)

This skill supports automatic pipeline management, typically no manual Pipeline ID configuration needed. Scripts automatically select appropriate pipelines based on task type.

To manually specify:

# Method 1: Set environment variable (highest priority)
export ALIBABA_CLOUD_MPS_PIPELINE_ID="your-pipeline-id"

# Method 2: Command line parameter
python scripts/mps_transcode.py --oss-object /input/video.mp4 --pipeline-id your-pipeline-id

# Method 3: Use script auto-selection
export ALIBABA_CLOUD_MPS_PIPELINE_ID=$(python scripts/mps_pipeline.py --select)

Step 1: Upload Video to OSS

source .venv/bin/activate
python scripts/oss_upload.py --local-file /path/to/video.mp4 --oss-key input/video.mp4

Step 2: Media Info Probe

python scripts/mps_mediainfo.py --oss-object /input/video.mp4

Step 3: Cover Generation (Snapshot)

Use snapshot function to generate video cover at specified time:

python scripts/mps_snapshot.py --oss-object /input/video.mp4 --mode normal --time 5000

Step 4: Adaptive Transcoding (Auto-select best resolution and Narrowband HD template)

# Adaptive mode: Auto-detect source video resolution, select best quality, use Narrowband HD template
python scripts/mps_transcode.py --oss-object /input/video.mp4

# Or manually specify multi-stream transcoding
python scripts/mps_transcode.py \
  --oss-object /input/video.mp4 \
  --preset multi

Step 5: Content Moderation

python scripts/mps_audit.py --oss-object /input/video.mp4

Step 6: Poll Task Status

python scripts/poll_task.py --job-id \x3Cjob-id-from-step-4> --job-type transcode --region cn-shanghai

Complete Example

# 1. Activate virtual environment
source .venv/bin/activate

# 2. Upload video
python scripts/oss_upload.py --local-file ./my_video.mp4 --oss-key input/my_video.mp4

# 3. Get media info
python scripts/mps_mediainfo.py --oss-object /input/my_video.mp4

# 4. Cover generation (snapshot at 5 seconds)
python scripts/mps_snapshot.py --oss-object /input/my_video.mp4 --mode normal --time 5000

# 5. Submit transcoding job (adaptive mode: auto-select best resolution)
python scripts/mps_transcode.py \
  --oss-object /input/my_video.mp4
# Save the returned job-id

# 6. Poll transcoding job status
python scripts/poll_task.py --job-id \x3Cjob-id> --job-type transcode --region cn-shanghai --interval 10

# 7. Content moderation
python scripts/mps_audit.py --oss-object /input/my_video.mp4

# 8. Download processed video to local
python scripts/oss_download.py --oss-key output/transcode/transcoded.mp4 --local-file ./output_video.mp4

Other Scenarios

Scenario 2: Transcoding Only

Execute transcoding only, without snapshot and moderation:

source .venv/bin/activate
python scripts/mps_transcode.py \
  --oss-object /input/video.mp4 \
  --preset 1080p \
  --template-id "your-template-id"

Scenario 3: Content Moderation

Execute content moderation only:

source .venv/bin/activate
python scripts/mps_audit.py \
  --oss-object /input/video.mp4 \
  --scenes porn terrorism ad

Success Verification

After video processing, check results:

  1. Script exit code is 0
  2. Output contains processed media info (OSS path)
  3. Transcoding job status is "Success"
  4. Content moderation shows no violations
  5. Artifacts downloaded locally (using oss_download.py)

Notes on Artifact Retrieval:

  • OSS files require signing for online access, direct URL access returns 403 error
  • Recommend using oss_download.py to download results locally
  • For online preview, use --sign-url parameter to generate temporary pre-signed URL
# Verify transcoding success
python scripts/poll_task.py --job-id \x3Cjob-id> --job-type transcode --region cn-shanghai
# Expected output: Status: Success

# Verify moderation result
python scripts/mps_audit.py --query-job-id \x3Caudit-job-id>
# Expected output: Moderation passed, no violations

Troubleshooting

See references/troubleshooting.md for comprehensive troubleshooting guide.


Cleanup

Intermediate files and output files from this skill are stored in OSS. To clean up:

# Delete single file
python scripts/oss_delete.py --oss-key output/transcode/video.mp4

# Delete all files under directory (recursive delete)
python scripts/oss_delete.py --prefix output/ --recursive

# Force delete (skip confirmation, for script automation)
python scripts/oss_delete.py --oss-key output/video.mp4 --force

# Preview mode (view files to be deleted without actually deleting)
python scripts/oss_delete.py --prefix output/ --recursive --dry-run

Note: Delete operations are irreversible. Confirm before executing. Use --dry-run to preview first.

Available Scripts

Script Description
scripts/load_env.py Environment variable loader, auto-scan and load Alibaba Cloud credentials
scripts/poll_task.py MPS async task poller, query task status
scripts/oss_upload.py Upload local file to OSS
scripts/oss_download.py Download file from OSS to local
scripts/oss_list.py List files in OSS Bucket
scripts/oss_delete.py Delete OSS files or directories (supports recursive delete)
scripts/mps_mediainfo.py Get media file info (resolution, bitrate, duration, etc.)
scripts/mps_snapshot.py Snapshot and sprite sheet generation (supports normal/sprite mode)
scripts/mps_transcode.py Video transcoding (supports adaptive Narrowband HD, multi-resolution presets, custom parameters)
scripts/mps_audit.py Content safety moderation (supports multiple moderation scenarios)
scripts/mps_pipeline.py Pipeline list query and auto-selection (get Pipeline ID)

Best Practices

  1. Always check environment variables first — Run python scripts/load_env.py --check-only at the start of each session
  2. Use polling instead of waiting — Use poll_task.py to auto-poll status after submitting jobs
  3. Choose resolutions wisely — Select appropriate transcoding resolutions based on target user devices
  4. Enable content moderation — For UGC content, always enable automatic moderation
  5. Use virtual environment — Ensure dependency isolation to avoid version conflicts
  6. Automatic pipeline management — No need to manually configure Pipeline ID, scripts auto-select appropriate pipelines based on task type

Reference Documentation

Document Description
references/ram-policies.md Complete RAM permission policy list
references/params.md Script parameter documentation
references/scripts-detail.md Detailed script usage examples
references/verification-method.md Success verification methods
references/related-commands.md Related CLI commands
references/cli-installation-guide.md Aliyun CLI installation guide
references/acceptance-criteria.md Testing acceptance criteria

AI-Mode Configuration

[MUST] AI-Mode Setup for Aliyun CLI — Before using aliyun CLI commands, you must configure AI-Mode to enable proper tracking and plugin management.

Enable AI-Mode

Enable AI-Mode for enhanced functionality:

aliyun configure ai-mode enable

Configure User-Agent

Set the User-Agent for proper skill identification:

aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-video-forge"

Disable AI-Mode

Disable AI-Mode when no longer needed:

aliyun configure ai-mode disable

Note: AI-Mode must be enabled before executing any aliyun CLI commands to ensure proper functionality tracking and plugin compatibility.

CLI Command Standards

Important: User-Agent is automatically applied via AI-Mode configuration. After running aliyun configure ai-mode set-user-agent --user-agent "AlibabaCloud-Agent-Skills/alibabacloud-video-forge", all subsequent aliyun CLI commands will include the correct User-Agent automatically. No need to add --user-agent parameter to each command.

安全使用建议
This skill's code and docs appear to implement Alibaba Cloud MPS workflows and need legitimate access to OSS/MPS, but there are a few red flags you should consider before installing or running it: - Metadata mismatch: The registry metadata claims no required binaries or env vars, but the SKILL.md and scripts require Python >=3.10, the Aliyun CLI (>=3.3.3), and environment variables such as ALIBABA_CLOUD_OSS_BUCKET / ALIBABA_CLOUD_OSS_ENDPOINT / ALIBABA_CLOUD_REGION. Don’t rely on the registry summary — inspect SKILL.md and scripts first. - Remote installer: The quick-start recommends running curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash. Although this points to Alibaba's CDN, downloading-and-piping scripts to shell is high-risk; review the installer manually (download, inspect, then run) or install the CLI via your OS package manager instead. - Permissions: The provided RAM policies grant broad MPS permissions (the docs explain MPS requires Resource: "*"). Follow the docs' advice: prefer least-privilege where possible, use conditional restrictions (IP/time) and prefer temporary STS tokens rather than long-lived AK/SK. - Run in a controlled environment first: Test in a sandbox or isolated VM/account and confirm behavior (what files are created, what API calls are made). Review scripts (they are included) for any unexpected network calls or file operations. - Parameter confirmation and credential handling: The skill instructs you to confirm all parameters before execution and to not print or extract credentials. Ensure your agent enforces that and does not surface secrets in logs. If you are comfortable after manual review, restrict granted RAM permissions to the minimal set needed for your use case, prefer using short-lived credentials, and avoid running the remote installer without inspection.
功能分析
Type: OpenClaw Skill Name: alibabacloud-video-forge Version: 0.0.2 The skill bundle is a comprehensive and professionally written toolset for Alibaba Cloud Media Processing Service (MPS). It demonstrates significant security maturity by implementing robust input validation, including SSRF protection (blocking private/reserved IP ranges) in `mps_transcode.py` and `mps_audit.py`, and path traversal/system directory protections in `oss_download.py` and `oss_upload.py`. The scripts strictly adhere to Alibaba Cloud security best practices by using the official credential chain and avoiding the manual handling or logging of sensitive AccessKeys.
能力评估
Purpose & Capability
The skill's name, description, docs and many Python scripts consistently implement Alibaba Cloud MPS + OSS video processing functionality — the requested OSS/MPS permissions in the docs are proportionate to that purpose. HOWEVER the registry metadata claims no required environment variables and no required binaries, while SKILL.md and the scripts clearly require Python >=3.10, the Aliyun CLI (>=3.3.3) and environment variables such as ALIBABA_CLOUD_OSS_BUCKET/ENDPOINT/REGION. This metadata omission is an inconsistency that should be corrected before trusting the package.
Instruction Scope
SKILL.md and the references direct the agent to install/upgrade the Aliyun CLI and set CLI configuration (including enabling auto-plugin-install and setting ai-mode user-agent). They also require the agent to use the platform credential chain and to confirm user parameters before acting. Instruction to run a remote install script (curl -fsSL https://aliyuncli.alicdn.com/setup.sh | bash) and to modify CLI config are operations that modify local state and should be reviewed; scripts will perform OSS/MPS operations that require access to cloud credentials and may create/delete objects per their documented behavior.
Install Mechanism
Registry lists no install spec but the repository includes many Python scripts and docs that instruct pip installing third-party packages (alibabacloud-mts20140618, alibabacloud-credentials, oss2). The SKILL.md also suggests curl | bash installer for the Aliyun CLI (download from aliyuncli.alicdn.com). Using an official vendor CDN URL is expected for Aliyun CLI, but download-and-pipe-to-shell is higher-risk behavior and should be verified manually rather than run blindly by an automated agent.
Credentials
The skill needs cloud access to OSS and MPS and the provided RAM policies request broad MPS actions (including Resource: "*") — the docs explicitly explain why MPS requires wildcard resource scope and recommend conditional/IP/time restrictions. Requesting ALIBABA_CLOUD_* env vars and credential access is reasonable for this functionality, but the metadata claiming 'none' is inconsistent. Also confirm you grant only the minimum RAM actions needed (or use short-lived STS tokens) rather than full account keys where possible.
Persistence & Privilege
The skill is not marked always:true and does not request to persistently enable itself. It modifies local Aliyun CLI configuration as part of recommended setup (user-agent and plugin settings), which is within scope for a CLI-based integration but should be acknowledged by the operator before running.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install alibabacloud-video-forge
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /alibabacloud-video-forge 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v0.0.2
**Changelog for alibabacloud-video-forge v0.0.2** - Required Aliyun CLI version updated to >= 3.3.3; install/upgrade instructions now included. - Added mandatory steps to enable and update Aliyun CLI plugins and configure AI-Mode before use. - Prerequisite section reorganized and clarified for simpler setup. - Documentation improvements for environment pre-checks and troubleshooting based on user feedback. - No changes to core feature set or workflow.
v0.0.1
Initial release of Alibaba Cloud Video Forge – a comprehensive video processing skill using Alibaba Cloud Media Processing Service (MPS): - Supports one-stop workflows: upload, cover snapshot, multi-resolution transcoding, and content moderation. - CLI scripts provided for end-to-end or stepwise operations. - Auto pipeline management and environment/configuration checks included. - Designed for video platforms, UGC moderation, education, and secure asset production. - Detailed prerequisites, security guidelines, and parameter confirmation requirements documented.
元数据
Slug alibabacloud-video-forge
版本 0.0.2
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 2
常见问题

Alibabacloud Video Forge 是什么?

Alibaba Cloud Media Processing Service (MPS) one-stop video processing skill. Use when users need video processing, transcoding, snapshot generation, content... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 111 次。

如何安装 Alibabacloud Video Forge?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install alibabacloud-video-forge」即可一键安装,无需额外配置。

Alibabacloud Video Forge 是免费的吗?

是的,Alibabacloud Video Forge 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Alibabacloud Video Forge 支持哪些平台?

Alibabacloud Video Forge 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Alibabacloud Video Forge?

由 alibabacloud-skills-team(@sdk-team)开发并维护,当前版本 v0.0.2。

💬 留言讨论