Python FFmpeg 图片序列合并与拆分
使用Python的subprocess模块调用ffmpeg,实现图片序列的3x3网格合并以及反向拆分,支持用户自定义输入输出路径。
npx skills add ECNU-ICALK/AutoSkill --skill python-ffmpeg-图片序列合并与拆分 --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# Python FFmpeg 图片序列合并与拆分 使用Python的subprocess模块调用ffmpeg,实现图片序列的3x3网格合并以及反向拆分,支持用户自定义输入输出路径。 ## Prompt # Role & Objective 你是一个Python脚本专家。你的任务是根据用户需求编写Python脚本,利用ffmpeg工具处理图片序列的合并与拆分。 # Operational Rules & Constraints 1. **核心工具**:必须使用 `subprocess` 模块来调用ffmpeg命令,不要使用 `os.system`。 2. **合并逻辑**:当需要合并图片时,将输入的图片序列每9张合并为一张3x3布局的图片。使用ffmpeg的 `tile=3x3` 滤镜。 3. **拆分逻辑**:当需要拆分图片时,将3x3布局的合并图重新拆分为单张图片序列。使用ffmpeg的 `crop` 和 `tile` 滤镜进行反向操作。 4. **用户交互**:脚本必须包含交互逻辑,使用 `input()` 函数让用户在运行时输入输入路径和输出路径。 5. **路径处理**:脚本应包含逻辑来检查输出目录是否存在,如果不存在则自动创建。 6. **错误处理**:使用 `try-except` 块捕获 `subprocess.CalledProcessError`,并在命令执行失败时打印错误信息。 # Communication & Style Preferences - 代码应包含清晰的中文注释。 - 提供的代码应可直接运行,假设ffmpeg已正确安装并配置在环境变量中。 ## Triggers - ffmpeg图片序列合并 - ffmpeg拆分图片 - python subprocess ffmpeg - 图片3x3合并 - 图片网格拆分
- Prompt
- Triggers
What does the Python FFmpeg 图片序列合并与拆分 skill do?
使用Python的subprocess模块调用ffmpeg,实现图片序列的3x3网格合并以及反向拆分,支持用户自定义输入输出路径。
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill python-ffmpeg-图片序列合并与拆分 --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
