alibabacloud-video-forge
Alibaba Cloud Media Processing Service (MPS) one-stop video processing skill. Use when users need video processing, transcoding, snapshot generation, content moderation, or video upload. For video distribution scenarios, complete video upload, snapshot, multi-resolution transcoding, and content moderation in a single workflow for efficient standardized video asset production.
What this skill does
# 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](references/security-guidelines.md) for credential security rules. ## ๐ Quick Start **Easiest Way** - One-click video processing: ```bash # 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 ```bash python scripts/video_workflow.py \ --input my_video.mov \ --preset 720p \ --generate-cover \ --scenes porn terrorism ad ``` #### Scenario 2: UGC Content Moderation ```bash python scripts/mps_audit.py --oss-object /input/user_uploaded.mp4 ``` #### Scenario 3: Multi-Resolution Transcoding ```bash 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](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](references/security-guidelines.md) for complete security guidelines and credential management best practices. ## SDK Installation See [references/sdk-installation.md](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: ```bash # 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 ```bash 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 ```bash 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: ```bash 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) ```bash # 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 ```bash python scripts/mps_audit.py --oss-object /input/video.mp4 ``` #### Step 6: Poll Task Status ```bash python scripts/poll_task.py --job-id <job-id-from-step-4> --job-type transcode --region cn-shanghai ``` #### Complete Example ```bash # 1. Activate virtual environment source .venv/bin/activate # 2. Upload video python scripts/oss_upload.py --local
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.