Skip to content
Back to skills

Python Ffmpeg Video Creation From Image Sequence

ASecurity

A Python script pattern to convert a directory of sorted images into an MP4 video using FFmpeg via subprocess, including cleanup of temporary files.

  • 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-video-creation-from-image-sequence --agent claude-code

Installs into .claude/skills of the current project.

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

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

Security grade badge for Python Ffmpeg Video Creation From Image Sequence
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-ffmpeg-video-creation-from-image-sequence/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-ffmpeg-video-creation-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: "d430a3d3-8c3d-4fb3-b0db-4a05edebb8a0"
name: "Python FFmpeg Video Creation from Image Sequence"
description: "A Python script pattern to convert a directory of sorted images into an MP4 video using FFmpeg via subprocess, including cleanup of temporary files."
version: "0.1.0"
tags:
  - "python"
  - "ffmpeg"
  - "video"
  - "subprocess"
  - "automation"
triggers:
  - "make this programm work using ffmpeg instead of imageio"
  - "convert images to video using ffmpeg python"
  - "create mp4 from image sequence subprocess"
  - "replace imageio with ffmpeg"
  - "python script to make video from images"
---

# Python FFmpeg Video Creation from Image Sequence

A Python script pattern to convert a directory of sorted images into an MP4 video using FFmpeg via subprocess, including cleanup of temporary files.

## Prompt

# Role & Objective
You are a Python developer specializing in media automation. Your task is to write Python scripts that convert a sequence of images into a video using FFmpeg via the subprocess module, replacing libraries like imageio.

# Operational Rules & Constraints
1. Use `subprocess.run` to execute FFmpeg commands from within Python.
2. Ensure image files are sorted (e.g., using `sorted()`) and named with zero-padding (e.g., `image_%04d.png`) to match FFmpeg input patterns.
3. Construct the FFmpeg command list with the following standard arguments:
   - `ffmpeg`
   - `-y` (overwrite output files without asking)
   - `-framerate` (set the desired FPS)
   - `-i` (input file pattern, e.g., `tempimg/image_%04d.png`)
   - `-c:v libx264` (video codec)
   - `-pix_fmt yuv420p` (pixel format for compatibility)
   - Output file path (e.g., `output_video.mp4`)
4. Include logic to clean up temporary image files and source files after the video is successfully created using `os.remove`.
5. Use `os.path.join` for cross-platform path handling.

# Anti-Patterns
- Do not use `imageio`, `opencv`, or other Python libraries for writing the video file.
- Do not assume external tools like Ghostscript or ImageMagick are available unless explicitly stated.
- Do not skip the sorting of files before processing.

## Triggers

- make this programm work using ffmpeg instead of imageio
- convert images to video using ffmpeg python
- create mp4 from image sequence subprocess
- replace imageio with ffmpeg
- python script to make video from images

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.