Skip to content
cccskills
FreePublished on GitHub

batch-process

批量处理:对一个目录里的一批图片/视频/音频统一套用同一操作——批量压缩、加水印、转格式、缩放、转比例、音量归一化等。当用户说 批量处理、批量压缩、批量加水印、批量转格式、一批图片/视频、给这个文件夹、全部转成、批量缩放、批量转竖版、整个目录 时使用。

基于 shared/scripts/batch_process.py(委派 image_ops/video_ops/audio_ops)。与 image-editing/video-editing/audio-editing 区别:那些处理单文件,本 SKILL 批量套用到整个目录。

The English summary is being prepared. Showing the original description.

See how to install

Files included (1)

  • SKILL.md3.3 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

批量处理(目录级)

对整个目录的图片/视频/音频统一套用同一操作。走 skills/shared/scripts/batch_process.py, 逐个委派给对应确定性脚本(image_ops / video_ops / audio_ops)。

单文件处理见 image-editing / video-editing / audio-editing;本 SKILL 是它们的目录批量版。

输入

字段必填说明
目录是待处理文件所在目录
类型是image / video / audio(决定用哪个 ops 脚本 + 文件筛选)
操作是ops 子命令(如 resize/compress/watermark/aspect/convert/normalize)
操作参数视操作写在 -- 之后,原样透传给 ops 脚本

输出(默认 <目录>/batch_out/)

  • 处理后的同名文件;报告成功/失败数。

执行

脚本路径(相对项目根):skills/shared/scripts/batch_process.py(run -h / list -h)。

# 先预览会处理哪些文件
python skills/shared/scripts/batch_process.py list --dir imgs --type image

# 批量压缩图片到 500KB
python skills/shared/scripts/batch_process.py run --dir imgs --type image --op compress \
  --out-dir out -- --max-kb 500

# 批量加水印
python skills/shared/scripts/batch_process.py run --dir imgs --type image --op watermark \
  -- --text "@我的账号" --position bottom-right

# 批量视频转竖版 9:16
python skills/shared/scripts/batch_process.py run --dir clips --type video --op aspect \
  --out-dir out -- --ratio 9:16 --mode pad

# 批量音频转 mp3(改扩展名用 --ext)
python skills/shared/scripts/batch_process.py run --dir raw --type audio --op convert \
  --out-dir out --ext .mp3 -- --bitrate 192k

可用操作(透传给 ops 脚本,<脚本> <op> -h 看参数)

  • image(image_ops):resize / crop / pad / convert / compress / watermark / round / thumbnail
  • video(video_ops):compress / aspect / watermark / speed / gif / frame
  • audio(audio_ops):convert / normalize / denoise / fade / speed / trim

规则

  1. 先 list 预览文件范围,确认无误再 run。
  2. -- 之后的参数原样透传给 ops 脚本;不确定参数先跑单文件版(image-editing 等)验证一次。
  3. 改输出格式用 --ext(如 .mp3/.png),否则沿用原扩展名。
  4. 批处理串行执行(避免高负载);量大时耐心等,失败文件会单独列出不中断整体。
  5. 默认输出到 <目录>/batch_out/,不覆盖原文件。

参考来源

复用项目既有确定性脚本(image_ops/video_ops/audio_ops),本 SKILL 只做目录遍历 + 逐文件 委派 + 结果汇总,不重复实现处理逻辑。

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

通用 AI 生图:文生图 / 图生图 / 图像变体。当用户说 AI 生图、AI 画图、文生图、图生图、生成图片、生成配图、图像生成、AI 出图、AI 作图、换图、改图、图像编辑、给我画一张、生成一张图 时使用。支持 OpenAI 兼容 API 与 apimart 异步 API,用户自备 API key。

The English summary is being prepared. Showing the original description.

ZJU-REAL/Easel3.9KUpdated Oct 18, 2026

AI 音乐 / BGM 生成:给短视频、社媒内容生成原创背景音乐 / 配乐 / 纯音乐。通过可插拔 provider(阿里 DashScope / Suno 类第三方 API)文生音乐,异步提交→轮询→下载,产物可再裁剪/归一化或加到视频。当用户说“AI 音乐”“AI 配乐”“生成 BGM”“背景音乐”“原创音乐”“AI 作曲”“纯音乐”“给视频配乐”“做首曲子”时使用。与 tts-voiceover 的区别:tts-voiceover 生成人声口播/旁白,ai-music 生成背景音乐/配乐(无人声或带演唱)。

The English summary is being prepared. Showing the original description.

ZJU-REAL/Easel3.9KUpdated Oct 18, 2026

AI 视频生成:文生视频 / 图生视频 / 数字人首帧驱动。通过可插拔 provider(通义万相 Wan / 火山 Seedance / 快手可灵 / OpenAI 兼容)异步生成视频,用户自备 API key。当用户说 AI 视频生成、文生视频、图生视频、AI 生成视频、AI 短视频、让图片动起来、数字人视频、生成一段视频 时使用。与 video-strategy(选型/策略)、video-editing(剪辑处理)、clipify(切片)区别:本 SKILL 是从 0 用 AI 生成新视频。

The English summary is being prepared. Showing the original description.

ZJU-REAL/Easel3.9KUpdated Oct 18, 2026

outputs/ 目录下的产物管理:按日期/平台/类型归档、打标签、搜索历史内容、生成素材清单。 当用户说"整理素材"、"归档"、"找之前的内容"、"搜索历史"、"素材管理"、 "outputs 整理"、"之前做的"时使用。 与其他 produce 层 SKILL 的区别:produce 层负责生成内容, asset-manager 负责生成后的产物管理(归档、检索、标签)。

The English summary is being prepared. Showing the original description.

ZJU-REAL/Easel3.9KUpdated Oct 18, 2026

音频降噪:去除录音中的背景噪声、电流声、风噪、嗡嗡声,基于 ffmpeg 滤镜链(afftdn/highpass/lowpass)。 当用户说"降噪""去噪""去杂音""消除背景噪声""电流声""风噪""录音有杂音""音频降噪"时使用。 和 audio-editing 的区别:audio-editing 做剪辑/转码/音量等通用音频操作(内置 denoise 兜底),本 SKILL 专做降噪调参。

The English summary is being prepared. Showing the original description.

ZJU-REAL/Easel3.9KUpdated Oct 18, 2026

通用音频处理:音频剪辑/裁剪、格式转码(mp3/wav/m4a/aac)、音量归一化、从视频提取音轨、多段拼接、淡入淡出、变速(保音高)。当用户说“剪音频”“裁一段”“转成 mp3”“调音量/响度”“提取音轨/扒音频”“拼接音频”“淡入淡出”“加速/减速音频”“变速不变调”时使用。与 audio-denoise 的区别:audio-denoise 专做降噪,audio-editing 做除降噪外的通用音频操作(也内置 denoise 作为兜底)。

The English summary is being prepared. Showing the original description.

ZJU-REAL/Easel3.9KUpdated Oct 18, 2026

See all skills by ZJU-REAL

Report a problem with this skill