跳到正文
cccskills
免费在 GitHub 公开

media-processor

Convert, resize, and compress videos and images, including batches of files. Combine steps such as scaling and compression, specify output formats and quality settings, and check that the resulting files match the requested parameters.

中文简介正在准备中。当前显示英语简介。

原文查看原文说明

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

查看安装方法

适用场景

  • Convert AVI videos to MP4
  • Batch-convert PNG images to JPG
  • Resize and compress videos for sharing
  • Resize images while preserving their proportions

包含的文件(9)

  • SKILL.md4.8 KB
  • references/ffmpeg_guide.md5.1 KB
  • references/imagemagick_guide.md6.9 KB
  • scripts/image_compress.py2.7 KB
  • scripts/image_convert.py2.7 KB
  • scripts/image_scale.py3.0 KB
  • scripts/video_compress.py2.8 KB
  • scripts/video_convert.py2.5 KB
  • scripts/video_scale.py2.8 KB

SKILL.md(原文)

安装前可以查看交给 AI 代理的指令内容。

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)
  • 为每个文件生成对应的输出路径

资源索引

注意事项

  • 确保输入文件路径正确,使用相对路径(./ 开头)
  • 输出路径需要包含完整文件名和扩展名
  • 质量参数范围:图像质量 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

评价

还没有评价。欢迎分享你的使用感受。

评论

无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。

还没有评论。来写第一条吧。

提交后会立即公开。请勿填写邮箱、电话等个人信息。URL 最多 2 个。

0 / 1000 字

此表单受 reCAPTCHA 保护,适用 Google 的隐私权政策和服务条款。

同一仓库的技能

Organize AI agents into execution, management, and review roles for complex projects. Choose preset or custom teams, share project context and decisions, and combine their discussions and work into meeting records, feasibility reports, or implementation outputs.

中文简介正在准备中。当前显示英语简介。

  • Reviewing a technical architecture from several perspectives
  • Discussing product pricing across market and cost considerations
  • Assessing a new product's feasibility
anbeime/skill83502026年10月19日 更新

Generate character images, backgrounds, synthetic speech, and music for product videos featuring 小省导购员, a digital shopping presenter. Coordinate these assets with InfiniteTalk to produce a 25-second vertical video made from five scenes.

中文简介正在准备中。当前显示英语简介。

  • Producing a 25-second vertical product presentation video
  • Generating reference images for the 小省导购员 character
  • Creating business setting backgrounds for a video
anbeime/skill83502026年10月19日 更新

Convert PDF, Word, and Excel documents into structured Markdown for search and knowledge bases. The skill tries three parsers in sequence when needed and returns metadata, a confidence score, and the parser used.

中文简介正在准备中。当前显示英语简介。

  • Prepare documents for retrieval-augmented generation
  • Structure documents for an internal knowledge base
  • Extract structured text from contracts
anbeime/skill83502026年10月19日 更新

Organize parsed documents into four color-coded cards covering facts, explanations, risks, and actions. Preserve source references and generation details so readers can review evidence, identify uncertainty, and consider next steps in research, financial, or legal analysis.

中文简介正在准备中。当前显示英语简介。

  • Separating facts from interpretations in financial reports
  • Organizing evidence and risks in legal documents
  • Turning research documents into evidence-linked analysis cards
anbeime/skill83502026年10月19日 更新

Record operations across multiple AI agents and connect events into a traceable history. Search records by tracking ID, time window, or responsible component to support audits and investigations, with local storage available when the vector database fails.

中文简介正在准备中。当前显示英语简介。

  • Trace task dispatch and execution across agents
  • Search audit records by time or responsible component
  • Keep recording events during vector database failures
anbeime/skill83502026年10月19日 更新

Screen documents and external URLs before they enter a processing workflow. Check blocked domains and document permissions, then produce a pass or reject decision, a risk report, and a tracking ID for later review.

中文简介正在准备中。当前显示英语简介。

  • Screening documents before adding them to a knowledge base
  • Checking external URLs against a domain blocklist
  • Reviewing document permissions before processing
anbeime/skill83502026年10月19日 更新

查看 anbeime 的全部技能

报告此技能的问题