Optional but useful dependencies
You can install moviepy with all dependencies via:
System Message: WARNING/2 (<string>, line 82)
Cannot analyze code. Pygments package not found.
.. code:: bash
$ (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, it will be automatically detected by MoviePy, except on Windows! Windows users, before installing MoviePy by hand, need to edit moviepy/config_defaults.py to provide the path to the ImageMagick binary, which is called convert. It should look like this:
System Message: WARNING/2 (<string>, line 90)
Cannot analyze code. Pygments package not found.
.. code:: python
IMAGEMAGICK_BINARY = "C:\\Program Files\\ImageMagick_VERSION\\convert.exe"
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
Once you have installed it, ImageMagick will be automatically detected by MoviePy, (except for windows users and Ubuntu 16.04LTS users).
For Windows users, before installing MoviePy by hand, go into the moviepy/config_defaults.py file and provide the path to the ImageMagick binary called magick. It should look like this:
System Message: WARNING/2 (<string>, line 108)
Cannot analyze code. Pygments package not found.
.. code:: python
IMAGEMAGICK_BINARY = "C:\\Program Files\\ImageMagick_VERSION\\magick.exe"
If you are using an older version of ImageMagick, keep in mind the name of the executable is not magick.exe but convert.exe. In that case, the IMAGEMAGICK_BINARY property should be C:\\Program Files\\ImageMagick_VERSION\\convert.exe
For Ubuntu 16.04LTS users, after installing MoviePy on the terminal, IMAGEMAGICK will not be detected by moviepy. This bug can be fixed. Modify the file in this directory: /etc/ImageMagick-6/policy.xml, comment out the statement <!-- <policy domain="path" rights="none" pattern="@*" /> -->.
PyGame is needed for video and sound previews (useless if you intend to work with MoviePy on a server but really essential for advanced video editing by hand).
For instance, using the method clip.resize requires that at least one of Scipy, PIL, Pillow or OpenCV is installed.