# MoviePy
[![MoviePy page on the Python Package Index](https://badge.fury.io/py/moviepy.svg)](https://pypi.org/project/moviepy/) [![Discuss MoviePy on Gitter](https://img.shields.io/gitter/room/movie-py/gitter?color=46BC99&logo=gitter)](Gitter_) [![Build status on gh-actions](https://img.shields.io/github/actions/workflow/status/Zulko/moviepy/test_suite.yml?logo=github)](https://github.com/Zulko/moviepy/actions/workflows/test_suite.yml) [![Code coverage from coveralls.io](https://img.shields.io/coveralls/github/Zulko/moviepy/master?logo=coveralls)](https://coveralls.io/github/Zulko/moviepy?branch=master)
> [!NOTE]
> MoviePy recently upgraded to v2.0, introducing major breaking changes. You can consult the last v1 docs [here](https://zulko.github.io/moviepy/v1.0.3/) but beware that v1 is no longer maintained. For more info on how to update your code from v1 to v2, see [this guide](https://zulko.github.io/moviepy/getting_started/updating_to_v2.html).
MoviePy (online documentation [here](https://zulko.github.io/moviepy/)) 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:
``` python
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](https://zulko.github.io/moviepy/getting_started/install.html). For development, clone that repo locally and install with `pip install -e .`
# Documentation
The online documentation ([here](https://zulko.github.io/moviepy/)) 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](https://github.com/Zulko) and released under the MIT licence.
The project is hosted on [GitHub](https://github.com/Zulko/moviepy),
where everyone is welcome to contribute and open issues or give feedback Please read our [Contributing
Guidelines](https://github.com/Zulko/moviepy/blob/master/CONTRIBUTING.md).
To ask for help or simply discuss usage and examples, use [our Reddit channel](https://www.reddit.com/r/moviepy/).
# Maintainers
- [Zulko](https://github.com/Zulko) (owner)
- [@osaajani](https://github.com/OsaAjani) led the development of v2 ([MR](https://github.com/Zulko/moviepy/pull/2024))
- [@tburrows13](https://github.com/tburrows13)
- [@mgaitan](https://github.com/mgaitan)
- [@earney](https://github.com/earney)
- [@mbeacom](https://github.com/mbeacom)
- [@overdrivr](https://github.com/overdrivr)
- [@keikoro](https://github.com/keikoro)
- [@ryanfox](https://github.com/ryanfox)
- [@mondeja](https://github.com/mondeja)
**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!
Raw data
{
"_id": null,
"home_page": null,
"name": "moviepy",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "video, editing, audio, compositing, ffmpeg",
"author": "Zulko 2024",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/1c/98/0ed6566a9d297dc41850d4bd5a2af4619f28abbfd9bdae76f5961410e2e2/moviepy-2.1.1.tar.gz",
"platform": null,
"description": "# MoviePy\n\n\n[![MoviePy page on the Python Package Index](https://badge.fury.io/py/moviepy.svg)](https://pypi.org/project/moviepy/) [![Discuss MoviePy on Gitter](https://img.shields.io/gitter/room/movie-py/gitter?color=46BC99&logo=gitter)](Gitter_) [![Build status on gh-actions](https://img.shields.io/github/actions/workflow/status/Zulko/moviepy/test_suite.yml?logo=github)](https://github.com/Zulko/moviepy/actions/workflows/test_suite.yml) [![Code coverage from coveralls.io](https://img.shields.io/coveralls/github/Zulko/moviepy/master?logo=coveralls)](https://coveralls.io/github/Zulko/moviepy?branch=master)\n\n> [!NOTE]\n> MoviePy recently upgraded to v2.0, introducing major breaking changes. You can consult the last v1 docs [here](https://zulko.github.io/moviepy/v1.0.3/) but beware that v1 is no longer maintained. For more info on how to update your code from v1 to v2, see [this guide](https://zulko.github.io/moviepy/getting_started/updating_to_v2.html).\n\nMoviePy (online documentation [here](https://zulko.github.io/moviepy/)) 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.\n\nMoviePy can read and write all the most common audio and video formats, including GIF, and runs on Windows/Mac/Linux, with Python 3.9+.\n\n# Example\n\nIn this example we open a video file, select the subclip between 10 and\n20 seconds, add a title at the center of the screen, and write the\nresult to a new file:\n\n``` python\nfrom moviepy import VideoFileClip, TextClip, CompositeVideoClip\n\n# Load file example.mp4 and keep only the subclip from 00:00:10 to 00:00:20\n# Reduce the audio volume to 80% of its original volume\n\nclip = (\n VideoFileClip(\"long_examples/example2.mp4\")\n .subclipped(10, 20)\n .with_volume_scaled(0.8)\n)\n\n# Generate a text clip. You can customize the font, color, etc.\ntxt_clip = TextClip(\n font=\"Arial.ttf\",\n text=\"Hello there!\",\n font_size=70,\n color='white'\n).with_duration(10).with_position('center')\n\n# Overlay the text clip on the first video clip\nfinal_video = CompositeVideoClip([clip, txt_clip])\nfinal_video.write_videofile(\"result.mp4\")\n```\n\n# How MoviePy works\n\nUnder 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).\n\nThe 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.\n\nThis makes MoviePy very flexible and approachable, albeit slower than using ffmpeg directly due to heavier data import/export operations. \n\n\n# Installation\n\nIntall moviepy with `pip install moviepy`. For additional installation options, such as a custom FFMPEG or for previewing, see [this section](https://zulko.github.io/moviepy/getting_started/install.html). For development, clone that repo locally and install with `pip install -e .`\n\n# Documentation\n\nThe online documentation ([here](https://zulko.github.io/moviepy/)) 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`.\n\n# Contribute\n\nMoviePy is open-source software originally written by\n[Zulko](https://github.com/Zulko) and released under the MIT licence.\nThe project is hosted on [GitHub](https://github.com/Zulko/moviepy),\nwhere everyone is welcome to contribute and open issues or give feedback Please read our [Contributing\nGuidelines](https://github.com/Zulko/moviepy/blob/master/CONTRIBUTING.md).\nTo ask for help or simply discuss usage and examples, use [our Reddit channel](https://www.reddit.com/r/moviepy/).\n\n# Maintainers\n\n- [Zulko](https://github.com/Zulko) (owner)\n- [@osaajani](https://github.com/OsaAjani) led the development of v2 ([MR](https://github.com/Zulko/moviepy/pull/2024))\n- [@tburrows13](https://github.com/tburrows13)\n- [@mgaitan](https://github.com/mgaitan)\n- [@earney](https://github.com/earney)\n- [@mbeacom](https://github.com/mbeacom)\n- [@overdrivr](https://github.com/overdrivr)\n- [@keikoro](https://github.com/keikoro)\n- [@ryanfox](https://github.com/ryanfox)\n- [@mondeja](https://github.com/mondeja)\n\n**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\nan issue or contact us directly if you are interested. Thanks!\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "Video editing with Python",
"version": "2.1.1",
"project_urls": null,
"split_keywords": [
"video",
" editing",
" audio",
" compositing",
" ffmpeg"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "007bedcb99095b403906becbeb61539123e391b22ec418eb0954a34d39a0bc83",
"md5": "2777791b363bdb397c47b10d025abb38",
"sha256": "b236a794c1bc00162613f08b5b5a862531ac39666b6943161c1f46a4dc8d3064"
},
"downloads": -1,
"filename": "moviepy-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2777791b363bdb397c47b10d025abb38",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 123485,
"upload_time": "2024-11-25T04:33:19",
"upload_time_iso_8601": "2024-11-25T04:33:19.745276Z",
"url": "https://files.pythonhosted.org/packages/00/7b/edcb99095b403906becbeb61539123e391b22ec418eb0954a34d39a0bc83/moviepy-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1c980ed6566a9d297dc41850d4bd5a2af4619f28abbfd9bdae76f5961410e2e2",
"md5": "e4960603cacbb0463e2e67f9d3c588d5",
"sha256": "0210336944fcc88a1841fe7ca3701f8f449eead222f9d1665d11d3b8fa753454"
},
"downloads": -1,
"filename": "moviepy-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "e4960603cacbb0463e2e67f9d3c588d5",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 58421147,
"upload_time": "2024-11-25T04:33:23",
"upload_time_iso_8601": "2024-11-25T04:33:23.059799Z",
"url": "https://files.pythonhosted.org/packages/1c/98/0ed6566a9d297dc41850d4bd5a2af4619f28abbfd9bdae76f5961410e2e2/moviepy-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-25 04:33:23",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "moviepy"
}