moviepy 2.2.1


pip install moviepy

  Latest version

Released: May 21, 2025

Project Links

Meta
Author: Zulko 2024

Classifiers

Development Status
  • 5 - Production/Stable

Intended Audience
  • Developers

Natural Language
  • English

License
  • OSI Approved :: MIT License

Programming Language
  • Python
  • Python :: 3.9
  • Python :: 3.10
  • Python :: 3.11

Topic
  • Multimedia
  • Multimedia :: Sound/Audio
  • Multimedia :: Sound/Audio :: Analysis
  • Multimedia :: Video
  • Multimedia :: Video :: Capture
  • Multimedia :: Video :: Conversion

MoviePy

MoviePy page on the Python Package Index Discuss MoviePy on Gitter Build status on gh-actions Code coverage from coveralls.io

[!NOTE] MoviePy recently upgraded to v2.0, introducing major breaking changes. You can consult the last v1 docs here but beware that v1 is no longer maintained. For more info on how to update your code from v1 to v2, see this guide.

MoviePy (online documentation here) is a Python library for video editing: cuts, concatenations, title insertions, video compositing (a.k.a. non-linear editing), video processing, and creation of custom effects.

MoviePy can read and write all the most common audio and video formats, including GIF, and runs on Windows/Mac/Linux, with Python 3.9+.

Example

In this example we open a video file, select the subclip between 10 and 20 seconds, add a title at the center of the screen, and write the result to a new file:

from moviepy import VideoFileClip, TextClip, CompositeVideoClip

# Load file example.mp4 and keep only the subclip from 00:00:10 to 00:00:20
# Reduce the audio volume to 80% of its original volume

clip = (
    VideoFileClip("long_examples/example2.mp4")
    .subclipped(10, 20)
    .with_volume_scaled(0.8)
)

# Generate a text clip. You can customize the font, color, etc.
txt_clip = TextClip(
    font="Arial.ttf",
    text="Hello there!",
    font_size=70,
    color='white'
).with_duration(10).with_position('center')

# Overlay the text clip on the first video clip
final_video = CompositeVideoClip([clip, txt_clip])
final_video.write_videofile("result.mp4")

How MoviePy works

Under the hood, MoviePy imports media (video frames, images, sounds) and converts them into Python objects (numpy arrays) so that every pixel becomes accessible, and video or audio effects can be defined in just a few lines of code (see the built-in effects for examples).

The library also provides ways to mix clips together (concatenations, playing clips side by side or on top of each other with transparency, etc.). The final clip is then encoded back into mp4/webm/gif/etc.

This makes MoviePy very flexible and approachable, albeit slower than using ffmpeg directly due to heavier data import/export operations.

Installation

Intall moviepy with pip install moviepy. For additional installation options, such as a custom FFMPEG or for previewing, see this section. For development, clone that repo locally and install with pip install -e .

Documentation

The online documentation (here) is automatically built at every push to the master branch. To build the documentation locally, install the extra dependencies via pip install moviepy[doc], then go to the docs folder and run make html.

Contribute

MoviePy is open-source software originally written by Zulko and released under the MIT licence. The project is hosted on GitHub, where everyone is welcome to contribute and open issues or give feedback Please read our Contributing Guidelines. To ask for help or simply discuss usage and examples, use our Reddit channel.

Maintainers

Active maintainers

Past maintainers and thanks

Maintainers wanted! this library has only been kept afloat by the involvement of its maintainers, and there are times where none of us have enough bandwidth. We'd love to hear about developers interested in giving a hand and solving some of the issues (especially the ones that affect you) or reviewing pull requests. Open an issue or contact us directly if you are interested. Thanks!

2.2.1 May 21, 2025
2.2.0 May 21, 2025
2.1.2 Jan 10, 2025
2.1.1 Nov 25, 2024
2.1.0 Nov 24, 2024
2.0.0 Nov 20, 2024
2.0.0.dev2 Oct 05, 2020
2.0.0.dev1 Jun 04, 2020
1.0.3 May 07, 2020
1.0.2 Mar 26, 2020
1.0.1 Oct 01, 2019
1.0.0 Feb 14, 2019
0.2.3.5 May 31, 2018
0.2.3.4 Apr 22, 2018
0.2.3.3 Apr 17, 2018
0.2.3.2 Apr 13, 2017
0.2.3.1 Apr 05, 2017
0.2.2.13 Feb 15, 2017
0.2.2.12 Jan 30, 2017
0.2.2.11 Feb 11, 2015
0.2.2.10 Feb 10, 2015
0.2.2.9 Feb 09, 2015
0.2.2.8 Feb 04, 2015
0.2.2.7 Feb 02, 2015
0.2.2.6 Feb 02, 2015
0.2.2.5 Jan 31, 2015
0.2.2.4 Jan 24, 2015
0.2.2.3 Dec 28, 2014
0.2.2.2 Dec 16, 2014
0.2.2.1 Dec 15, 2014
0.2.2 Dec 11, 2014
0.2.1.9.7 Dec 07, 2014
0.2.1.9.5 Dec 01, 2014
0.2.1.9.4 Nov 30, 2014
0.2.1.9.3 Nov 30, 2014
0.2.1.9.2 Oct 14, 2014
0.2.1.9.1 Oct 13, 2014
0.2.1.9 Oct 12, 2014
0.2.1.8.12 Sep 22, 2014
0.2.1.8.11 Sep 21, 2014
0.2.1.8.10 Sep 09, 2014
0.2.1.8.9 Aug 18, 2014
0.2.1.8.8 Aug 15, 2014
0.2.1.8.7 Aug 14, 2014
0.2.1.8.6 Aug 02, 2014
0.2.1.8.5 Jul 08, 2014
0.2.1.8.4 Jul 05, 2014
0.2.1.8.3 Jun 26, 2014
0.2.1.8.2 Jun 20, 2014
0.2.1.8.1 Jun 19, 2014
0.2.1.8 Jun 08, 2014
0.2.1.7.22 Jun 05, 2014
0.2.1.7.21 Apr 26, 2014
0.2.1.7.20 Apr 19, 2014
0.2.1.7.19 Apr 19, 2014
0.2.1.7.18 Apr 18, 2014
0.2.1.7.17 Apr 18, 2014
0.2.1.7.16 Apr 11, 2014
0.2.1.7.15 Apr 10, 2014
0.2.1.7.14 Apr 06, 2014
0.2.1.7.13 Mar 25, 2014
0.2.1.7.12 Mar 23, 2014
0.2.1.7.11 Mar 23, 2014
0.2.1.7.10 Mar 20, 2014
0.2.1.7.9 Feb 25, 2014
0.2.1.7.8 Feb 25, 2014
0.2.1.7.3 Feb 17, 2014
0.2.1.7.2 Feb 17, 2014
0.2.1.7 Feb 14, 2014
0.2.1.6.93 Feb 01, 2014
0.2.1.6.92 Jan 26, 2014
0.2.1.6.91 Jan 25, 2014
0.2.1.6.9 Jan 25, 2014
0.2.1.6.8 Jan 24, 2014
0.2.1.6.7 Jan 23, 2014
0.2.1.6.5 Jan 23, 2014
0.2.1.6.4 Dec 20, 2013
0.2.1.6.3 Oct 11, 2013
0.2.1.6.2 Oct 01, 2013
0.2.1.6.1 Sep 19, 2013
0.2.1.6 Sep 17, 2013
0.2.1.5 Sep 17, 2013
0.2.1.4 Sep 17, 2013
0.2.1.3 Sep 17, 2013
0.2.1.2 Sep 17, 2013
0.2.1.1 Sep 17, 2013
0.2.1 Sep 17, 2013
0.2.1.6.3.linux Oct 11, 2013

Wheel compatibility matrix

Platform Python 3
any

Files in release

Extras:
Dependencies:
decorator (<6.0,>=4.0.2)
imageio (<3.0,>=2.5)
imageio_ffmpeg (>=0.2.0)
numpy (>=1.25.0)
proglog (<=1.0.0)
python-dotenv (>=0.10)
pillow (<12.0,>=9.2.0)