.. _gallery:


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 !

Videos edited with Moviepy
---------------------------


The Cup Song Covers Mix
~~~~~~~~~~~~~~~~~~~~~~~~

This mix of 60 covers of the Cup Song demonstrates the non-linear video editing capabilities of MoviePy. Here is `the (undocumented) MoviePy code <https://nbviewer.ipython.org/github/Zulko/--video-editing---Cup-Song-Covers-Mix/blob/master/CupSongsCovers.ipynb>`_ that generated the video.

.. raw:: html

        <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden;
         margin-left: 5%;">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/rIehsqqYFEM" frameborder="0" allowfullscreen></iframe>
        </div>

The (old) MoviePy reel video.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Made when MoviePy was a few weeks old and not as good as now. The code for most scenes can be found
in the :ref:`examples`.

.. raw:: html

       <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;">
       <iframe width="560" height="315" src="https://www.youtube.com/embed/zGhoZ4UBxEQ" frameborder="0" allowfullscreen>
       </iframe>
       </div>


Animations edited with MoviePy
------------------------------


GIFs made from videos
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This  `gifs tutorial
<https://zulko.github.io/blog/2014/01/23/making-animated-gifs-from-video-files-with-python/>`_ gives you the basics to make gifs from video files (cutting, croping, adding text...). The last example shows how to remove a (still) background to keep only the animated part of a video.


.. raw:: html

         <a href="https://imgur.com/Fo2BxBK"><img src="https://i.imgur.com/Fo2BxBK.gif" title="Hosted by imgur.com"
            style="max-width:50%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>

Vector Animations
~~~~~~~~~~~~~~~~~~~

This `vector animations tutorial <https://zulko.github.io/blog/2014/09/20/vector-animations-with-python/>`_ shows how to combine MoviePy with Gizeh to create animations:

.. raw:: html

         <a href="https://imgur.com/2YdW9yf"><img src="https://i.imgur.com/2YdW9yf.gif"
         style="max-width:50%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>


It is also possible to combine MoviePy with other graphic librairies like matplotlib, etc.


3D animations
~~~~~~~~~~~~~~~~~~~

This `3d animation tutorial <https://zulko.github.io/blog/2014/11/13/things-you-can-do-with-python-and-pov-ray/>`_ shows how to combine MoviePy with Vapory, a library to render 3D scenes using the free ray-tracer POV-Ray

.. raw:: html

         <a href="https://imgur.com/2YdW9yf"><img src="https://i.imgur.com/XN7e2IP.gif"
         style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>


With Vapory and MoviePy you can for instance embed a movie in a 3D scene:


.. raw:: html

        <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;">
        <iframe type="text/html" src="https://youtube.com/embed/M9R21SquDSk?rel=0" frameborder="0"
        style="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;">
        </iframe>
        </div>


Or render the result of this physics simulation made with PyODE (`script <https://gist.github.com/Zulko/f828b38421dfbee59daf>`_):

.. raw:: html

         <a href="https://imgur.com/2YdW9yf"><img src="https://i.imgur.com/TdhxwGz.gif"
         style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>


Or use `this script <https://gist.github.com/Zulko/b910c8b22e8e1c01fae6>`_ to make piano animations from MIDI files (which are some sort of electronic sheet music):


.. raw:: html

        <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;">
        <iframe type="text/html" src="https://youtube.com/embed/tCqQhmuwgMg?rel=0" frameborder="0"
        style="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;">
        </iframe>
        </div>

Data animations
----------------

This `data animation tutorial <https://zulko.github.io/blog/2014/11/13/things-you-can-do-with-python-and-pov-ray/>`_ shows how to use MoviePy to animate the different Python vizualization libraries: Mayavi, Vispy, Scikit-image, Matplotlib, etc.


Scientific or technological projects
-------------------------------------


Piano rolls transcription to sheet music
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This `transcribing piano rolls blog post <https://zulko.github.io/blog/2014/02/12/transcribing-piano-rolls/>`_ explains how to transform a video of a piano roll performance into playable sheet music. MoviePy is used for the frame-by-frame analysis of the piano roll video. The last video is also edited with MoviePy:

.. raw:: html

        <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; margin-bottom:30px; overflow: hidden; margin-left: 5%;">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/V2XCJNZjm4w" frameborder="0" allowfullscreen>
        </iframe>
        </div>



Misc. Programs and Scripts using MoviePy
------------------------------------------
Kapwing
----------

`Kapwing <https://www.kapwing.com/>`_ is an online video meme generator. Content creators use Kapwing to add text around their videos, which results in higher engagement / views on social media sites like Facebook. Kapwing's creation process is powered by MoviePy! MoviePy is used to add the text, borders, and attribution directly to the uploaded videos.


.. raw:: html

         <a href="https://www.kapwing.com/videos/58d5d8b96c239227a1622319"><img src="https://cdn-e1.streamable.com/image/z35jz.jpg?token=1491619273_2fa6161bc77a258112bd1b353f1d0fd217d7a8eb"
         style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>


Rinconcam
----------

`Rincomcam <http://www.rinconcam.com/month/2014-03>`_ is a camera which films surfers on the Californian beach of Point Rincon. At the end of each day it cuts together a video, puts it online, and tweets it. Everything is entirely automatized with Python.
MoviePy is used to add transitions, titles and music to the videos.


.. raw:: html

         <a href="https://imgur.com/2YdW9yf"><img src="https://pbs.twimg.com/media/B2_NlnwCMAAingW.jpg"
         style="max-width:70%; height:'auto'; display:block; margin-left: auto;margin-right: auto; margin-bottom:30px;" /></a>


Videogrep
~~~~~~~~~~

Videogrep is a python script written by Sam Lavigne, that goes through the subtitle tracks of movies and makes supercuts based on what it finds. For instance, here is an automatic supercut of every time the White House press secretary tells us what he can tell us:

.. raw:: html

        <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/D7pymdCU5NQ" frameborder="0" allowfullscreen>
        </iframe>
        </div>

Here are `Videogrep's introductory blog post
<http://lav.io/2014/06/videogrep-automatic-supercuts-with-python/>`_ and the Github `Videogrep page <https://github.com/antiboredom/videogrep/>`_.

If you liked it, also have a look at these Videogrep-inspired projects:

This `Videogrep blog post <https://zulko.github.io/blog/2014/06/21/some-more-videogreping-with-python/>`_ attempts to cut a video precisely at the beginning and end of sentences or words: ::

    words = ["Americans", "must", "develop", "open ", "source",
              " software", "for the", " rest ", "of the world",
              "instead of", " soldiers"]
    numbers = [3,0,4,3,4,0,1,2,0,1,0] # take clip number 'n'

    cuts = [find_word(word)[n] for (word,n) in zip(words, numbers)]
    assemble_cuts(cuts, "fake_speech.mp4")

.. raw:: html

        <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; margin-bottom:30px; height: 0; overflow: hidden; margin-left: 5%;">
        <iframe type="text/html" src="https://youtube.com/embed/iWRYGULFd_c?rel=0" frameborder="0"
        style="position: absolute; top: 0; bottom: 10; left: 0; width: 90%; height: 100%;">
        </iframe>
        </div>


This `other post <https://zulko.github.io/blog/2014/07/04/automatic-soccer-highlights-compilations-with-python/>`_ uses MoviePy to automatically cut together `all the highlights of a soccer game <http://youtu.be/zJtWPFX2bA0>`_, based on the fact that the crowd cheers louder when something interesting happens. All in under 30 lines of Python:

