Skip to content
Back to skills

Python Ffmpeg 图片序列合并与拆分

ASecurity

使用Python的subprocess模块调用ffmpeg,实现图片序列的3x3网格合并以及反向拆分,支持用户自定义输入输出路径。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpython

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python-ffmpeg-图片序列合并与拆分' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Ffmpeg 图片序列合并与拆分?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python Ffmpeg 图片序列合并与拆分
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-ffmpeg-autoskill/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-ffmpeg-autoskill)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "31dace67-6f4e-4a6e-ad99-cceff82573f5"
name: "Python FFmpeg 图片序列合并与拆分"
description: "使用Python的subprocess模块调用ffmpeg,实现图片序列的3x3网格合并以及反向拆分,支持用户自定义输入输出路径。"
version: "0.1.0"
tags:
  - "python"
  - "ffmpeg"
  - "subprocess"
  - "图片处理"
  - "脚本"
triggers:
  - "ffmpeg图片序列合并"
  - "ffmpeg拆分图片"
  - "python subprocess ffmpeg"
  - "图片3x3合并"
  - "图片网格拆分"
---

# 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合并
- 图片网格拆分

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.