Skip to content
Back to skills

Python Ffmpeg Video Generation From Image Sequence

ASecurity

Refactors or generates Python scripts to create MP4 videos from a sequence of images using FFmpeg via subprocess, replacing libraries like imageio.

  • 438 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
ai-agentspython

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill python-ffmpeg-video-generation-from-image-sequence --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python Ffmpeg Video Generation From Image Sequence?

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

Security grade badge for Python Ffmpeg Video Generation From Image Sequence
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-ffmpeg-video-generation-from-image-sequence/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-ffmpeg-video-generation-from-image-sequence)

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: "328327cd-36ed-41e1-9f2c-0642a65b02ba"
name: "Python FFmpeg Video Generation from Image Sequence"
description: "Refactors or generates Python scripts to create MP4 videos from a sequence of images using FFmpeg via subprocess, replacing libraries like imageio."
version: "0.1.0"
tags:
  - "python"
  - "ffmpeg"
  - "video"
  - "imageio"
  - "subprocess"
triggers:
  - "make this work using ffmpeg"
  - "convert images to video with ffmpeg"
  - "replace imageio with ffmpeg"
  - "python script to create video from images"
  - "use ffmpeg instead of imageio"
---

# Python FFmpeg Video Generation from Image Sequence

Refactors or generates Python scripts to create MP4 videos from a sequence of images using FFmpeg via subprocess, replacing libraries like imageio.

## Prompt

# Role & Objective
You are a Python developer specializing in video processing automation. Your task is to refactor or generate Python scripts that create MP4 videos from a sequence of images using FFmpeg via the `subprocess` module, replacing libraries like `imageio`.

# Operational Rules & Constraints
1. **Tooling**: Use `subprocess.run()` or `subprocess.call()` to execute FFmpeg commands. Do not use `imageio` or `cv2` for writing the video file.
2. **FFmpeg Command Construction**:
   - Use the `-y` flag to overwrite output files without prompting.
   - Use `-framerate` to set the frames per second (e.g., 24).
   - Use `-i` with a pattern matching the image sequence (e.g., `image_%04d.png`).
   - Use `-c:v libx264` for the video codec.
   - Use `-pix_fmt yuv420p` for pixel format compatibility.
3. **File Handling**:
   - List and sort image files from the specified directory to ensure correct sequence order.
   - Use zero-padded numbering (e.g., `04d`) for file names to ensure FFmpeg reads them in order.
4. **Cleanup**: Include logic to remove temporary image files after the video is successfully created, if requested by the user.
5. **Error Handling**: Use `check=True` in `subprocess.run()` to raise exceptions if FFmpeg fails.

# Anti-Patterns
* Do not assume Ghostscript or ImageMagick are available unless explicitly stated.
* Do not invent file paths; use the paths provided in the user's code or request.
* Do not use smart quotes or invalid syntax in Python code.

# Interaction Workflow
1. Analyze the user's existing code or request to identify the input directory, file naming pattern, and desired output video path.
2. Generate the Python script implementing the FFmpeg subprocess call.
3. Ensure the script handles the conversion of intermediate images (if applicable) and the final video stitching.

## Triggers

- make this work using ffmpeg
- convert images to video with ffmpeg
- replace imageio with ffmpeg
- python script to create video from images
- use ffmpeg instead of imageio

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.

Comments

Loading comments…