AI Agent Hub
Back to skills
Tencent MPS icon

Tencent MPS

Design & Media Updated 2026.08.30

Paste the following prompt into your AI chat to install this skill:

Please install @tencent-adm/tencent-mps following the guide at https://skillhub.cn/install/skillhub.md.

About this skill

Problem Solved

In media processing development, developers frequently handle tasks like video transcoding, image enhancement, and AIGC content generation, which involve complex calls to Tencent Cloud MPS APIs, including asynchronous task management, parameter configuration, and cost control. Manually scripting these operations is time-consuming and prone to errors due to misconfigured parameters or poor task status tracking. This skill simplifies the workflow by providing a set of pre-built Python scripts, allowing developers to focus on business logic.

Core Capabilities and Workflow

Based on Tencent Cloud's official SDK, this skill covers the entire media processing chain:
- Basic Processing: Use mps_transcode.py for transcoding or compression, mps_enhance.py for quality enhancement or audio separation.
- Advanced Operations: Leverage mps_aigc_video.py for video generation, mps_imageprocess.py for image processing, including watermark erasure or super-resolution.
- Task Management: Scripts poll task status by default (e.g., mps_get_video_task.py), support --no-wait for asynchronous submission, and display TaskId in 🆔 任务 ID: format.

Key workflow steps:
1. Environment Setup: Configure variables like TENCENTCLOUD_API_SECRET_ID in ~/.env, and use mps_load_env.py for validation.
2. Script Selection: Match scripts to needs—e.g., mps_image_cutout.py for image cutout, mps_aigc_image.py for AIGC image generation.
3. Command Execution: Run python3 scripts/<script>.py [parameters], with scripts handling API calls and returning results automatically.
4. Result Handling: Output download links in Markdown hyperlink format, and enforce TaskId display for manual queries.

Boundaries and Considerations

  • Cost Sensitivity: Processing scripts (e.g., mps_erase.py, mps_aigc_video.py) incur fees; confirm commands before execution and set up cost alerts in Tencent Cloud. Use --dry-run for preview.
  • Task Differentiation: Strictly map operations to scripts—e.g., video erasure uses mps_erase.py, while image erasure uses mps_imageprocess.py; clarify task types for queries (e.g., video/audio vs. image).
  • Environment Dependencies: Requires installation of SDKs like tencentcloud-sdk-python, and scripts must be run from the correct directory; avoid substituting with external tools like ffmpeg.
  • Asynchronous Limits: Long tasks may timeout, requiring manual status queries; even if TaskId contains WorkflowTask, confirm the task type.

Use Cases

  • When needing to convert a batch of vertical short videos to horizontal format for different platforms, use the orientation conversion script to adapt formats, with algorithm selection to balance quality and efficiency.
  • Before listing products on e-commerce platforms, use image background fusion to auto-generate marketing backgrounds for product photos, or use try-on functions to display different clothing effects.
  • To add subtitles to short video content, use the speech recognition script to extract text from audio and generate SRT files, supporting multi-language recognition.
  • When video has blurry quality issues, use the quality enhancement function to upscale it to 1080P or 4K resolution, with optional audio separation for independent processing.

Best For

  • Media operations staff handling multi-platform distribution: Need to transcode videos to various formats (e.g., MP4, MOV) for social media requirements in one click while preserving quality.
  • E-commerce visual designers: Need to quickly generate diverse backgrounds for product images or use AI try-on functions to display clothing effects, enhancing marketing efficiency.
  • Short video creators: Need to automatically extract subtitles from recorded videos or apply noise reduction and enhancement to low-light footage to improve viewing experience.
  • Film and video post-production professionals: Need to restore old video materials with super-resolution and anti-shake processing to meet high-definition publishing standards.