Video editing with Python
corrected concatenate_videoclips everywhere. Now version 0.2.9
Zulko349712b4ee1b
diff --git a/docs/FAQ.rst b/docs/FAQ.rstindex 21c16686..15caaa4b 100644--- a/docs/FAQ.rst+++ b/docs/FAQ.rst@@ -12,17 +12,25 @@ These are very common errors which are not considered as bugs to besolved (but you can still ask for this to change). If these answersdon't work for you, please open a bug report on Github_, or on the dedicated forum on Reddit_, or on the librelist_.-- **MoviePy generated a video that cannot be read by my favorite player.**+MoviePy generated a video that cannot be read by my favorite player.+"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""++Known reason : one of the video's dimensions were not even,for instance 720x405, and you used a MPEG4 codec like libx264 (defaultin MoviePy). In this case the video generated uses a format that isreadable only on some readers like VLC.-- **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+I can't seem to read any video with MoviePy+""""""""""""""""""""""""""""""""""""""""""""""++Known reason: you have a deprecated version of FFMPEG, install a recent version from thewebsite, not from your OS's repositories ! (see :ref:`installation`).-- **Previewing videos make them slower than they are**. It means that your computer is not good enough to render the clip in real time. Don't hesitate to play with the options of ``preview``: for instance, lower the fps of the sound (11000 Hz is still fine) and the video. Also, downsizing your video with ``resize`` can help.+Previewing videos make them slower than they are+"""""""""""""""""""""""""""""""""""""""""""""""""++It means that your computer is not good enough to render the clip in real time. Don't hesitate to play with the options of ``preview``: for instance, lower the fps of the sound (11000 Hz is still fine) and the video. Also, downsizing your video with ``resize`` can help... _Github: https://github.com/Zulko/moviepy.. _Reddit: http://www.reddit.com/r/moviepy/diff --git a/docs/gallery.rst b/docs/gallery.rstindex 82a70d91..a118ef27 100644--- a/docs/gallery.rst+++ b/docs/gallery.rst@@ -9,6 +9,7 @@ Here are a few projects using MoviePy. The gallery will fill up as more people sVideos edited with Moviepy---------------------------+The Cup Song Covers Mix~~~~~~~~~~~~~~~~~~~~~~~~@@ -17,7 +18,7 @@ This mix of 60 covers of the Cup Song demonstrates the non-linear video editing.. raw:: html<div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;- display:block; margin-left: auto; margin-right: auto;">+ margin-left: 5%;"><iframe src="http://youtube.com/v/rIehsqqYFEM&hl?rel=0" frameborder="0" allowfullscreenstyle="position: absolute; top: 0; bottom: 10; width: 90%; height: 100%;"></iframe>@@ -31,7 +32,7 @@ in the :ref:`examples`... raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;">+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe src="http://youtube.com/v/zGhoZ4UBxEQ&hl?rel=0" frameborder="0" allowfullscreenstyle="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;"></iframe>@@ -90,7 +91,7 @@ This `blog post <http://zulko.github.io/blog/2014/02/12/transcribing-piano-rolls- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden;">+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;"><iframe src="http://youtube.com/v/V2XCJNZjm4w&hl?rel=0" frameborder="0" allowfullscreenstyle="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;"></iframe>@@ -108,7 +109,7 @@ Videogrep is a python script written by Sam Lavigne, that goes through the subti.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;">+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;"><iframe src="http://youtube.com/v/D7pymdCU5NQ&hl?rel=0" frameborder="0" allowfullscreenstyle="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;"></iframe>diff --git a/docs/getting_started/advanced_tools.rst b/docs/getting_started/advanced_tools.rstindex 80393b42..4763b680 100644--- a/docs/getting_started/advanced_tools.rst+++ b/docs/getting_started/advanced_tools.rst@@ -3,8 +3,7 @@Advanced tools===============-This section briefly presents a few functions of the submodule ``moviepy.video.tools`` that can help you edit videos. See the reference manual for more details on how to use each functionality.-+This section will briefly present the submodule ``moviepy.video.tools`` that can help you edit videos. It's not ready yet, see :ref:`ref_videotools` (the same in more complete and more technical) instead.Tracking~~~~~~~~~diff --git a/docs/getting_started/clips.rst b/docs/getting_started/clips.rstindex f7d7835c..c178542a 100644--- a/docs/getting_started/clips.rst+++ b/docs/getting_started/clips.rst@@ -53,36 +53,41 @@ VideoClip:width: 128 px:align: center+Note: three next sections are in construction+VideoFileClip"""""""""""""""-+See :py:class:`~moviepy.video.io.VideoFileClip.VideoFileClip`.ImageClip""""""""""-+See :py:class:`~moviepy.video.VideoClip.ImageClip`.TextClip"""""""""""""""+See :py:class:`~moviepy.video.VideoClip.TextClip`.+Mask clips~~~~~~~~~~~~~~-when it is composed with other clips (see :ref:CompositeVideoClips)+A mask is a special video clip which indicates which pixels will be visible when a video clip carrying this mask will be composed with other video clips (see :ref:`CompositeVideoClips`).-The fundamental difference is that standard masks output frames with 3 coomposants (R-G-B) per pixel, comprised between 0 and 255, while a mask has just one composant per pixel, between 0 and 1 (1 indicating a fully visible pixel and 0 a transparent pixel).+The fundamental difference between masks and standard clips is that standard clips output frames with 3 components (R-G-B) per pixel, comprised between 0 and 255, while a mask has just one composant per pixel, between 0 and 1 (1 indicating a fully visible pixel and 0 a transparent pixel). Seen otherwise, a mask is always in greyscale.When you create or load a clip that you will use as a mask you need to declare it: ::-mclip = VideoClip(makeframe, duration=4, ismask=True)mclip = ImageClip("my_mask.jpeg", ismask=True)mclip = VideoClip("myvideo.mp4", ismask=True)-In the case of video and image files, if these are not already black and white they will be converted automatically.Any video clip can be turned into a mask with ``clip.to_mask()``, and a mask can be turned to a standard RGB video clip with ``my_mask_clip.to_RGB()``.++Masks are treated differently by many methods (because their frames are different) but you can do with a mask pretty much everything you can do with a standard clip: you can cut it, edit it, preview it, write it to a video file, make snapshots, etc.+.. _renderingAClip:Exporting video clips@@ -94,11 +99,11 @@ Video files (.mp4, .webm, .ogv...)To write a clip as a video file, use ::my_clip.write_videofile("movie.mp4") # default codec: 'libx264', 24 fps- my_clip.write_videofile("movie.mp4",fps=15, codec='mpeg4')+ my_clip.write_videofile("movie.mp4",fps=15)my_clip.write_videofile("movie.webm") # webm formatmy_clip.write_videofile("movie.webm",audio=False) # don't render audio.-You can also use other codecs to write ``.webm`` or ``.ogv`` files.+MoviePy has default codec names for the most common file extensions. If you want to use exotic formats or if you are not happy with the defaults you can provide the codec with ``codec='mpeg4'`` for instance. There are many many options when you are writing a video (bitrate, parameters of the audio writing, file size optimization, number of processors to use, etc.). Please refer to :py:meth:`~moviepy.video.VideoClip.VideoClip.write_videofile` for more.Sometimes it is impossible for MoviePy to guess the ``duration`` attribute of the clip (keep in mind that some clips, like ImageClips displaying a picture, have *a priori* an infinite duration). Then, the ``duration`` must be set manually with ``clip.set_duration``: ::@@ -116,13 +121,17 @@ To write your video as an animated GIF, use ::my_clip.write_gif('test.gif', fps=12)+Note that this requires ImageMagick installed. Otherwise you can also create the GIF with ffmpeg by adding the option ``program='ffmpeg'``, it will be much faster but won't look as nice and won't be optimized.++There are many options to optimize the quality and size of a gif. Please refer to :py:meth:`~moviepy.video.VideoClip.VideoClip.write_gif`.++Note that for editing gifs the best way is to preview them in the notebook as explained here: :ref:`ipython_display`See `this blog post <http://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python>`_ for informations on making GIFs from video files, and `this other post <http://zulko.github.io/blog/2014/09/20/vector-animations-with-python/>`_ for GIF animations with vector graphics... _CCaudioClips:-Audio clips~~~~~~~~~~~~~@@ -136,13 +145,15 @@ The resulting clip has an attribute ``clip.audio`` (its soundtrack) which is anIn this section we will see that audio clips can be created, imported, exported like video clips.+Note: next sections are in constructionAudioFileClip""""""""""""""+See :py:class:`~moviepy.audio.io.AudioFileClip.AudioFileClip`.-AudioArrayClip-"""""""""""""""AudioClip-""""""""""\ No newline at end of file+""""""""""++See :py:class:`~moviepy.audio.AudioClip.AudioClip`\ No newline at end of filediff --git a/docs/getting_started/compositing.rst b/docs/getting_started/compositing.rstindex aaf1e0c8..09e7bf81 100644--- a/docs/getting_started/compositing.rst+++ b/docs/getting_started/compositing.rst@@ -7,10 +7,9 @@ Video composition, also known as non-linear editing, is the fact of playing seve.. raw:: html- <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;- display:block; margin-left: auto; margin-right: auto;">+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left:15%;"><iframe src="http://youtube.com/v/rIehsqqYFEM&hl?rel=0" frameborder="0" allowfullscreen- style="position: absolute; top: 0; bottom: 10; width: 70%; height: 100%;">+ style="position: absolute; top: 0; bottom: 10; width: 70%; height: 100%; "></iframe></div>@@ -47,6 +46,7 @@ Stacking is done with ``clip_array``: ::You obtain a clip which looks like this:.. figure:: stacked.jpeg+ :align: centerCompositeVideoClipsdiff --git a/docs/getting_started/effects.rst b/docs/getting_started/effects.rstindex 4d633711..cc5db928 100644--- a/docs/getting_started/effects.rst+++ b/docs/getting_started/effects.rst@@ -3,7 +3,18 @@Clips transformations and effects===================================-There are several categories of clip modifications in MoviePy.+There are several categories of clip modifications in MoviePy:++- The very common methods to change the attributes of a clip: ``clip.set_duration``, ``clip.set_audio``, ``clip.set_mask``, ``clip.set_start`` etc.+- The already-implemented effects. Core effects like ``clip.subclip(t1, t2)`` (keep only the cut between t1 and t2), which are very important, are implemented as class methods. More advanced and less common effects like ``loop`` (makes the clip play in a loop) or ``time_mirror`` (makes the clip play backwards) are placed in the special modules ``moviepy.video.fx`` and ``moviepy.audio.fx``.+- The effects that you can create yourself. using++Importantly, all these effects have in common that they are **not inplace**: none of these effects modifies the original clip, they all create a new clip that is a version of the former with the changes applied. For instance: ::++ my_clip = VideoFileClip("some_file.mp4")+ my_clip.set_start(t=5) # does nothing, changes nothing !+ my_new_clip = my_clip.set_duration(t=5) # good !+The very common methods for composition (cutting a clip, setting its position, etc.) are implemented as ``clip.mymethod``. For instance ``clip.subclip(15,20)`` returns the part of ``clip`` that is playing between 15 seconds and 20 seconds.@@ -11,6 +22,27 @@ For all the other modifications, we use ``clip.fx`` and ``clip.fl``. ``clip.fx``Note that none of these methods occur *inplace*: they all create a copy of the clip and let the original clip untouched. Moreover, modified clips are just *special views* of the original clip, they do not carry all the video data with them. Actually, the *real* modifications are only performed when you are rendering the clip (see :ref:`renderingAClip`). This means that all the clip objects that you will create through modifications of other clips take virtually no place in the memory and are created quasi-instantly.++Time representations in MoviePy+---------------------------------++Many methods that we will see accept times as arguments. For instance ``clip.subclip(t_start,t_end)`` which cuts the clip between two times. The times can be represented either in seconds (``t_start=230.54``), as a couple (minutes, seconds) (``t_start=(3,50.54)``), as a triplet (hour, min, sec) (``t_start=(0,3,50.54)``) or as a string (``t_start='00:03:50.54')``).++Most of the time when the times are not provided they are guessed, for instance in ``clip.subclip(t_start=50)`` it is implied that ``t_end`` corresponds to the end of the clip, in ``clip.subclip(t_end=20)`` it is implied that t_start=0. If the time is negative it is considered as the time before the end of the clip: ``clip.subclip(-20, -10)`` cuts the clip between 20s before the end and 10s before the end.+++Methods to change the clip attributes+---------------------------------------++Already-implemented effects+------------------------------++See :ref:`ref_videofx` for a complete list and documentation of these+++Methods to create custom effects+----------------------------------+clip.fx""""""""@@ -76,8 +108,6 @@ Finally, you may want to process the clip by taking into account both the time aThis will scroll down the clip, with a constant height of 360 pixels.-When programming a new effect, whenever it is possible, prefer using ``fl_time`` and-``fl_image`` instead of ``fl`` if possible when implementing-new effects. The reason is that, when these effects are applied to+When programming a new effect, whenever it is possible, prefer using ``fl_time`` and ``fl_image`` instead of ``fl`` if possible when implementing new effects. The reason is that, when these effects are applied toImageClips, MoviePy will recognize that these methods do not need to be applied to each frame, which willresult in faster renderings.diff --git a/docs/getting_started/efficient_moviepy.rst b/docs/getting_started/efficient_moviepy.rstindex d6c090a2..9cdc9c5f 100644--- a/docs/getting_started/efficient_moviepy.rst+++ b/docs/getting_started/efficient_moviepy.rst@@ -5,8 +5,9 @@ How to be efficient with MoviePyThis section gathers tips and tricks to make the most of what is already known worldwide as *the MoviePy experience*.-Let us first say that the best way to start with MoviePy is to use it with the IPython Notebook: it makes it easier to preview clips (as we will see in this section), has autocompletion, and can display the documentation for the different methods of the library.+The best way to start with MoviePy is to use it with the IPython Notebook: it makes it easier to preview clips (as we will see in this section), has autocompletion, and can display the documentation for the different methods of the library.+.. _should_i_use_moviepy_editor:Should I use ``moviepy.editor`` ?~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -26,6 +27,7 @@ provides all you need to play around and edit your videos but it will take timefrom moviepy.video.io.VideoFileClip import VideoFileClipfrom moviepy.video.fx.resize import resize+.. _previewing:The many ways of previewing a clip~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~@@ -41,10 +43,12 @@ Most of the time, just having one frame of the video can tell you if you are doimy_clip.save_frame("frame.jpeg") # saves the first framemy_clip.save_frame("frame.png", t=2) # saves the frame a t=2s-clip.show-""""""""""+.. _clip_preview:-The methods ``clip.show`` and ``clip.preview`` require to have PyGame installed. PyGame must also be initialized (it will always be the case if you use the ``moviepy.editor`` module)+clip.show and clip.preview+""""""""""""""""""""""""""""++The methods ``clip.show`` and ``clip.preview`` enable you to vizualise the clip in a Pygame window. They are the fastest way to preview, as the clips are generated and displayed at the same time, and they can be useful to get the coordinates or colors of pixels. These methods require to have PyGame installed, and to use the ``moviepy.editor`` module.The method ``clip.show`` enables preview one frame of a clip without having to write it to a file: the following lines display the frame in a PyGame window ::@@ -52,31 +56,52 @@ The method ``clip.show`` enables preview one frame of a clip without having to wmy_clip.show(10.5) # shows the frame of the clip at t=10.5smy_clip.show(10.5, interactive = True)-The last line above displays the frame in an interactive way: if you click somewhere in the frame, it will print the position and color of the pixel. Press Escape to exit when you are done.---clip.preview-"""""""""""""+The last line (with ``interactive=True``) displays the frame in an interactive way: if you click somewhere in the frame, it will print the position and color of the pixel. Press Escape to exit when you are done.-A clip previewed is generated and displayed (in a PyGame window) at the same time. ::+A clip can be previewed as follows ::my_clip.preview() # preview with default fps=15my_clip.preview(fps=25)- my_clip.preview(fps=15, audio=False) # don't play sound.+ my_clip.preview(fps=15, audio=False) # don't generate/play the audio.+ my_audio_clip.preview(fps=22000)-If you click somewhere in the frames when the clip is being previewed, it will print the position and color of the pixel clicked. Press Escape abort the previewing.+If you click somewhere in the frames of a video clip being previewed, it will print the position and color of the pixel clicked. Press Escape abort the previewing.Note that if the clip is complex and your computer not fast enough, the preview will appear slowed down compared to the real speed of the clip. In this case you can try to lower the frame rate (for instance to 10) or reduce the size of the clip with ``clip.resize``, it helps.+.. _ipython_display:+ipython_display""""""""""""""""-When using the IPython notebook+Displaying the clips in a IPython Notebook can be very practical, especially if you can't use ``clip.show()`` and ``clip.preview()``. Here is what it will look like:.. image:: ../demo_preview.jpeg:width: 500px:align: center-Note that ``ipython_display`` only works when it is the last command of the cell. You can provide any valid HTML5 options. For instance, when previewing a clip that you will turn into a gif, you need the preview to start automatically and to loop (i.e. replay indefinitely), so you will write ::+With ``ipython_display`` you can embed videos, images and sounds, either from a file or directly from a clip: ::- ipython_display(my_clip, autoplay=1, loop=1)\ No newline at end of file+ ipython_display(my_video_clip) # embeds a video+ ipython_display(my_imageclip) # embeds an image+ ipython_display(my_audio_clip) # embeds a sound++ ipython_display("my_picture.jpeg") # embeds an image+ ipython_display("my_video.mp4") # embeds a video+ ipython_display("my_sound.mp3") # embeds a sound++If you only need to display a snapshot of a video clip at some time `t` you can write ::++ ipython_display(video_clip.to_ImageClip(t=15)) # snapshot at t=15s++You can also provide any valid HTML5 option as keyword argument. For instance, if the clip is too big, you will write ::++ ipython_display(my_clip, width=400) # HTML5 will resize to 400 pixels++When you are creating a gif and want to check that it loops well, you can ask the video to start automatically and to loop (i.e. replay indefinitely) : ::++ ipython_display(my_clip, autoplay=1, loop=1)++Importantly, ``ipython_display`` actually embeds the clips physically in your notebook. The advantage is that you can move the notebook or put it online and the videos will work. The drawback is that the file size of the notebook can become very large.++Finally, note that ``ipython_display`` only works when it is the last command of a cell of the notebook.\ No newline at end of filediff --git a/docs/getting_started/getting_started.rst b/docs/getting_started/getting_started.rstindex f8d171ce..7038a457 100644--- a/docs/getting_started/getting_started.rst+++ b/docs/getting_started/getting_started.rst@@ -3,9 +3,6 @@These pages give you everything you need to start editing with MoviePy. Then the best way to learn is to have a look at the provided :ref:`examples` or the different ressources presented in the :ref:`gallery`.-.. figure:: demo_preview.jpeg--Getting started with MoviePy------------------------------diff --git a/docs/getting_started/quick_presentation.rst b/docs/getting_started/quick_presentation.rstindex 9621b7ac..a5b6245f 100644--- a/docs/getting_started/quick_presentation.rst+++ b/docs/getting_started/quick_presentation.rst@@ -25,7 +25,7 @@ MoviePy has been developed with the following goals in mind:- **Flexible**. You have total control over the frames of the video and audio, and creating your own effects is easy as Py.- **Portable**. The code uses very common software (Numpy and FFMPEG) and can run on (almost) any machine with (almost) any version of Python.-Now for the limitations: for now MoviePy cannot stream videos (read from a webcam, or render a video live on a distant machine), it cannot do 3D effects (by lack of a nice 3D library for Python) and is not really designed for video processing involving many successive frames of a movie (like video stabilization, you'll need another software for that). Also, if you only need to do frame-by-frame video analysis (with face detection or other fancy stuff) you may want to use the libraries OpenCV and SimpleCV instead.+Now for the limitations: MoviePy cannot (yet) stream videos (read from a webcam, or render a video live on a distant machine), it cannot do 3D effects (by lack of a nice 3D library for Python) and is not really designed for video processing involving many successive frames of a movie (like video stabilization, you'll need another software for that). Also, if you only need to do frame-by-frame video analysis (with face detection or other fancy stuff) you may want to use the libraries OpenCV and SimpleCV instead.Example codediff --git a/docs/ref/code_origanization.rst b/docs/ref/code_origanization.rstindex 6c031127..df50c6ec 100644--- a/docs/ref/code_origanization.rst+++ b/docs/ref/code_origanization.rst@@ -19,5 +19,5 @@ The submodules ``moviepy.audio`` and ``moviepy.video`` are organized approximate- ``io`` contains everything required to read files, write files, preview the clip or use a graphical interface of any sort. It contains the objects that speak to FFMEG and ImageMagick, the classes AudioFileClip and VideoFileClip, the functions used to preview a clip with pygame or to embed a video in HTML5 (for instance in the IPython Notebook).- ``fx`` contains a collection of effects and filters (like turning a video black and white, correcting luminosity, zooming or creating a scrolling effect). To add an effect to MoviePy, you simply add a new file ``my_effect.py`` to this folder, and in the file you define the function ``my_effect(clip, *other_parameters)``.-- ``compositing`` contains functions and classes to compose videoclips (CompositeVideoClip, concatenate, clips_array)+- ``compositing`` contains functions and classes to compose videoclips (CompositeVideoClip, concatenate_videoclips, clips_array)- ``tools`` contains advanced tools that are not effects but can help edit clips or generate new clips (tracking, subtitles, etc.)\ No newline at end of filediff --git a/docs/ref/videofx.rst b/docs/ref/videofx.rstindex 65d4e6cb..81ab7d19 100644--- a/docs/ref/videofx.rst+++ b/docs/ref/videofx.rst@@ -1,4 +1,4 @@-.. ref_videofx:+.. _ref_videofx:***********************moviepy.video.fx (vfx)@@ -54,7 +54,7 @@ the module ``video.fx`` is loaded as ``vfx`` and you can use ``vfx.colorx``, ``vscrollspeedxtime_mirror- time_symetrize+ time_symmetrizediff --git a/docs/ref/videofx/moviepy.video.fx.all.time_symetrize.rst b/docs/ref/videofx/moviepy.video.fx.all.time_symetrize.rstdeleted file mode 100644index fe3c3a71..00000000--- a/docs/ref/videofx/moviepy.video.fx.all.time_symetrize.rst+++ /dev/null@@ -1,6 +0,0 @@-moviepy.video.fx.all.time_symetrize-===================================--.. currentmodule:: moviepy.video.fx.all--.. autofunction:: time_symetrize\ No newline at end of filediff --git a/docs/ref/videotools.rst b/docs/ref/videotools.rstindex ba86bcdc..105e1893 100644--- a/docs/ref/videotools.rst+++ b/docs/ref/videotools.rst@@ -1,4 +1,4 @@-.. ref_videotools:+.. _ref_videotools:************video.toolsdiff --git a/examples/headblur.py b/examples/headblur.pyindex 49c3e450..5d55f04b 100644--- a/examples/headblur.py+++ b/examples/headblur.py@@ -42,7 +42,7 @@ txt = TextClip("Hey you ! \n You're blurry!", color='grey70',# Concatenate the Chaplin clip with the text clip, add audio-final = concatenate([clip_blurred,txt.set_duration(3)]).\+final = concatenate_videoclips([clip_blurred,txt.set_duration(3)]).\set_audio(clip.audio)# We write the result to a file. Here we raise the bitrate so thatdiff --git a/examples/moving_letters.py b/examples/moving_letters.pyindex 95e9b453..dc724e47 100644--- a/examples/moving_letters.py+++ b/examples/moving_letters.py@@ -60,6 +60,6 @@ clips = [ CompositeVideoClip( moveLetters(letters,funcpos),# WE CONCATENATE EVERYTHING AND WRITE TO A FILE-concatenate(clips).write_videofile('../../coolTextEffects.avi',- fps=25, codec='mpeg4')+final_clip = concatenate_videoclips(clips)+final_clip.write_videofile('../../coolTextEffects.avi',fps=25,codec='mpeg4')diff --git a/examples/painting_effect.py b/examples/painting_effect.pyindex f74470d8..db607bab 100644--- a/examples/painting_effect.py+++ b/examples/painting_effect.py@@ -33,7 +33,7 @@ painting_fading = CompositeVideoClip([im_freeze,painting_txt])# FINAL CLIP AND RENDERING-final_clip = concatenate([ clip_before,+final_clip = concatenate_videoclips([ clip_before,painting_fading.set_duration(3),clip_after])diff --git a/examples/star_worms.py b/examples/star_worms.pyindex a5ea88d7..5e2ebb2b 100644--- a/examples/star_worms.py+++ b/examples/star_worms.py@@ -176,5 +176,4 @@ annotated_clips = [ annotate(clip,text) for clip,text in [# Concatenate and write to a file-concatenate(annotated_clips).write_videofile('tutorial.avi', fps=5)-+concatenate_videoclips(annotated_clips).write_videofile('tutorial.avi', fps=5)\ No newline at end of filediff --git a/moviepy/config.py b/moviepy/config.pyindex 24019e38..6dcd46de 100644--- a/moviepy/config.py+++ b/moviepy/config.py@@ -7,13 +7,12 @@ except ImportError:from config_defaults import (FFMPEG_BINARY, IMAGEMAGICK_BINARY)-def try_cmd(cmd):try:popen_params = {"stdout": sp.PIPE,"stderr": sp.PIPE,"stdin": DEVNULL}-+# This was added so that no extra unwanted window opens on windows# when the child process is createdif os.name == "nt":@@ -27,7 +26,7 @@ def try_cmd(cmd):return True, None-if FFMPEG_BINARY == 'auto-detect':+if FFMPEG_BINARY=='auto-detect':if try_cmd(['ffmpeg'])[0]:FFMPEG_BINARY = 'ffmpeg'@@ -36,11 +35,11 @@ if FFMPEG_BINARY == 'auto-detect':else:FFMPEG_BINARY = 'unset'else:- success, err = try_cmd(FFMPEG_BINARY)+ success, err = try_cmd(cmd)if not success:raise err-if IMAGEMAGICK_BINARY == 'auto-detect':+if IMAGEMAGICK_BINARY=='auto-detect':if try_cmd(['convert'])[0]:IMAGEMAGICK_BINARY = 'convert'@@ -50,7 +49,7 @@ if IMAGEMAGICK_BINARY == 'auto-detect':def get_setting(varname):- """ Returns the value of a configuration variable. """+ """ Returns the value of a configuration variable. """gl = globals()if varname not in gl.keys():raise ValueError("Unknown setting %s"%varname)diff --git a/moviepy/version.py b/moviepy/version.pyindex 392e28e9..a81eb0af 100644--- a/moviepy/version.py+++ b/moviepy/version.py@@ -1 +1 @@-__version__ = "0.2.1.8.12"+__version__ = "0.2.1.9"diff --git a/moviepy/video/VideoClip.py b/moviepy/video/VideoClip.pyindex a2df29f5..12f44d5c 100644--- a/moviepy/video/VideoClip.py+++ b/moviepy/video/VideoClip.py@@ -477,9 +477,9 @@ class VideoClip(Clip):clips = [c for c in [left, center, right] if c != None]# beurk, have to find other solution- from moviepy.video.compositing.concatenate import concatenate+ from moviepy.video.compositing.concatenate import concatenate_videoclips- return concatenate(clips).set_start(self.start)+ return concatenate_videoclips(clips).set_start(self.start)# IMAGE FILTERSdiff --git a/moviepy/video/compositing/concatenate.py b/moviepy/video/compositing/concatenate.pyindex df753eba..7b314d88 100644--- a/moviepy/video/compositing/concatenate.py+++ b/moviepy/video/compositing/concatenate.py@@ -84,7 +84,7 @@ def concatenate_videoclips(clipslist, method="chain", transition=None, bg_color=if transparent:clips_w_masks = [(c.add_mask() if c.mask is None else c) for c in clips]masks = [c.mask for c in clips_w_masks]- result.mask = concatenate(masks, method="chain", ismask=True)+ result.mask = concatenate_videoclips(masks, method="chain", ismask=True)elif method == "compose":diff --git a/moviepy/video/fx/freeze_at_start.py b/moviepy/video/fx/freeze_at_start.pyindex 9d818743..c27ccfb2 100644--- a/moviepy/video/fx/freeze_at_start.py+++ b/moviepy/video/fx/freeze_at_start.py@@ -1,6 +1,6 @@from moviepy.decorators import requires_durationfrom moviepy.video.VideoClip import ImageClip-from moviepy.video.compositing.concatenate import concatenate+from moviepy.video.compositing.concatenate import concatenate_videoclips@requires_durationdef freeze_at_start(clip, freeze_duration=None, total_duration=None):@@ -22,4 +22,4 @@ def freeze_at_start(clip, freeze_duration=None, total_duration=None):if freeze_duration:freezed_clip = freezed_clip.set_duration(freeze_duration)- return concatenate([freezed_clip, clip])+ return concatenate_videoclips([freezed_clip, clip])diff --git a/moviepy/video/fx/time_symmetrize.py b/moviepy/video/fx/time_symmetrize.pyindex a6ba7ec0..9eca6f2b 100644--- a/moviepy/video/fx/time_symmetrize.py+++ b/moviepy/video/fx/time_symmetrize.py@@ -1,6 +1,6 @@from moviepy.decorators import (apply_to_mask, apply_to_audio,requires_duration)-from moviepy.video.compositing.concatenate import concatenate+from moviepy.video.compositing.concatenate import concatenate_videoclipsfrom .time_mirror import time_mirror@requires_duration@@ -13,4 +13,4 @@ def time_symmetrize(clip):This effect is automatically applied to the clip's mask and audioif they exist."""- return concatenate([clip, clip.fx( time_mirror )])+ return concatenate_videoclips([clip, clip.fx( time_mirror )])diff --git a/moviepy/video/io/html_tools.py b/moviepy/video/io/html_tools.pyindex f1d5d433..afd60fb6 100644--- a/moviepy/video/io/html_tools.py+++ b/moviepy/video/io/html_tools.py@@ -162,7 +162,7 @@ def ipython_display(clip, filetype=None, maxduration=60, rd_kwargs=None,Remarks: If your browser doesn't support HTML5, this should warn you.If nothing is displayed, maybe your file or filename is wrong.- The media will be physically embedded in the notebook.+ Important: The media will be physically embedded in the notebook.Examples=========