Skip to content

Video editing with Python

Update install.rst

p00pcvmd791116f11e1
diff --git a/docs/getting_started/install.rst b/docs/getting_started/install.rst
index 99ad09f9..d1bb0596 100644
--- a/docs/getting_started/install.rst
+++ b/docs/getting_started/install.rst
@@ -1,7 +1,7 @@
.. _install:
Installation
-==========================
+============
Installation is done with ``pip``. If you don't have ``pip``, take a look at `how to install it <https://pip.pypa.io/en/stable/installation/>`_.
@@ -11,28 +11,25 @@ With ``pip`` installed, just type this in a terminal:
$ (sudo) pip install moviepy
+.. _install-binaries:
-.. _install#binaries:
-
-Installation of additional binaries
-------------------------------------
+Installation of Additional Binaries
+-----------------------------------
MoviePy depends on the software ffmpeg_ for video reading and writing and on ``ffplay`` for video previewing.
-You don't need to worry about ffmpeg_, as it should be automatically downloaded/installed by ImageIO during your first use of MoviePy (it takes a few seconds).
-
-You do need to worry about ``ffplay`` if you plan on using video/audio previewing. For these cases, make sure to have ``ffplay`` installed (it can usually be found alongside ``ffmpeg``) and
-make sure it is accessible to Python, or define a custom path (see below).
+You don't need to worry about ffmpeg_, as it should be automatically downloaded/installed by ImageIO during your first use of MoviePy (it takes a few seconds).
+You do need to worry about ``ffplay`` if you plan on using video/audio previewing. For these cases, make sure to have ``ffplay`` installed (it can usually be found alongside ``ffmpeg``) and ensure it is accessible to Python, or define a custom path (see below).
-Define custom paths to binaries
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Define Custom Paths to Binaries
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If you want to use a specific version of FFmpeg and FFplay, you can do so using environment variables.
There are a couple of environment variables used by MoviePy that allow you to configure custom paths to the external tools.
-To setup any of these variables, the easiest way is to do it in Python before importing objects from MoviePy. For example:
+To set up any of these variables, the easiest way is to do it in Python before importing objects from MoviePy. For example:
.. code-block:: python
@@ -40,7 +37,6 @@ To setup any of these variables, the easiest way is to do it in Python before im
os.environ["FFMPEG_BINARY"] = "/path/to/custom/ffmpeg"
os.environ["FFPLAY_BINARY"] = "/path/to/custom/ffplay"
-
Alternatively, after installing the optional dependencies, you can create
a ``.env`` file in your working directory that will be automatically read.
For example
@@ -50,39 +46,37 @@ For example
FFMPEG_BINARY=/path/to/custom/ffmpeg
FFPLAY_BINARY=/path/to/custom/ffplay
+Environment Variables
+---------------------
-Environment variables
-"""""""""""""""""""""""
-
-There are 2 available environment variables for external binaries :
+There are two available environment variables for external binaries:
``FFMPEG_BINARY``
- Normally you can leave it to its default ('ffmpeg-imageio') in which
- case imageio will download the right ffmpeg binary (on first use) and then always use that binary.
+ Normally you can leave it at its default ('ffmpeg-imageio'), in which
+ case imageio will download the correct ffmpeg binary (on first use) and then always use that binary.
- The second option is ``"auto-detect"``. In this case ffmpeg will be whatever
+ The second option is ``"auto-detect"``. In this case, ffmpeg will be whatever
binary is found on the computer: generally ``ffmpeg`` (on Linux/macOS) or ``ffmpeg.exe`` (on Windows).
Lastly, you can set it to use a binary at a specific location on your disk by specifying the exact path.
-
``FFPLAY_BINARY``
The default is ``"auto-detect"``. MoviePy will try to find and use the installed ``ffplay`` binary.
- You can set it to use a binary at a specific location on your disk. On Windows, this might look like::
+ You can set it to use a binary at a specific location on your disk. On Windows, this might look like:
+
+ .. code-block:: python
os.environ["FFPLAY_BINARY"] = r"C:\Program Files\ffmpeg\ffplay.exe"
+Verify if MoviePy Finds Binaries
+--------------------------------
-Verify if MoviePy find binaries
-""""""""""""""""""""""""""""""""
-To test if FFmpeg and FFplay are found by MoviePy, in a Python console, you can run :
+To test if FFmpeg and FFplay are found by MoviePy, in a Python console, you can run:
-.. code-block:: python
+.. code:: python
from moviepy.config import check
check()
-
.. _ffmpeg: https://www.ffmpeg.org/download.html
-