MoviePy is a Python library for video editing, can read and write all the most common audio and video formats

Overview

MoviePy

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

MoviePy (full documentation) is a Python library for video editing: cutting, concatenations, title insertions, video compositing (a.k.a. non-linear editing), video processing, and creation of custom effects. See the gallery for some examples of use.

MoviePy can read and write all the most common audio and video formats, including GIF, and runs on Windows/Mac/Linux, with Python 3.6+. Here it is in action in an IPython notebook:

[logo]

Example

In this example we open a video file, select the subclip between t=50s and t=60s, add a title at the center of the screen, and write the result to a new file:

from moviepy import *

video = VideoFileClip("myHolidays.mp4").subclip(50,60)

# Make the text. Many more options are available.
txt_clip = ( TextClip("My Holidays 2013",fontsize=70,color='white')
             .with_position('center')
             .with_duration(10) )

result = CompositeVideoClip([video, txt_clip]) # Overlay text on video
result.write_videofile("myHolidays_edited.webm",fps=25) # Many options...

Maintainers wanted!

As there are more and more people seeking support (270 open issues as of Jan. 2021!) and all the MoviePy maintainers seem busy, 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!

Installation

MoviePy depends on the Python modules NumPy, Imageio, Decorator, and Proglog, which will be automatically installed during MoviePy's installation. The software FFMPEG should be automatically downloaded/installed (by imageio) during your first use of MoviePy (installation will take a few seconds). If you want to use a specific version of FFMPEG, follow the instructions in config_defaults.py. In case of trouble, provide feedback.

Installation by hand: download the sources, either from PyPI or, if you want the development version, from GitHub, unzip everything into one folder, open a terminal and type:

$ (sudo) python setup.py install

Installation with pip: if you have pip installed, just type this in a terminal:

$ (sudo) pip install moviepy

If you have neither setuptools nor ez_setup installed, the command above will fail. In this case type this before installing:

$ (sudo) pip install setuptools

Optional but useful dependencies

You can install moviepy with all dependencies via:

$ (sudo) pip install moviepy[optional]

ImageMagick is not strictly required, but needed if you want to incorporate texts. It can also be used as a backend for GIFs, though you can also create GIFs with MoviePy without ImageMagick.

Once you have installed ImageMagick, MoviePy will try to autodetect the path to its executable. If it fails, you can still configure it by setting environment variables (see the documentation).

PyGame is needed for video and sound previews (not relevant if you intend to work with MoviePy on a server but essential for advanced video editing by hand).

For advanced image processing, you will need one or several of the following packages:

  • The Python Imaging Library (PIL) or, even better, its branch Pillow.
  • Scipy (for tracking, segmenting, etc.) can be used to resize video clips if PIL and OpenCV are not installed.
  • Scikit Image may be needed for some advanced image manipulation.
  • OpenCV 2.4.6 or a more recent version (one that provides the package cv2) may be needed for some advanced image manipulation.
  • Matplotlib

For instance, using the method clip.resize requires that at least one of Scipy, PIL, Pillow or OpenCV is installed.

Documentation

Building the documentation has additional dependencies that require installation.

$ (sudo) pip install moviepy[doc]

The documentation can be generated and viewed via:

$ python setup.py build_docs

You can pass additional arguments to the documentation build, such as clean build:

$ python setup.py build_docs -E

More information is available from the Sphinx documentation.

New in 1.0.0: Progress bars and messages with Proglog

Non-backwards-compatible changes were introduced in 1.0.0 to manage progress bars and messages using Proglog, which enables to display nice progress bars in the console as well as in a Jupyter notebook or any user interface, like a website.

To display notebook friendly progress bars, first install IPyWidgets:

sudo pip install ipywidgets
sudo jupyter nbextension enable --py --sys-prefix widgetsnbextension

Then at the beginning of your notebook enter:

import proglog
proglog.notebook()

Have a look at the Proglog project page for more options.

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, ask for help or simply give feedback. Please read our Contributing Guidelines for more information about how to contribute!

You can also discuss the project on Reddit or Gitter. These are preferred over GitHub issues for usage questions and examples.

Maintainers

Comments
  • AttributeError: 'NoneType' object has no attribute 'stdout'

    AttributeError: 'NoneType' object has no attribute 'stdout'

    Notice

    If you have arrived here from google, you will probably find that updating your moviepy version to v1.0.3 or higher will fix the issue (pip install moviepy --upgrade). See #1185.


    Expected Behavior

    Expected to get an edited version of the inputted video.

    Actual Behavior

    Produces this error:

    Moviepy - Building video test.webm.
    MoviePy - Writing audio in testTEMP_MPY_wvf_snd.ogg
    chunk:   0%|          | 0/552 [00:00<?, ?it/s, now=None]Traceback (most recent call last):
      File "/home/tech/Developement/CrabRaveGenerator/Test.py", line 8, in <module>
        ]).write_videofile("test.webm", fps = 30)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-51>", line 2, in write_videofile
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 54, in requires_duration
        return f(clip, *a, **k)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-50>", line 2, in write_videofile
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 137, in use_clip_fps_by_default
        return f(clip, *new_a, **new_kw)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-49>", line 2, in write_videofile
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 22, in convert_masks_to_RGB
        return f(clip, *a, **k)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/video/VideoClip.py", line 317, in write_videofile
        logger=logger)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-73>", line 2, in write_audiofile
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 54, in requires_duration
        return f(clip, *a, **k)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/AudioClip.py", line 209, in write_audiofile
        logger=logger)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-70>", line 2, in ffmpeg_audiowrite
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 54, in requires_duration
        return f(clip, *a, **k)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/io/ffmpeg_audiowriter.py", line 169, in ffmpeg_audiowrite
        logger=logger):
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/AudioClip.py", line 85, in iter_chunks
        fps=fps, buffersize=chunksize)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-72>", line 2, in to_soundarray
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 54, in requires_duration
        return f(clip, *a, **k)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/AudioClip.py", line 126, in to_soundarray
        snd_array = self.get_frame(tt)
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-10>", line 2, in get_frame
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 89, in wrapper
        return f(*new_a, **new_kw)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/Clip.py", line 95, in get_frame
        return self.make_frame(t)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/AudioClip.py", line 296, in make_frame
        for c, part in zip(self.clips, played_parts)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/AudioClip.py", line 297, in <listcomp>
        if (part is not False)]
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-10>", line 2, in get_frame
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 89, in wrapper
        return f(*new_a, **new_kw)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/Clip.py", line 95, in get_frame
        return self.make_frame(t)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/Clip.py", line 138, in <lambda>
        newclip = self.set_make_frame(lambda t: fun(self.get_frame, t))
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/Clip.py", line 190, in <lambda>
        return self.fl(lambda gf, t: gf(t_func(t)), apply_to,
      File "</usr/local/lib/python3.5/dist-packages/decorator.py:decorator-gen-10>", line 2, in get_frame
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/decorators.py", line 89, in wrapper
        return f(*new_a, **new_kw)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/Clip.py", line 95, in get_frame
        return self.make_frame(t)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/io/AudioFileClip.py", line 78, in <lambda>
        self.make_frame = lambda t: self.reader.get_frame(t)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/io/readers.py", line 180, in get_frame
        self.buffer_around(fr_min)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/io/readers.py", line 238, in buffer_around
        array = self.read_chunk(chunksize)
      File "/usr/local/lib/python3.5/dist-packages/moviepy-1.0.0-py3.5.egg/moviepy/audio/io/readers.py", line 112, in read_chunk
        s = self.proc.stdout.read(L)
    AttributeError: 'NoneType' object has no attribute 'stdout'
                                                            
    

    Steps to Reproduce the Problem

    Run the following code:

    from moviepy.editor import CompositeVideoClip, VideoFileClip, TextClip
    
    CompositeVideoClip([
    
        VideoFileClip("template.webm").subclip(5, 30), 
        TextClip("Test Text", fontsize = 70, color = 'white').set_position('center').set_duration(10)
        
    ]).write_videofile("test.webm", fps = 30)
    

    Specifications

    • Python Version: 3.5.3
    • Moviepy Version: 1.0.0
    • Platform Name: Debian
    • Platform Version: 9.8
    video 
    opened by Technerder 41
  • Error: wrong indices in video buffer. Maybe buffer too small.

    Error: wrong indices in video buffer. Maybe buffer too small.

    The following code:

    wordSlide = ColorClip((1280,720), (228,232,111))
    wordText = TextClip(wordStr, font="Arial-Regular", color="YellowGreen", fontsize=90)
    wordAudio = AudioFileClip(path + "word.aif")
    wordClip = CompositeVideoClip([wordSlide.set_audio(wordAudio),
        wordText.set_pos('center')]).set_duration(wordAudio.duration)
    

    Produces:

    Error: wrong indices in video buffer. Maybe buffer too small.
    Exception in thread Thread-1:
    Traceback (most recent call last):
      File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 810, in __bootstrap_inner
        self.run()
      File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 763, in run
        self.__target(*self.__args, **self.__kwargs)
      File "<string>", line 2, in preview
      File "/usr/local/lib/python2.7/site-packages/moviepy/decorators.py", line 60, in requires_duration
        return f(clip, *a, **k)
      File "/usr/local/lib/python2.7/site-packages/moviepy/audio/io/preview.py", line 59, in preview
        sndarray = clip.to_soundarray(tt,nbytes)
      File "<string>", line 2, in to_soundarray
      File "/usr/local/lib/python2.7/site-packages/moviepy/decorators.py", line 60, in requires_duration
        return f(clip, *a, **k)
      File "/usr/local/lib/python2.7/site-packages/moviepy/audio/AudioClip.py", line 83, in to_soundarray
        snd_array = self.get_frame(tt)
      File "/usr/local/lib/python2.7/site-packages/moviepy/audio/AudioClip.py", line 189, in get_frame
        if (part is not False) ]
      File "/usr/local/lib/python2.7/site-packages/moviepy/audio/io/AudioFileClip.py", line 69, in <lambda>
        self.get_frame =  lambda t: self.reader.get_frame(t)
      File "/usr/local/lib/python2.7/site-packages/moviepy/audio/io/readers.py", line 173, in get_frame
        raise error
    IndexError: index 45785 is out of bounds for axis 0 with size 45784
    

    A little hack that kinda makes it go away is to do:

    wordSlide = ColorClip((1280,720), (228,232,111))
    wordText = TextClip(wordStr, font="Arial-Regular", color="YellowGreen", fontsize=90)
    wordAudio = AudioFileClip(path + "word.aif")
    wordClip = CompositeVideoClip([wordSlide.set_audio(wordAudio),
        wordText.set_pos('center')]).set_duration(wordAudio.duration - 0.01)
    

    Although this doesn't fix anything. It just happens to work in this case, but not for other clips. Why is it crashing?

    The wordAudio.duration is 1.04s in this case. On some audio files it crashes, on some it doesn't. Is this the accuracy problem with generating number of frames based on audio length?

    opened by Netherdrake 38
  • Implement multithreading

    Implement multithreading

    Implement multithreading

    Implement multithreaded clip rendering to file Allow for more CPU utilization especially on heavily edited clips

    Refs #584, #139

    feature 
    opened by MythicManiac 27
  • Some advice for improve CompositeVideoClip TextClip and the blit

    Some advice for improve CompositeVideoClip TextClip and the blit

    Since I was been stumped with the perfermance of my edit, I try to figure out the reason that slow down the program, and luckly I found couple of them. The first one is CompositeVideoClip, its blit all clip for every frame,so the speed is decreasing as the number of clips increased, speed comes 1s/it when there are 20 clips needs to be composited, one solution is using PIL.Image.paste, it much faster, create a bg image object and paste other clip on it, it's really fast,came up to 30it/s second one is blit func, I think PIL Image.paste is useful too. And last one is Textclip, I use PIL imagefont to gen text image, Its much faster than imagemagisk,maybe it is possible to escape imagemagisk.

    feature-request lib-misc images lib-ImageMagick performance 
    opened by ODtian 26
  • FFMPEG not downloaded

    FFMPEG not downloaded

    Until two days ago, imageio was downloading ffmpeg correctly. It is not doing so anymore.

    ERR Traceback (most recent call last):
    ERR   File "restapi.py", line 9, in <module>
    ERR     from modules.location_from_media_module import location_from_media
    ERR     from helpers.flicksys_audio_video import get_video, get_frame, make_url, delete_file
    ERR   File "/home/vcap/app/helpers/flicksys_audio_video.py", line 5, in <module>
    ERR   File "/app/.heroku/python/lib/python2.7/site-packages/moviepy/editor.py", line 22, in <module>
    ERR     from .video.io.VideoFileClip import VideoFileClip
    File "/app/.heroku/python/lib/python2.7/site-packages/moviepy/video/io/VideoFileClip.py", line 3, in <module>
    ERR     from moviepy.video.VideoClip import VideoClip
    ERR   File "/app/.heroku/python/lib/python2.7/site-packages/moviepy/video/VideoClip.py", line 20, in <module>
    ERR     from .io.ffmpeg_writer import ffmpeg_write_image, ffmpeg_write_video
    ERR   File "/app/.heroku/python/lib/python2.7/site-packages/moviepy/video/io/ffmpeg_writer.py", line 19, in <module>
    ERR   File "/app/.heroku/python/lib/python2.7/site-packages/moviepy/config.py", line 38, in <module>
    ERR     FFMPEG_BINARY = get_exe()
    ERR   File "/app/.heroku/python/lib/python2.7/site-packages/imageio/plugins/ffmpeg.py", line 86, in get_exe
    ERR     raise NeedDownloadError('Need ffmpeg exe. '
    ERR imageio.core.fetching.NeedDownloadError: Need ffmpeg exe. You can download it by calling:
    ERR   imageio.plugins.ffmpeg.download()
    

    Details of deployed server:

    IBM Bluemix CloudFoundry App Runs Ubuntu 14.04 LTS Server Moviepy installed via pip.

    Adding the line imagio.plugins.ffmpeg.download() to my python code has no effect. Also, I'm not sure why it is looking for ffmpeg exe when it is running on a linux server.

    lib-misc stale 
    opened by kartikarora 26
  • AttributeError: module 'moviepy.audio.fx.all' has no attribute 'audio_fadein'

    AttributeError: module 'moviepy.audio.fx.all' has no attribute 'audio_fadein'

    I have used cx_freeze to build a python project into a single folder with an .exe and it's dependencies, but when I run the .exe I get the error: AttributeError: module 'moviepy.audio.fx.all' has no attribute 'audio_fadein'

    I have tried both from moviepy.editor import * and also from moviepy.video.io.VideoFileClip import VideoFileClip and here is the python code:

        pygame.display.set_mode((854, 480), pygame.NOFRAME)
        pygame.display.set_caption('©2017 CherryByte™ Software')
        pygame.mouse.set_visible(False)
        logo = VideoFileClip('CherryByte Logo.mp4')
        logo.preview()
        pygame.mouse.set_visible(True)
    

    It seems to run fine from the IDE (PyCharm) but once built, it seems to fail. Here is a shot of the Traceback: 2017-06-18 3

    Python version 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] Version info. sys.version_info(major=3, minor=6, micro=1, releaselevel='final', serial=0)

    audio environment 
    opened by JSkorpio05 24
  • `error: string:` When trying to import from moviepy

    `error: string:` When trying to import from moviepy

    Refer to this line of code: https://github.com/Zulko/moviepy/blob/b93b3217f3acba7e5e4e37f295e4cff2ad2a821d/moviepy/video/io/ffmpeg_reader.py#L99

    I successfully installed moviepy and every dependency, for example: import moviepy and from moviepy.editor import * works, along with import pygame, etc. I also did sudo apt-get install libav-tools for the ffmpeg library.

    However, the line clip = VideoFileClip("some_video.mp4").subclip(0, 60) causes my terminal to blank into a new, unusual terminal console with one line of error: error: string:

    I am using Ubunu 12.04.3 Server.

    bug 
    opened by codelucas 24
  • Repo activity and pending PRs

    Repo activity and pending PRs

    Hello!

    First off, thank you for the repo @Zulko!

    Looking at the repository, it appears there are a good number of pull requests that are awaiting review and merging.

    Would it be possible to have some of these PRs merging into master or even a develop branch? Are you open to allowing contributor merging and/or automated builds?

    Thank you again!

    question 
    opened by mbeacom 23
  • AssertionError in ffmpeg_reader.py

    AssertionError in ffmpeg_reader.py

    I get this error when trying to use moviepy

    >>> from moviepy.editor import *
    >>> VideoFileClip("test.mp4")
    Traceback (most recent call last):
      File "<input>", line 1, in <module>
      File ".../local/lib/python2.7/site-packages/moviepy/v
    ideo/io/VideoFileClip.py", line 46, in __init__
        self.reader = FFMPEG_VideoReader(filename, pix_fmt=pix_fmt)
      File ".../local/lib/python2.7/site-packages/moviepy/v
    ideo/io/ffmpeg_reader.py", line 33, in __init__
        self.lastread = self.read_frame()
      File .../local/lib/python2.7/site-packages/moviepy/v
    ideo/io/ffmpeg_reader.py", line 109, in read_frame
        assert len(s) == nbytes
    AssertionError
    

    (This line)

    Python version: 2.7.3 pip freeze: (I installed moviepy via pip)

    Pygments==1.6
    argparse==1.2.1
    bpython==0.12
    decorator==3.4.0
    moviepy==0.2.1.7
    numpy==1.8.0
    tqdm==1.0
    wsgiref==0.1.2
    

    ffmpeg version

    ffmpeg 0.8.10-4:0.8.10-0ubuntu0.12.04.1
    libavutil    51. 22. 2 / 51. 22. 2
    libavcodec   53. 35. 0 / 53. 35. 0
    libavformat  53. 21. 1 / 53. 21. 1
    libavdevice  53.  2. 0 / 53.  2. 0
    libavfilter   2. 15. 0 /  2. 15. 0
    libswscale    2.  1. 0 /  2.  1. 0
    libpostproc  52.  0. 0 / 52.  0. 0
    
    opened by kviktor 23
  • Portrait videos converted to landscape on load

    Portrait videos converted to landscape on load

    When making a VideoFileClip, as such video = editor.VideoFileClip(video_file), with a video_file that's portrait sized (video_file size is [1080, 1920]), Moviepy converts to landscape, video = [1920, 1080]), video.rotation = 90.

    I found this workaround (below), but seems like that's something that shouldn't happen.

    if video.rotation == 90:
        video = video.resize(video.size[::-1])
        video.rotation = 0
    bug video 
    opened by angyangie 22
  • write_videofile() appears fundamentally broken

    write_videofile() appears fundamentally broken

    Moviepy function write_videofile() works with static filename parameters, (i.e. "this_is_my_file.mp4") but does not work as intended when variables are passed into the filename parameter (i.e. my_variable = "a dynamic filename"). The resulting video possess audio, but is always frozen on the first frame.

    Expected Behavior

    production of video files with dynamic file names.

    Actual Behavior

    produces a video with the audio and the correct filename, but video is frozen on the first frame.

    Steps to Reproduce the Problem

    my_clip.write_videofile("meaty_chungus.mp4") #works
    
    meaty_chungus = "meaty_chungus"
    my_clip.write_videofile(meaty_chungus + ".mp4") #produces a video with the audio and the correct filename, but video is frozen on the first frame. 
    

    Specifications

    • Python Version: 3.x
    • Moviepy Version: most recent
    • Platform Name: Windows
    • Platform Version: 10
    opened by gintdm 21
  • MoviePy don't works in .exe file made by AutoPyToExe/PyInstaller without console

    MoviePy don't works in .exe file made by AutoPyToExe/PyInstaller without console

    I used AutoPyToExe to made an executable file from a .py, the executable works great but when I use the function "Windows Based (Hide Console)" don't work the MoviePy library. When the console it's not hidded MoviePy works but when I hide the console MoviePy stop working and don't say any error and only happen with this library because everything else work normal

    The option that don't work ⬇️⬇️

    The option that MoviePy doesn't work

    I want to do an app who convert videos formats, it's works but when I pass to .exe without console, don't work the conversion process. I'm using MoviePy and Python 3.10 in Windows 11

    The conversion code it's simple, the process works but with when I pass to .exe file without console stop working:

    #code...
    clip = moviepy.VideoFileClip(r"" + myPath)
    result = moviepy.CompositeVideoClip([clip])
    result.write_videofile(pathOnly + output, codec='mpeg4')
    #code...
    

    A video about my problem: https://mega.nz/file/4aZWEL6R#2y4WPr7ZgR386wfyV1V4ZAcFodhwzaL4LfIaVLhN9S0

    The conversion script don't works, I replicate the code here and gives me the same result:

    import moviepy.editor as moviepy
    from tkinter import *
    
    window = Tk()
    def run():
        clip = moviepy.VideoFileClip(r"" + r"C:\Users\migue\OneDrive\Desktop\promoVideo.mp4")
        result = moviepy.CompositeVideoClip([clip])
        result.write_videofile(r"C:\Users\migue\OneDrive\Desktop\promoVideo" + ".avi", codec='mpeg4')
    
    Button(text="run", command=run).pack()
    window.mainloop()
    

    I tried without interface but gives me an error:

    import moviepy.editor as moviepy
    
    clip = moviepy.VideoFileClip(r"" + r"C:\Users\migue\OneDrive\Desktop\promoVideo.mp4")
    result = moviepy.CompositeVideoClip([clip])
    result.write_videofile(r"C:\Users\migue\OneDrive\Desktop\promoVideo" + ".avi", codec='mpeg4')
    

    Error picture

    question 
    opened by MigueldeHaroce 0
  • Corrupted video freeze when start write audio file

    Corrupted video freeze when start write audio file

    if orginal files corrupted. When use write_videofile .audio.write_audiofile clip.audio

    when progress start freeze endless. Not response any error. I Think this is bug. I fix this problem extra ffmpeg code but waste of time with extra code. please fix.

    my corrupted check without freeze

    ` def CorruptedCheck(inputfile):

    cmd = f"ffmpeg -y -i {inputfile} -q:a 0 -map a CorruptedCheck.mp4"
    process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,shell=True,universal_newlines=True)
    for line in process.stdout:
        if "Error while decoding stream" in str(line):
            return False
             
    return True`
    
    bug 
    opened by FisherWooD 0
  • MoviePy doesn't handle mkv files.

    MoviePy doesn't handle mkv files.

    I tried opening a mkv file to horizontally flip it using this code.

    import moviepy.editor as mpy
    
    clip = mpy.VideoFileClip("hit.mkv")
    
    flipped_clip = clip.fx(mpy.vfx.mirror_x)
    
    colored_clip = flipped_clip.fx(mpy.vfx.colorx, 1.2)
    
    colored_clip.write_videofile("output.mkv")
    

    But it shows me KeyError & ValueError.

    c:/Users/Ait/OneDrive/Documents/moviepy/flip/flip.py 
    Traceback (most recent call last):
      File "C:\Users\Ait\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\moviepy\video\VideoClip.py", line 262, in write_videofile
        codec = extensions_dict[ext]['codec'][0]
    KeyError: 'mkv'
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "c:\Users\Ait\OneDrive\Documents\moviepy\flip\flip.py", line 13, in <module>
        colored_clip.write_videofile("output.mkv")
      File "<decorator-gen-55>", line 2, in write_videofile 
      File "C:\Users\Ait\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\moviepy\decorators.py", line 54, in requires_duration
        return f(clip, *a, **k)
      File "<decorator-gen-54>", line 2, in write_videofile 
      File "C:\Users\Ait\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\moviepy\decorators.py", line 135, in use_clip_fps_by_default
        return f(clip, *new_a, **new_kw)
      File "<decorator-gen-53>", line 2, in write_videofile 
      File "C:\Users\Ait\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\moviepy\decorators.py", line 22, in convert_masks_to_RGB
        return f(clip, *a, **k)
      File "C:\Users\Ait\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\moviepy\video\VideoClip.py", line 264, in write_videofile
        raise ValueError("MoviePy couldn't find the codec associated "
    ValueError: MoviePy couldn't find the codec associated with the filename. Provide the 'codec' parameter in write_videofile.
    PS C:\Users\Ait\OneDrive\Documents\moviepy\flip> 
    

    Please fix this issue or if it's not an issue, add mkv file support too.

    opened by TheHimanshuRastogi 0
  • Color coding methods are not consistent

    Color coding methods are not consistent

    margin colors have to be specified like (255,0,0) etc; strings like 'red' are not accepted.

    --> text colors have to be specified using strings such as 'red' (or hex code); tuples like (255,0,0) are not accepted. -->

    Expected Behavior

    Actual Behavior

    Steps to Reproduce the Problem

    Specifications

    • Python Version: 3.9
    • Moviepy Version: 1.0.2
    • Platform Name: Windows
    • Platform Version: Windows 10
    bug 
    opened by psyg0501 0
  • moviepy, pygame, pyqt5 conflict bug

    moviepy, pygame, pyqt5 conflict bug

    from PyQt5 import QtWidgets, QtGui, QtCore
    from PyQt5.QtWidgets import *
    from PyQt5.QtGui import *
    from PyQt5.QtCore import *
    import sys
    import moviepy.editor as mp
    
    class Ui_MainWindow(object):
        def setupUi(self, MainWindow):
            MainWindow.setObjectName("MainWindow")
            MainWindow.resize(763, 100)
            font = QtGui.QFont()
            font.setPointSize(15)
            MainWindow.setFont(font)
            MainWindow.setFocusPolicy(QtCore.Qt.ClickFocus)
            MainWindow.setStyleSheet("")
            self.centralwidget = QtWidgets.QWidget(MainWindow)
            self.centralwidget.setObjectName("centralwidget")
            self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
            self.verticalLayout.setObjectName("verticalLayout")
            self.title = QtWidgets.QLabel(self.centralwidget)
            font = QtGui.QFont()
            font.setFamily(".New York")
            font.setPointSize(42)
            font.setBold(True)
            font.setWeight(75)
            self.title.setFont(font)
            self.title.setCursor(QtGui.QCursor(QtCore.Qt.IBeamCursor))
            self.title.setFocusPolicy(QtCore.Qt.ClickFocus)
            self.title.setStyleSheet("color:white;")
            self.title.setScaledContents(True)
            self.title.setAlignment(QtCore.Qt.AlignCenter)
            self.title.setTextInteractionFlags(QtCore.Qt.LinksAccessibleByMouse|QtCore.Qt.TextSelectableByMouse)
            self.title.setObjectName("title")
            self.title.setText ('Moviepy Bug Example')
            self.title.adjustSize()
            self.verticalLayout.addWidget(self.title)
            self.plainTextEdit = QPlainTextEdit(self.centralwidget)
            self.plainTextEdit.setMaximumSize(QSize(16777215, 49))
            font = QFont()
            font.setFamily(".New York")
            font.setPointSize(29)
            font.setBold(True)
            font.setWeight(75)
            self.plainTextEdit.setFont(font)
            self.plainTextEdit.setFocusPolicy(Qt.ClickFocus)
            self.plainTextEdit.setHorizontalScrollBarPolicy(Qt.ScrollBarAlwaysOff)
            self.plainTextEdit.setLineWrapMode(QPlainTextEdit.NoWrap)
            self.plainTextEdit.setObjectName("plainTextEdit")
            self.plainTextEdit.setPlainText('Type Here with pygame installed')
            self.plainTextEdit.setStyleSheet("background: qlineargradient(x1:0, y1:0, x2:1, y2:0,"
                    "stop:0 rgb(0, 58, 109), stop: 0.5 rgb(0, 221, 255), stop:1 rgb(0, 58, 109));"
                    "border: 5px solid white;"
                    "color: white;")
            self.verticalLayout.addWidget(self.plainTextEdit)
            spacerItem = QSpacerItem(40, 20, QSizePolicy.Expanding, QSizePolicy.Minimum)
            self.verticalLayout.addItem(spacerItem)
            MainWindow.setCentralWidget(self.centralwidget)
            QMetaObject.connectSlotsByName(MainWindow)
    
    if __name__ == '__main__':
        app = QtWidgets.QApplication(sys.argv)
        MainWindow = QtWidgets.QMainWindow()
        ui = Ui_MainWindow()
        ui.setupUi(MainWindow)
        MainWindow.show()
        app.exec()
    

    Expected Behavior: One Keypress Event on QPlainTextEdit

    Actual Behavior: Two Keypress Events (it seems, I haven't actually confirmed this is what is happening behind the scenes. I just know that any letter key press gets put in twice. That and the backspace key doesn't work).

    Steps to Reproduce the Problem

    Install pyqt5, moviepy, and pygame and run the code above.

    Specifications

    • Python Version: 3.10.9 64-bit
    • Moviepy Version: 1.0.3
    • Platform Name: MacOS
    • Platform Version: Monterey 12.6

    Pretty sure it has to do with moviepy starting an instance of pygame if it sees that it's installed. This could just be a simple matter of the end user not having pygame installed in the environment if they're not using it for the current project.. But I figured i'd report this happening in case anyone else runs into the same issue.

    I think what is happening is the running instance of pygame registers a keypressed event at the same time pyqt5 does and so both events get inputted into the QPlainTextEdit. Then again, backspace key doesn't seem to work at all. I'm not really sure what the heck the conflict is to be honest. Hope this helps. I just uninstalled pygame to resolve the issue with my project but maybe you'd want to let end users decide if they want to start an instance of pygame instead of automatically starting it with moviepy. Hope this helps.

    bug 
    opened by james-craven 1
Releases(v2.0.0.dev2)
  • v2.0.0.dev2(Oct 5, 2020)

    v2.0.0.dev2

    Full Changelog

    There are still no major breaking changes compared to v1.0.3. Expect them to come in the next dev update. Any new changes made to the master branch will now be instantly reflected at https://moviepy.readthedocs.io, which is where documentation for all versions will be in the future. [#1328] Install with pip install moviepy --pre --upgrade.

    Added

    • New pix_fmt parameter in VideoFileClip, VideoClip.write_videofile(), VideoClip.write_gif() that allows passing a custom pix_fmt parameter such as "bgr24" to FFmpeg [#1237]
    • New change_duration parameter in Clip.set_fps() that allows changing the video speed to match the new fps [#1329]

    Changed

    • ffmpeg_parse_infos() and VideoFileClip now have optional decode_file parameter that ensures that the detected duration is correct, but may take a long time to run [#1063, #1222]
    • ffmpeg_parse_infos() and VideoFileClip now use fps metadata instead of tbr to detect a video's fps value [#1222]
    • FFMPEG_AudioReader.close_proc() -> FFMPEG_AudioReader.close() for consistency with FFMPEG_VideoReader [#1220]

    Fixed

    • Fixed ffmpeg_tools.ffmpeg_extract_subclip creating clips with incorrect duration metadata [#1317]
    • OSError: MoviePy error: failed to read the first frame of video file... would occasionally occur for no reason [#1220]
    • Fixed warnings being suppressed [#1191]
    • Fixed UnicodeDecodeError crash when file metadata contained non-UTF8 characters [#959]
    Source code(tar.gz)
    Source code(zip)
  • v2.0.0.dev1(Jun 4, 2020)

    v2.0.0.dev1 (2020-06-04)

    Full Changelog

    This development version introduces many bug-fixes and changes. Please note that there may be large backwards-incompatible changes between dev versions! The online documentation has not been updated to reflect the changes in the v2.0.0 branch, so for help on how to use the new features please refer to the docstrings in the source code. Install with pip install moviepy --pre --upgrade.

    Important Announcements

    • Support removed for Python versions 2.7, 3.4 & 3.5 [#1103, #1106]
    • If you were previously setting custom locations for FFmpeg or ImageMagick in config_defaults.py and MoviePy still cannot autodetect the binaries, you will need to switch to the new method using enviroment variables. [#1109]
    • All previously deprecated methods and parameters have been removed [#1115]

    Added

    • BitmapClip allows creating of custom frames using strings of letters
    • Clips can now be tested for equality with other clips using ==. This checks whether every frame of the two clips are identical
    • Support for path-like objects as an option wherever filenames are passed in as arguments [#1137]
    • Autodetect ImageMagick executable on Windows [#1109]
    • Optionally configure paths to FFmpeg and ImageMagick binaries with environment variables or a .env file [#1109]
    • Optional encoding parameter in SubtitlesClip [#1043]
    • Added new ffmpeg_stabilize_video() function in ffmpeg_tools
    • Optional temp_audiofile_path parameter in VideoClip.write_videofile() to specify where the temporary audiofile should be created [#1144]
    • VideoClip.set_layer() to specify the layer of the clip for use when creating a CompositeVideoClip [#1176]
    • ffmpeg_parse_infos additionally returns "video_bitrate" and "audio_bitrate" values [#930]
    • Access to the source video's bitrate in a VideoFileClip or AudioFileClip through videoclip.reader.bitrate and audioclip.reader.bitrate [#930]

    Changed

    • vfx.scroll arguments w and h have had their order swapped. The correct order is now w, h but it is preferable to explicitly use keyword arguments
    • Removed extra . in the output file name of ffmpeg_extract_subclip() when targetname is not specified [#939]

    Removed

    • Support removed for Python versions 2.7, 3.4 & 3.5
    • Setting paths to ImageMagick and FFMpeg binaries in config_defaults.py is no longer possible [#1109]
    • Removed config.get_setting() and config.change_settings() functions [#1109]
    • All previously deprecated methods and parameters [#1115]:
      • AudioClip.to_audiofile() -> use AudioClip.write_audiofile()
      • VideoClip.to_videofile() -> use VideoClip.write_videofile()
      • VideoClip.to_images_sequence() -> use VideoClip.write_images_sequence()
      • concatenate() -> use concatenate_videoclips()
      • verbose parameter in AudioClip.write_audiofile(), ffmpeg_audiowriter(), VideoFileClip(), VideoClip.write_videofile(), VideoClip.write_images_sequence(), ffmpeg_write_video(), write_gif(), write_gif_with_tempfiles(), write_gif_with_image_io() -> Instead of verbose=False, use logger=None
      • verbose_print() -> no replacement
      • col parameter in ColorClip() -> use color

    Fixed

    • When using VideoClip.write_videofile() with write_logfile=True, errors would not be properly reported [#890]
    • TextClip.list("color") now returns a list of bytes, not strings [#1119]
    • TextClip.search("colorname", "color") does not crash with a TypeError [#1119]
    • vfx.even_size previously created clips with odd sizes [#1124]
    • IndexError in vfx.freeze, vfx.time_mirror and vfx.time_symmetrize [#1124]
    • Using rotate() with a ColorClip no longer crashes [#1139]
    • AudioFileClip would not generate audio identical to the original file [#1108]
    • Fixed TypeError when using filename instead of txt parameter in TextClip [#1201]
    • Several issues resulting from incorrect time values due to floating point errors [#1195], for example:
      • Blank frames at the end of clips [#210]
      • Sometimes getting IndexError: list index out of range when using concatenate_videoclips [#646]
    • Applying resize with a non-constant newsize to a clip with a mask would remove the mask [#1200]
    • Using color_gradient() would crash with ValueError: The truth value of an array with more than one element is ambiguous [#1212]
    Source code(tar.gz)
    Source code(zip)
  • v1.0.3(May 7, 2020)

  • v1.0.2(Mar 26, 2020)

    v1.0.2 (2020-03-26)

    Full Changelog

    Note that this is likely to be the last release before v2.0, which will drop support for Python versions 2.7, 3.4 & 3.5 and will introduce other backwards-incompatible changes.

    Notable bug fixes:

    • Fixed bug that meant that some VideoFileClips were created without audio [#968]
    • Fixed bug so now the slide_out effect works [#795]

    Fixed bugs:

    Merged pull requests

    Merged pull requests:

    Closed issues

    Closed issues:

    • ImageSequenceClip write_videofile #1098
    • Formatting code with Black #1097
    • Make effects be callable classes #1096
    • URGENT - Documentation is inaccessible #1086
    • Drop support for python < 3.6 #1081
    • TextClip filenotfounderror winerror2 #1080
    • unable to create video from images #1074
    • Crash on loading the video, windows 10 #1071
    • Audio Issue while concatenate_videoclips'ing ImageClip and VideoFileClip (contains audio already) #1064
    • AttributeError: 'NoneType' object has no attribute 'stdout' #1054
    • Overlay a video on top of an image with Moviepy #1053
    • get_frame fails if not an early frame #1052
    • from google.colab import drive drive.mount('/content/drive') import cv2 import numpy as np from skimage import morphology from IPython import display import PIL image = cv2.imread('/content/drive/My Drive/CAR3/11.JPG',cv2.IMREAD_COLOR) from google.colab.patches import cv2_imshow #image = cv2.resize(image,(384,192)) cv2_imshow(image) #1051
    • Segmentation fault (core dumped) #1048
    • zip over two iter_frames functions doesn't render proper result #1047
    • CompositeVideoClip([xxx]).rotate(90) ValueError: axes don't match array #1042
    • to_soundarray Index error #1034
    • write_videofile does not add audio #1032
    • moviepy.video.io.VideoFileClip.VideoFileClip.set_audio does not set audio #1030
    • loop for concatenate_videoclips #1027
    • How to resize ImageClip? #1004
    • Pygame pollutes stdio with spammy message #985
    • Issue with ffmpeg version #934
    • No release notes for 1.0.0? #917
    • Imageio's new use of imageio-ffmpeg #908
    • ModuleNotFound: No module named 'imageio\_ffmpeg', or imageio v2.5.0 is breaking ffmpeg detection in config #906
    • CompositeVideoClip has no audio #876
    • Handling of the ffmpeg dependency #859
    • 'ffmpeg-linux64-v3.3.1' was not found on your computer; downloading it now. #839
    • Typo in variable name in transitions.py(t_s instead of ts) #692
    • version 0.2.3.2 TypeError: must be str, not bytes #650
    • AWS Lambda - Moviepy Error - #638
    • Adding conda-forge package #616
    • Several YouTube examples in Gallery page are unable to load. #600
    • ffmpeg not installed on Mac #595
    • FFMPEG not downloaded #493
    • Fix documentation #482
    • Moviepy is producing garbled videos #356
    • Help with contributing to the documentation? #327
    • audio custom filter documentation? #267
    • Mistake in doc, clips.html part. #136

    Source code(tar.gz)
    Source code(zip)
  • v1.0.1(Oct 1, 2019)

    v1.0.1 (2019-10-01)

    Full Changelog

    New features

    • Added support for Windows CI
    • Lots of bug fixes

    Full details

    Merged pull requests

    Merged pull requests:

    Closed issues

    Closed issues:

    • Thoughts on re-routing tqdm progress bar for external use? #412
    • Progress bar #128
    • website video examples broken videos #1019
    • Audio glitches when using concatenate_videoclips. #1005
    • txt_clip = TextClip(filename='learn.srt') --bug:TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType #984
    • txt_clip = TextClip(filename='learn.srt') --bug:TypeError: stat: path should be string, bytes, os.PathLike or integer, not NoneType #983
    • txt_clip = TextClip(filename='learn.srt')path should be string, bytes, os.PathLike or integer, not NoneType #982
    • write_videofile writes blank black when writing grayscale #973
    • i dont understand this question #967
    • Thank you guys! #957
    • Saving an opencv stream #953
    • Issue with reader not being defined #950
    • On Windows, ImageMagick needs to be installed with Utility mode for the convert.exe file to exist #937
    • extract subtitles #932
    • ffmpeg_parse_infos silently hangs on Windows when MP4 file contains enough metadata #926
    • crop missing from moviepy.video.fx.all #914
    • Segmentation Error on VPS #912
    • Error when installing with imageio #911
    • Backwards compatibility #889
    • frozen seconds in beginning of subclip using ffmpeg_extract_subclip() #847
    • [Errno 3] No such process : on Windows Sub Linux (ubuntu 16.x) #765
    • Progress bar newline error in Jupyter #740
    • Refer to magick on https://zulko.github.io/moviepy/install.html #689
    • Configure Appveyor support #628
    • tqdm progress bar write_videofile send to iterator #568
    • ffmpeg_extract_subclip returns black frames #508
    • Windows: specifying path to ImageMagick in config_defaults.py #378
    • AttributeError: 'NoneType' object has no attribute 'start' #191
    • ImageMagick write gif success but no file found #113

    Source code(tar.gz)
    Source code(zip)
  • v1.0.0(Oct 1, 2019)

    v1.0.0 (2019-02-17)

    Full Changelog

    New features

    Moviepy now supports much better progress bars, using Proglog. Support for custom callbacks and more!

    Full details

    Merged pull requests

    Closed issues

    • Can't overlay gizeh animation onto video with transparency/mask #898
    • [0.2.4.0] Garbled audio when exporting mp3 from mp4? #891
    • Error with VideoFileClip(filePath) #868
    • I am trying to run this code #867
    • Out of memory exception #862
    • simple problem on the first step: importing moviepy.editor #852
    • MoviePy insert multiple images in a video #840
    • Videogrep can't works with Moviepy in Windows #834
    • File "<stdin>", line 1 error #832
    • ImageMagick error - Ubuntu 16.04 #831
    • Combining thousands of small clips into one file #827
    • TypeError: 'ImageClip' object is not iterable #824
    • OSError: [WinError 6] The handle is invalid... concatenating clips #823
    • How to add audio tracks. not to replace it. #822
    • Missing 'ffmpeg-win32-v3.2.4.exe' #821
    • No sound with an audio clip add to an video in quicktime #820
    • Pip fails when trying to install #812
    • PermissionError after trying to delete a file after it's purpose is done #810
    • video clip from URI #780
    • Fails on FreeBSD #756
    • inconsistent behaviour of clip.get_frame() #751
    • Error with write_videofile #727
    • Trying to use moviepy on lambda, but has problem with ffmpeg #642
    • Unexpected Behavior With negative t_start in Subclip #341
    • Could not find a format to read the specified file in mode 'i' #219
    • WindowsError[5] and AttributeError Exception #170
    • Can't make VideoFileClip 'utf8' #169
    • Rendered output missing first frame #155
    • Incorrect output when concatenate_videoclips two quicktime videos #144
    • a bytes object is recognised as a string #120

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3.5(May 31, 2018)

    v0.2.3.5 (2018-05-31)

    Full Changelog

    New features

    Full details

    Merged pull requests

    Fixed bugs:

    • Removed Hz from audio_fps match in ffmpeg_parse_infos #665 (qmac)

    Merged pull requests:

    Closed issues

    Closed issues:

    • 100% of GIF does not convert to MP4, gets cut short. #802
    • How to add audio track to MP4? #794
    • ffmpeg 4.0 NVIDIA NVDEC-accelerated Support ? #790
    • Help!!!! errors during installation on Mac #788
    • Blink fx uses deprecated(?) method with\_mask\(\) #786
    • Built-in file downloader downloads files repeatedly? #779
    • Error in compositing video and SubtitlesClip by CompositeVideoClip #778
    • SubtitlesClip #777
    • Video Background #774

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3.4(Apr 22, 2018)

    v0.2.3.4 (2018-04-22)

    Full Changelog

    New features

    • Added pcm_s24le codec for .wav files (#769)
    • Added fullscreen parameter to preview (#773)
    • Added support for closing previews with quit button (#773)

    Full details

    Merged pull requests

    Merged pull requests:

    Closed issues

    Closed issues:

    • fail to install #771
    • install moviepy #758
    • How to prepend hexadecimal data to a binary file? #757
    • It’s time for a new release #742
    • wrong video duration value when concatenating videos with method = compose #574

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3.3(Apr 18, 2018)

    Change Log

    v0.2.3.3 (2018-04-17)

    Full Changelog

    Main Changes

    • Removed support for Python 3.3 (#688, #713)
    • Lots of bug fixes, including better support for Python 3.x and Windows
    • Some documentation updates
    • Test coverage increased from 53% to 65%
    • Credits tool fixed. Check it out here!
    Merged pull requests

    Fixed bugs:

    • Issue with nesting context managers #655
    • Is there one potential bug in FFMPEG_READER? #546
    • vfx.scroll giving TypeError: slice indices must be integers or None or have an __index__ method #527
    • IndexError when converting audio to_soundarray() #246
    • Unable to use unicode strings with Python 2 #76
    • Added ffmpeg download when importing moviepy.editor #731 (tburrows13)
    • Fixed bugs, neater code, changed docstrings in audiofiles #722 (tburrows13)
    • Resolve undefined name execfile in Python 3 #718 (cclauss)
    • Fix credits, added tests #716 (tburrows13)
    • res —> size to align with line 62 #710 (cclauss)
    • Add gap=0 to align with lines 40, 97, and 98 #709 (cclauss)
    • import numpy as np for lines 151 and 178 #708 (cclauss)
    • Convert advanced_tools.py to valid Python #707 (cclauss)
    • Added missing '%' operator for string formatting. #686 (taylorjdawson)
    • Addressing #655 #656 (gyglim)
    • initialize proc to None #637 (gyglim)
    • sometimes tempfile.tempdir is None, so use tempfile.gettempdir() function instead #633 (earney)
    • Issue629 #630 (Julian-O)
    • Fixed bug in Clip.set_duration() #613 (kencochrane)
    • Fixed typo in the slide_out transition #612 (kencochrane)
    • Exceptions do not have a .message attribute. #603 (Julian-O)
    • Issue #574, fix duration of masks when using concatenate(.., method="compose") #585 (earney)
    • Fix out of bounds error #570 (shawwn)
    • fixed ffmpeg error reporting on Python 3 #565 (narfdotpl)
    • Add int() wrapper to scroll to prevent floats #528 (tburrows13)
    • Fix issue #464, repeated/skipped frames in ImageSequenceClip #494 (neitzal)
    • fixes #248 issue with VideoFileClip() not reading all frames #251 (aldilaff)

    Implemented enhancements:

    • Use feature detection instead of version detection #721 (cclauss)
    • Fixed Optional Progress Bar in cuts/detect_scenes #587 (scherroman)
    • Fix travis build and enable pip caching #561 (mbeacom)
    • Avoid mutable default arguments #553 (mbeacom)
    • add ImageSequenceClip image size exception #550 (earney)

    Merged pull requests:

    Closed issues

    • Overly Restrictive Requirements #767
    • Using a gif as an ImageClip? #764
    • How can I include a moving 'arrow' in a clip? #762
    • How to call moviepy.video.fx.all.crop() ? #760
    • ImportError: Imageio Pillow requires Pillow, not PIL! #748
    • Fail to call VideoFileClip() because of WinError 6 #746
    • concatenate_videoclips with fadein fadeout #743
    • Ignore - sorry! #739
    • Image becomes blurr with high fps #735
    • Https protocol not found with ffmpeg #732
    • Storing Processed Video clip takes a long time #726
    • image corruption when concatenating images of different sizes #725
    • How to install MoviePy on OS High Sierra #706
    • Issue when running the first example of text overlay in ubuntu 16.04 with python3 #703
    • Extracting frames #702
    • Error - The handle is invalid - Windows Only #697
    • ImageMagick not detected by moviepy while using SubtitlesClip #693
    • Textclip is not working at all #691
    • Remove Python 3.3 testing ? #688
    • In idle, 25 % CPU #676
    • Audio error #675
    • Insert a ImageClip in a CompositeVideoClip. How to add nil audio #669
    • Output video is garbled, single frames output are fine #651
    • 'missing handle' error #644
    • issue with proc being None #636
    • Looping parameter is missing from write_gif_with_image_io() #629
    • would it be optionally possible to use pgmagick package ? (instead of ImageMagick binary) #625
    • concatenate_videoclips() can't handle TextClips #622
    • Writing movie one frame at a time #619
    • Fatal Python error: PyImport_GetModuleDict: no module dictionary! #618
    • line 54, in requires_duration return #601
    • test_duration() fails in test_TextClip() #598
    • Geting framesize from moviepy #571
    • Write_videofile results in 1930x1080 even when I force clip.resize(width=1920,height=1080) before write_videofile #547
    • AttributeError: AudioFileClip instance has no attribute 'afx' #513
    • ImageSequenceClip repeats frames depending on fps #464
    • manual_tracking format issue #373
    • resize video when time changed trigger a error #334
    • WindowsError: [Error 5] Access is denied #294
    • TypeError in Adding Soundtrack #279
    • Defaults fail for ImageSequenceClip() #218
    • audio normalization #32
    • Unclosed processes. #19

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3.2(Apr 18, 2018)

    New

    • #300 progress_bar parameter added to write_images_sequence
    • #529 VideoFileClip objects now have a rotation attribute

    Bug Fixes

    • #336 ValueError: operands could not be broadcast together with shapes bug fixed (#334)

    Docs

    Full details

    Merged pull requests

    Closed issues

    • Requirements adjustments #530

    • Documentation build failures #525

    • Index is out of bounds - AudioFileClip #521

    • Youtube videos fail to load in documentation #536

    • unicodeDecoderError by running the setup.py during moviepy pip install #532

    • Should we push another version? #481

    • Add matplotlib example to the user guide? #421

    • Fails to list fx after freezing an app with moviepy #274

    • Documentation doesn't match ffmpeg presets #232

    • Minor Modifications #515 (gpantelis)

    Source code(tar.gz)
    Source code(zip)
  • v0.2.3.1(Apr 5, 2017)

    Merged pull requests

    Closed issues

    • concatenate_videoclips([clip1,clip2]) results in a clip where the second clip is skewed and has severe lines #520
    • FFMPEG crashes if the script is a .pyw #517
    • VideoFileClip instance has no attribute 'reader' #512
    • Adding emoji with moviepy #507
    • How to remove original audio from the video file ? #504
    • Duration Format With Moviepy #502
    • AttributeError: 'numpy.ndarray' object has no attribute 'tobytes' #499
    • New install... VideoFileClip("x.mp4").subclip(0,13) gives "reader not defined error" #461
    • Bytes-like object is required, not 'str' in version 0.2.2.13 #455
    • Can't import gifs into moviepy #452
    • AudioFileClip #448
    • Error with Pillow #445
    • Moviepy AttributeError: 'NoneType' object has no attribute 'shape' #439
    • This is what exception.... #437
    • when I from moviepy.editor import *, There cause exception,That's why....... #436
    • No available fonts in moviepy #426
    • Project maintenance, mgmt, workflow etc. #422
    • Cannot run in a django project on apache #420
    • error 'unicode' object has no attribute 'shape' #417
    • VideoClip has no attribute fps error when trying to concatenate #407
    • The Travis tester seems to be failing #406
    • Slow motion video massively sped up #404
    • moviepy not able to find installed ffmpeg bug? #396
    • Cannot open audio: AttributeError: 'NoneType' object has no attribute 'start' #393
    • DirectoryClip??? Where is it? #385
    • Minor Documentation typo in VideoFileClip #375
    • Documentation Update: VideoTools #372
    • ValueError: Invalid value for quantizer: 'wu' #368
    • Parameter color in ColorClip #366
    • Different size videos #365
    • Add support for dithering GIF output #358
    • VideoFileClip instance has no attribute 'coreader' #357
    • ffmpeg_parse_infos fails while parsing tbr #352
    • No audio when adding Mp3 to VideoFileClip MoviePy #350
    • ImportError: No module named tracking (OS: 10.11.6 "El Capitan", Python 2.7.12) #348
    • Moviepy not compatible with Python 3.2 #333
    • Attribute Error (Raspberry Pi) #332
    • ImageSequenceClip: Error when fps not provided but durations provided #326
    • CI Testing #325
    • Pythonanywhere Moviepy #324
    • Documentation for resize parameter is wrong #319
    • ImageClip's with default settings can not be concatenated #314
    • librelist does not work #309
    • Broken Gallery in Documentation #304
    • File IOError when trying to extract subclips from mov file on Ubuntu #303
    • write_gif failing #296
    • Resize not working #272
    • stretch image to size of frame #250
    • ffprobe metadata on video file clips #249
    • Credits1 is not working - gap missing, isTransparent flag not available #247
    • Generating Gif from images #240
    • permission denied #233
    • receive the video advancement mounting (Ex: in %) #224
    • Import of MoviePy and Mayavi causes a segfault #223
    • Video overlay (gauges...) #222
    • OSError: [WinError 193] %1 n’est pas une application Win32 valide #221
    • Warning: skimage.filter is deprecated #214
    • External FFmpeg issues #193
    • Video and Audio are out of sync after write #192
    • Broken image on PyPI #187
    • ImageSequenceClip from OpenEXR file sequence generate black Clip video #186
    • Loading video from url #185
    • Wrong number of frames in .gif file #181
    • Converting mp4 to ogv error in bitrate #174
    • embed clip in a jupyter notebook #160
    • How to create a video from a sequence of images without writing them on memory #159
    • LaTeX strings #156
    • UnboundLocalError in video/compositing/concatenate.py #145
    • Crop a Video with four different coodinate pairs #142
    • global name 'colorGradient' is not defined #141
    • rotating image animation producing error #130
    • bug introduced in 0.2.2.11? #129
    • Getting a TypeError in FramesMatch #126
    • moviepy is awesome #125
    • Concanate clips with different size #124
    • TextClip.list('font') raises TypeError in Python 3 #117
    • Attempt to Download freeimage failing #111
    • Invalid buffer size, packet size < expected frame_size #109
    • imageio has permission problems as WSGI user on Amazon Web Server #106
    • Possibility to avoid code duplication #99
    • Memory Leak In VideoFileClip #96
    • [Windows users: help !] Finding ImageMagick automatically on windows #80
    • Save to Amazon S3 #6
    • transparency bug in concatenate_videoclips() #103
    • Possible to create out of bounds subclip #470
    • TypeError: 'float' object cannot be interpreted as an integer #376
    • TextClip.list('color') failed to return color list #371
    • Bug in write_gif #359
    • crossfadeout "Attribute 'duration' not set" #354
    • AAC support for mp4 #344
    • Python2 unicode_literals errors #293
    • concatenate ImageClip #285
    • VideoFileClip instance has no attribute 'reader' #255
    • TextClip.list('color') fails #200

    Source code(tar.gz)
    Source code(zip)
  • v0.2.2.13(Feb 15, 2017)

    This release includes a few Python 3 compatibility fixes and bug fixes.

    • [x] Merged #244 - Resolving on_color function docstring has wrong parameter
    • [x] Merged #384 - Resolving #383 - ensures int arguments to np.reshape
    • [x] Merged #403 - Resolving #335 and #401 - Handle py3 compatibility for writers stdin error handling.
    • [x] Merged #405 - Add self.filename as a VideoFileClip attribute
    • [x] Merged #410 - Resolving #313 - Make concatenate_videoclips python 3 compatible
    Source code(tar.gz)
    Source code(zip)
  • v0.2.2.12(Feb 3, 2017)

  • v0.2.2(Dec 11, 2014)

    This is the first release of a trilogy that will include "The Dark MoviePy" and "The Dark MoviePy Rises". At this point I am not sure what releases are for.

    So let's say this release celebrates that MoviePy is quite stable around different platforms and Python 2/3, or people stopped reporting bugs.

    Major ideas for the next release:

    • Simplify MoviePy's binary dependencies installation. This could be done by using ImageIO for downloading ffmpeg.
    • Use better backends for GIF making, ImageMagick is too slow. This could also be done with ImageIO.
    • Make a file manager which maintains closed the connections to files that are not used, because file connextions take a lot of RAM. This would allow to have hundreds of VideoClips ImageClips and AudioClips open, but only a few really making a connection.

    It's going to be fun !

    Source code(tar.gz)
    Source code(zip)
OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality video editing and animation solutions to the world.

OpenShot Video Editor is an award-winning free and open-source video editor for Linux, Mac, and Windows, and is dedicated to delivering high quality v

OpenShot Studios, LLC 3.1k Jan 1, 2023
Python script for extracting audio from video files and creating Mel spectrograms

video2spectrogram About This package is meant to automate the process of extracting audio files from videos and saving the plots computed from these a

Alexandros Stergiou 1 Oct 28, 2021
Real-time video and audio streams over the network, with Streamlit.

streamlit-webrtc Example You can try out the sample app using the following commands.

Yuichiro Tachibana (Tsuchiya) 648 Jan 1, 2023
Convert Video Files To Text And Audio

Video-To-Text Convert Video Files To Text And Audio Convert To Audio 1: open dvtt folder in cmd 2: run this command in cmd => main.py Audio Convert To

Delta Inc. 2 Dec 5, 2021
Video-to-GIF-Converter - A small code snippet that can be used to convert any video to a gif

Video to GIF Converter Project Description: This is a small code snippet that ca

Hassan Shahzad 3 Jun 22, 2022
Terminal-Video-Player - A program that can display video in the terminal using ascii characters

Terminal-Video-Player - A program that can display video in the terminal using ascii characters

null 15 Nov 10, 2022
A tool to fuck a video/audio quality using FFmpeg

Media quality fucker A tool to fuck a video/audio quality using FFmpeg How to use Download the source Download Python Extract FFmpeg Put what you want

Maizena 8 Jan 25, 2022
A web RTSP play platform based on websocket and tornado, websocket use blob binaryType read as ArrayBuffer

A web RTSP play platform based on websocket and tornado, websocket use blob binaryType read as ArrayBuffer

null 2 Feb 25, 2022
video streaming userbot (vsu) based on pytgcalls for streaming video trought the telegram video chat group.

VIDEO STREAM USERBOT ✨ an another telegram userbot for streaming video trought the telegram video chat. Environmental Variables ?? API_ID : Get this v

levina 6 Oct 17, 2021
Python application that can be used to generate video thumbnail for mp4 and mkv file types.

Thumbnail Generator ?? What is This This is a Python application that can be used to generate video thumbnail for mp4 and mkv file types. Installation

Tharindu N. 13 Jan 3, 2023
A youtube video link or id to video thumbnail python package.

Youtube-Video-Thumbnail A youtube video link or id to video thumbnail python package. Made with Python3

Fayas Noushad 10 Oct 21, 2022
Text2Video's purpose is to help people create videos quickly and easily by simply typing out the video’s script and a description of images to include in the video.

Text2Video Text2Video's purpose is to help people create videos quickly and easily by simply typing out the video’s script and a description of images

Josh Chen 19 Nov 22, 2022
Takes a video as an input and creates a video which is suitable to upload on Youtube Shorts and Tik Tok (1080x1920 resolution).

Shorts-Tik-Tok-Creator Takes a video as an input and creates a video which is suitable to upload on Youtube Shorts and Tik Tok (1080x1920 resolution).

Arber Hakaj 5 Nov 9, 2022
Extracting frames from video and create video using frames

Extracting frames from video and create video using frames This program uses opencv library to extract the frames from video and create video from ext

null 1 Nov 19, 2021
A Python library that simplifies working with video from soccer matches.

Match Video This is a Python library that simplifies working with video from soccer matches. It allows match video to be selected intuitively by perio

Grant Wenzinger 2 Jul 21, 2022
Streamlink is a CLI utility which pipes video streams from various services into a video player

Streamlink is a CLI utility which pipes video streams from various services into a video player

null 8.2k Dec 26, 2022
Filtering user-generated video content(SberZvukTechDays)Filtering user-generated video content(SberZvukTechDays)

Filtering user-generated video content(SberZvukTechDays) Table of contents General info Team members Technologies Setup Result General info This is a

Roman 6 Apr 6, 2022
Telegram Video Chat Video Streaming bot 🇱🇰

?? Get SESSION_NAME from below: Pyrogram ?? Preview ✨ Features Music & Video stream support MultiChat support Playlist & Queue support Skip, Pause, Re

DOOZY YEZ 5 Jun 26, 2022
Play Video & Music on Telegram Group Video Chat

?? DEMONGIRL ?? ʜᴇʟʟᴏ ❤️ ???? Join us ᴠɪᴅᴇᴏ sᴛʀᴇᴀᴍ ɪs ᴀɴ ᴀᴅᴠᴀɴᴄᴇᴅ ᴛᴇʟᴇʀᴀᴍ ʙᴏᴛ ᴛʜᴀᴛ's ᴀʟʟᴏᴡ ʏᴏᴜ ᴛᴏ ᴘʟᴀʏ ᴠɪᴅᴇᴏ & ᴍᴜsɪᴄ ᴏɴ ᴛᴇʟᴇɢʀᴀᴍ ɢʀᴏᴜᴘ ᴠɪᴅᴇᴏ ᴄʜᴀᴛ ?? ɢ

Jonathan 5 Dec 31, 2021