Skip to content
AI & Agents
Skill

/media-processor

影片与视频编辑及自媒体创作者在处理多媒体素材时,当需批量转换音视频或图像格式、调整分辨率及压缩文件时必用。一键调用底层工具自动完成转换与压缩,高效输出符合预期的媒体文件,大幅节省手动处理时间。

From plugin
skill
9.6k127 skills

Claude Code

$ npx -y skills add anbeime/skill --skill media-processor --agent claude-code

SKILL.md

media-processor.SKILL.md
name: media-processor
description: 影片与视频编辑及自媒体创作者在处理多媒体素材时,当需批量转换音视频或图像格式、调整分辨率及压缩文件时必用。一键调用底层工具自动完成转换与压缩,高效输出符合预期的媒体文件,大幅节省手动处理时间。
dependency:
  system:
    - apt-get update && apt-get install -y ffmpeg imagemagick

Media Processor

任务目标

  • 本 Skill 用于:处理视频和图像文件,进行格式转换、分辨率调整、压缩等操作
  • 能力包含:
  • 视频格式转换(MP4/AVI/MOV/MKV 等)
  • 视频分辨率调整和压缩
  • 图像格式转换(JPG/PNG/GIF/WebP 等)
  • 图像分辨率调整和压缩
  • 批量处理支持
  • 触发条件:当用户需要处理视频或图像文件时触发

前置准备

  • 依赖说明:本 Skill 依赖以下系统工具
  • FFmpeg:视频处理工具
  • ImageMagick:图像处理工具
  • 系统依赖安装:Skill 首次使用时将自动安装系统依赖
  apt-get update && apt-get install -y ffmpeg imagemagick

操作步骤

标准流程

1. **需求分析**

  • 识别输入文件类型(视频/图像)
  • 确定目标格式、分辨率、质量要求
  • 评估是否需要批量处理

2. **选择处理方式**

  • 视频处理:调用 `scripts/` 中的视频处理脚本
  • 图像处理:调用 `scripts/` 中的图像处理脚本

3. **执行处理**

  • 对于简单操作(如单一格式转换):直接调用相应脚本
  • 对于复杂操作(如多步骤处理):智能体将调用多个脚本组合使用

4. **结果验证**

  • 检查输出文件是否生成
  • 验证文件格式和参数是否符合预期

常见操作指南

视频格式转换

  • 调用 `scripts/video_convert.py`
  • 参数:input_path(输入路径)、output_path(输出路径)、output_format(目标格式)
  • 示例:将 AVI 转换为 MP4

视频压缩

  • 调用 `scripts/video_compress.py`
  • 参数:input_path、output_path、bitrate(目标码率)、crf(质量控制系数)
  • 示例:压缩视频到 2Mbps

视频分辨率调整

  • 调用 `scripts/video_scale.py`
  • 参数:input_path、output_path、width、height
  • 示例:调整到 1920x1080

图像格式转换

  • 调用 `scripts/image_convert.py`
  • 参数:input_path、output_path、output_format、quality
  • 示例:将 PNG 转换为 JPG

图像缩放

  • 调用 `scripts/image_scale.py`
  • 参数:input_path、output_path、width、height、maintain_aspect
  • 示例:等比缩放到 1024x768

图像压缩

  • 调用 `scripts/image_compress.py`
  • 参数:input_path、output_path、quality、method(压缩方法)
  • 示例:质量设置为 85%

批量处理

  • 当需要处理多个文件时,智能体将循环调用相应脚本
  • 使用通配符模式匹配文件(如 `*.avi`、`images/*.png`)
  • 为每个文件生成对应的输出路径

资源索引

  • 视频处理脚本:
  • [scripts/video_convert.py](scripts/video_convert.py) - 视频格式转换
  • [scripts/video_compress.py](scripts/video_compress.py) - 视频压缩
  • [scripts/video_scale.py](scripts/video_scale.py) - 视频分辨率调整
  • 图像处理脚本:
  • [scripts/image_convert.py](scripts/image_convert.py) - 图像格式转换
  • [scripts/image_scale.py](scripts/image_scale.py) - 图像缩放
  • [scripts/image_compress.py](scripts/image_compress.py) - 图像压缩
  • 参考文档:
  • [references/ffmpeg_guide.md](references/ffmpeg_guide.md) - FFmpeg 参数参考(需要高级参数时读取)
  • [references/imagemagick_guide.md](references/imagemagick_guide.md) - ImageMagick 参数参考(需要高级参数时读取)

注意事项

  • 确保输入文件路径正确,使用相对路径(`./` 开头)
  • 输出路径需要包含完整文件名和扩展名
  • 质量参数范围:图像质量 1-100,视频 CRF 18-28(数值越小质量越高)
  • 处理大文件时请耐心等待,智能体会持续监控执行状态
  • 如果需要自定义参数(如编码器、帧率等),请参考相应参考文档

使用示例

示例1:视频格式转换

# 将 video.avi 转换为 video.mp4
python scripts/video_convert.py \
  --input ./video.avi \
  --output ./video.mp4 \
  --format mp4

示例2:图像批量转换

# 将所有 PNG 转换为 JPG
for file in ./images/*.png; do
  output="${file%.png}.jpg"
  python scripts/image_convert.py \
    --input "$file" \
    --output "$output" \
    --format jpg \
    --quality 85
done

示例3:视频压缩与缩放

# 先缩放再压缩
python scripts/video_scale.py \
  --input ./input.mp4 \
  --output ./temp.mp4 \
  --width 1280 \
  --height 720

python scripts/video_compress.py \
  --input ./temp.mp4 \
  --output ./output.mp4 \
  --bitrate 2M
Read more
@anbeime
Ships withskill

收录最全、更新最快的AI Agent技能库,涵盖文档处理、内容创作、编程开发、机器学习、自动化工作流等多个领域的精选技能包。 🎁 知易多模型知识管家 · 免费试用预约 — 20+ 模型自由切换、技能市场、四色卡片知识库,留邮箱锁定免费试用名额,每周再收一份知易AI周刊。

9.6k127 skills
Get the whole plugin

Stars on GitHub

Momentum

stars in total
9.6k
Star history of anbeime/skill on GitHub, a chart by star-history.com

Other skills on skill.

doc-parse

doc-parse

将 PDF/PPT/Excel/Word 等多格式文档解析为结构化 Markdown,并输出元数据与解析置信度,作为 RAG 与四色卡片的数据底座。

@anbeime@anbeimeInstall Skill
four-color-cards

four-color-cards

基于解析后的文档与用户意图,生成四色卡片——事实蓝卡、解释绿卡、风险黄卡、行动红卡,是八官署方法论的核心分析输出。

@anbeime@anbeimeInstall Skill
provenance

provenance

收集系统全链路操作日志,生成可追溯的执行证据链与向量索引,是多智能体系统可观测性与安全审计的底座。

@anbeime@anbeimeInstall Skill
security-scan

security-scan

对进入系统的文件或 URL 执行安全与合规扫描,输出 pass/reject 判定与扫描报告,作为所有文档处理的强制前置关卡。

@anbeime@anbeimeInstall Skill
RuiC-card-skill

RuiC-card-skill

Generate interactive 3D holographic collectible-card websites from a user description or reference image, using layered artwork,…

@anbeime@anbeimeInstall Skill
agent-team

agent-team

产品经理与项目管理专家在应对复杂项目时,使用此技能可动态组建包含“执行、指挥、评审”的专属AI团队。实时查看多智能体辩论与决策全过程,共享统一上下文记忆,一键完成从会议决策到系统构建的全流程高效协同!

@anbeime@anbeimeInstall Skill

More skills from other plugins.

1password

1password

Set up and use 1Password CLI for sign-in, desktop integration, and reading or injecting secrets.

openclaw2w393k
@openclaw@openclawInstall Skill

Questions about media-processor.

Which coding agents can use media-processor?
media-processor installs in Claude Code, Codex, Cursor, Gemini CLI, GitHub Copilot, OpenCode and Windsurf with the skills CLI, using each agent's flag shown on this page. Flowy's auto-invocation, which fires a skill when your prompt matches, runs in Claude Code only.