Skip to content

Commit

Permalink
Delete outdated opencv install instructions and fixe english syntax (Z…
Browse files Browse the repository at this point in the history
  • Loading branch information
jonnekaunisto authored Apr 18, 2020
1 parent a996fba commit 103b2aa
Show file tree
Hide file tree
Showing 15 changed files with 23 additions and 59 deletions.
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ Maintainers
.. Software, Tools, Libraries
.. _Pillow: https://pillow.readthedocs.org/en/latest/
.. _Scipy: https://www.scipy.org/
.. _`OpenCV 2.4.6`: https://sourceforge.net/projects/opencvlibrary/files/
.. _`OpenCV 2.4.6`: https://github.com/skvark/opencv-python
.. _Pygame: https://www.pygame.org/download.shtml
.. _Numpy: https://www.scipy.org/install.html
.. _imageio: https://imageio.github.io/
Expand Down
2 changes: 1 addition & 1 deletion docs/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ I can't seem to read any video with MoviePy
""""""""""""""""""""""""""""""""""""""""""""""

Known reason: you have a deprecated version of FFMPEG, install a recent version from the
website, not from your OS's repositories ! (see :ref:`install`).
website, not from your OS's repositories! (see :ref:`install`).

Previewing videos make them slower than they are
"""""""""""""""""""""""""""""""""""""""""""""""""
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/compo_from_image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Placing clips according to a picture
======================================


So how do you do some complex compositing like this ?
So how do you do some complex compositing like this?

.. raw:: html

Expand Down
2 changes: 1 addition & 1 deletion docs/gallery.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Gallery
========

Here are a few projects using MoviePy. The gallery will fill up as more people start using MoviePy (which is currently one year old). If you have a nice project using MoviePy let us know !
Here are a few projects using MoviePy. The gallery will fill up as more people start using MoviePy (which is currently one year old). If you have a nice project using MoviePy let us know!

Videos edited with Moviepy
---------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/compositing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ There are many ways to specify the position: ::
# clip2 is at 40% of the width, 70% of the height of the screen:
clip2.set_position((0.4,0.7), relative=True)

# clip2's position is horizontally centered, and moving down !
# clip2's position is horizontally centered, and moving down!
clip2.set_position(lambda t: ('center', 50+t) )

When indicating the position keep in mind that the ``y`` coordinate has its zero at the top of the picture:
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/effects.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ All these effects have in common that they are **not inplace**: they do NOT modi

my_clip = VideoFileClip("some_file.mp4")
my_clip.set_start(t=5) # does nothing, changes are lost
my_new_clip = my_clip.set_start(t=5) # good !
my_new_clip = my_clip.set_start(t=5) # good!

Also, when you write ``clip.resize(width=640)``, it does not immediately applies the effect to all the frames of the clip, but only to the first frame: all the other frames will be resized only when required (that is, when you will write the whole clip to a file of when you will preview it). Said otherwise, creating a new clip is neither time nor memory hungry, all the computations happen during the final rendering.

Expand Down Expand Up @@ -47,7 +47,7 @@ but this is not easy to read. To have a clearer syntax you can use ``clip.fx``:
.fx( effect_2, args2)
.fx( effect_3, args3))

Much better ! There are already many effects implemented in the modules ``moviepy.video.fx`` and ``moviepy.audio.fx``. The fx methods in these modules are automatically applied to the sound and the mask of the clip if it is relevant, so that you don't have to worry about modifying these. For practicality, when you use ``from moviepy.editor import *``, these two modules are loaded as ``vfx`` and ``afx``, so you may write something like ::
Much better! There are already many effects implemented in the modules ``moviepy.video.fx`` and ``moviepy.audio.fx``. The fx methods in these modules are automatically applied to the sound and the mask of the clip if it is relevant, so that you don't have to worry about modifying these. For practicality, when you use ``from moviepy.editor import *``, these two modules are loaded as ``vfx`` and ``afx``, so you may write something like ::
from moviepy.editor import *
clip = (VideoFileClip("myvideo.avi")
Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/efficient_moviepy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ The best way to start with MoviePy is to use it with the IPython Notebook: it ma

.. _should_i_use_moviepy_editor:

Should I use ``moviepy.editor`` ?
Should I use ``moviepy.editor``?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Most examples in this documentation use the submodule ``moviepy.editor``, but this submodule is not adapted to all needs so should *you* use it ? Short answer: if you use MoviePy to edit videos *by hand*, use it, but if you use MoviePy inside a larger library or program or webserver, it is better to avoid it and just load the functions that you need.
Most examples in this documentation use the submodule ``moviepy.editor``, but this submodule is not adapted to all needs so should *you* use it? Short answer: if you use MoviePy to edit videos *by hand*, use it, but if you use MoviePy inside a larger library or program or webserver, it is better to avoid it and just load the functions that you need.

The module ``moviepy.editor`` can be loaded using one of the three following methods: ::

Expand Down
4 changes: 2 additions & 2 deletions docs/getting_started/quick_presentation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Quick presentation

This section explains when MoviePy can be used and how it works.

Do I need MoviePy ?
Do I need MoviePy?
~~~~~~~~~~~~~~~~~~~

Here are a few reasons why you may want to edit videos in Python:
Expand Down Expand Up @@ -56,7 +56,7 @@ In a typical MoviePy script, you load video or audio files, modify them, put the
# Overlay the text clip on the first video clip
video = CompositeVideoClip([clip, txt_clip])

# Write the result to a file (many options available !)
# Write the result to a file (many options available!)
video.write_videofile("myHolidays_edited.webm")


Expand Down
8 changes: 4 additions & 4 deletions docs/getting_started/videoclips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ The following code summarizes the base clips that you can create with moviepy: :
clip = VideoFileClip("my_video_file.mp4") # or .avi, .webm, .gif ...
clip = ImageSequenceClip(['image_file1.jpeg', ...], fps=24)
clip = ImageClip("my_picture.png") # or .jpeg, .tiff, ...
clip = TextClip("Hello !", font="Amiri-Bold", fontsize=70, color="black")
clip = TextClip("Hello!", font="Amiri-Bold", fontsize=70, color="black")
clip = ColorClip(size=(460,380), color=[R,G,B])

# AUDIO CLIPS
clip = AudioFileClip("my_audiofile.mp3") # or .ogg, .wav... or a video !
clip = AudioFileClip("my_audiofile.mp3") # or .ogg, .wav... or a video!
clip = AudioArrayClip(numpy_array, fps=44100) # from a numerical array
clip = AudioClip(make_frame, duration=3) # uses a function make_frame(t)

Expand Down Expand Up @@ -170,8 +170,8 @@ Sometimes it is impossible for MoviePy to guess the ``duration`` attribute of th

# Make a video showing a flower for 5 seconds
my_clip = Image("flower.jpeg") # has infinite duration
my_clip.write_videofile("flower.mp4") # Will fail ! NO DURATION !
my_clip.set_duration(5).write_videofile("flower.mp4") # works !
my_clip.write_videofile("flower.mp4") # Will fail! NO DURATION!
my_clip.set_duration(5).write_videofile("flower.mp4") # works!


Animated GIFs
Expand Down
5 changes: 2 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,14 @@ User Guide
gallery
examples/examples
docker
opencv_instructions
FAQ
advanced_tools/advanced_tools
ref/ref

Contribute !
Contribute!
--------------

MoviePy is an open source software originally written by Zulko_ and released under the MIT licence. It works on Windows, Mac, and Linux, with Python 2 or Python 3. The code is hosted on Github_, where you can push improvements, report bugs and ask for help. There is also a MoviePy forum on Reddit_ and a mailing list on librelist_ .
MoviePy is an open source software originally written by Zulko_ and released under the MIT licence. It works on Windows, Mac, and Linux, with Python 2 or Python 3. The code is hosted on Github_, where you can push improvements, report bugs and ask for help. There is also a MoviePy forum on Reddit_ and a mailing list on librelist_.

.. raw:: html

Expand Down
6 changes: 3 additions & 3 deletions docs/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ If you have neither ``setuptools`` nor ``ez_setup`` installed the command above

(sudo) python setup.py install

MoviePy depends on the Python modules NumPy_, Imageio_, Decorator_, and Proglog_, which will be automatically installed during MoviePy's installation. It should work on Windows/Mac/Linux, with Python 2.7+ and 3 ; if you have trouble installing MoviePy or one of its dependencies, please provide feedback !
MoviePy depends on the Python modules NumPy_, Imageio_, Decorator_, and Proglog_, which will be automatically installed during MoviePy's installation. It should work on Windows/Mac/Linux, with Python 2.7+ and 3 ; if you have trouble installing MoviePy or one of its dependencies, please provide feedback!

MoviePy depends on the software FFMPEG for video reading and writing. You don't need to worry about that, as FFMPEG should be automatically downloaded/installed by ImageIO during your first use of MoviePy (it takes a few seconds). If you want to use a specific version of FFMPEG, you can set the FFMPEG_BINARY environment variable See ``moviepy/config_defaults.py`` for details.

Expand All @@ -29,7 +29,7 @@ Other optional but useful dependencies

ImageMagick_ is not strictly required, only if you want to write texts. It can also be used as a backend for GIFs but you can do GIFs with MoviePy without ImageMagick.

Once you have installed it, ImageMagick will be automatically detected by MoviePy, **except on Windows !**. Windows user, 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 ::
Once you have installed it, ImageMagick will be automatically detected by MoviePy, **except on Windows!**. Windows user, 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 ::

IMAGEMAGICK_BINARY = "C:\\Program Files\\ImageMagick_VERSION\\magick.exe"

Expand Down Expand Up @@ -65,6 +65,6 @@ If you are on linux, these packages will likely be in your repos.

.. _Github: https://github.com/Zulko/moviepy
.. _PyPI: https://pypi.python.org/pypi/moviepy
.. _`OpenCV 2.4.6`: https://sourceforge.net/projects/opencvlibrary/files/
.. _`OpenCV 2.4.6`: https://github.com/skvark/opencv-python


35 changes: 0 additions & 35 deletions docs/opencv_instructions.rst

This file was deleted.

2 changes: 1 addition & 1 deletion examples/headblur.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
# Generate the text, put in on a grey background

txt = TextClip(
"Hey you ! \n You're blurry!",
"Hey you! \n You're blurry!",
color="grey70",
size=clip.size,
bg_color="grey20",
Expand Down
2 changes: 1 addition & 1 deletion examples/star_worms.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def trapzWarp(pic, cx, cy, ismask=False):
We will now code the video tutorial for this video.
When you think about it, it is a code for a video explaining how to
make another video using some code (this is so meta !).
make another video using some code (this is so meta!).
This code uses the variables of the previous code (it should be placed
after that previous code to work).
Expand Down
2 changes: 1 addition & 1 deletion moviepy/audio/fx/all/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Loads all the fx !
Loads all the fx!
Usage:
import moviepy.audio.fx.all as afx
audio_clip = afx.volume_x(some_clip, .5)
Expand Down

0 comments on commit 103b2aa

Please sign in to comment.