explaingit

zulko/moviepy

Analysis updated 2026-06-24

14,610PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

Python library for video editing that cuts, concatenates, composites, and writes effects on clips backed by numpy arrays, reading and writing common audio and video formats including GIFs.

Mindmap

mindmap
  root((moviepy))
    Inputs
      Video files
      Audio files
      Text overlays
    Outputs
      Edited videos
      Animated GIFs
      Audio tracks
    Use Cases
      Cut and join clips
      Add a title overlay
      Composite two videos
      Batch process video
    Tech Stack
      Python
      NumPy
      FFmpeg
      ImageMagick
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Cut and concatenate clips and export the result as MP4 or animated GIF

USE CASE 2

Drop a title or watermark on a video and composite two layers with CompositeVideoClip

USE CASE 3

Batch process a folder of videos, applying the same trim and resize from a Python script

USE CASE 4

Write a custom pixel-level effect using numpy arrays returned by each frame

What is it built with?

PythonNumPyFFmpegImageMagick

How does it compare?

zulko/moviepynltk/nltksesameailabs/csm
Stars14,61014,61314,621
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity3/53/55/5
Audiencedeveloperresearcherresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Version 2.0 has breaking API changes from v1, and you need ffmpeg installed for most read and write operations.

MIT lets you use, modify, and ship this in commercial products as long as you keep the copyright notice.

In plain English

MoviePy is a Python library for editing video. You can use it to cut clips, glue them together, drop a title in the middle of the screen, place one video on top of another with transparency, write custom effects, and export the result. The README describes it as a tool for cuts, concatenations, title insertions, video compositing (also called non-linear editing), video processing, and the creation of custom effects. The library reads and writes the common audio and video formats, including animated GIF, and works on Windows, Mac, and Linux with Python 3.9 or newer. You install it with pip install moviepy. The project recently moved to version 2.0, which introduced breaking changes from version 1, and the README links to a migration guide and an archived copy of the v1 documentation for older code. A short example in the README shows the basic flow. You load a file called example2.mp4 with VideoFileClip, take the part between seconds 10 and 20, drop the audio volume to eighty percent, build a separate TextClip that says Hello there in white Arial at size 70, place that text in the center for ten seconds, combine the two layers with CompositeVideoClip, and call write_videofile to save the result as result.mp4. Under the hood, MoviePy loads media into Python objects backed by numpy arrays, so every pixel and every audio sample is reachable in code. That design is what lets you write a new effect in only a few lines, and the library ships a set of built-in effects you can use directly. The README is honest about the trade-off: this approach is more flexible and easier to read than calling ffmpeg yourself, but it is also slower because of the data shuffling between numpy and the encoder. The project is open source under the MIT license, originally written by Zulko, with development of version 2 led by OsaAjani. Other active maintainers listed are tburrows13 and keikoro. Documentation is hosted on a GitHub Pages site and is rebuilt on every push to master. There is a Reddit channel for usage questions and a contributing guide for code changes. The README ends with a note that more maintainers are wanted, since the team has limited bandwidth.

Copy-paste prompts

Prompt 1
Give me a 5-minute setup guide for moviepy 2.0 on macOS including ffmpeg and a hello-world write_videofile
Prompt 2
Write a moviepy script that trims an MP4 between two timestamps, lowers the volume, and exports it
Prompt 3
Show me how to overlay a TextClip on a video with a custom font, color, and duration using CompositeVideoClip
Prompt 4
Migrate a moviepy v1 script that uses subclip and set_audio to the v2 API
Prompt 5
Build a custom moviepy effect that runs on raw numpy frames and apply it to a clip

Frequently asked questions

What is moviepy?

Python library for video editing that cuts, concatenates, composites, and writes effects on clips backed by numpy arrays, reading and writing common audio and video formats including GIFs.

What language is moviepy written in?

Mainly Python. The stack also includes Python, NumPy, FFmpeg.

What license does moviepy use?

MIT lets you use, modify, and ship this in commercial products as long as you keep the copyright notice.

How hard is moviepy to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is moviepy for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.