This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script checks the time accuracy of MoviePy. | |
First, a one-hour video is generated, where the frame | |
at time t displays t (in seconds, e.g. '1200.50') in white | |
on a black baground. | |
Then we ask MoviePy to open this video file, fetch | |
different times (1200.5, 850.2, 2000.3, 150.25, 150.25), | |
extract the corresponding frame as a JPEG image file, and |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Physics simulation with PyODE followed by a (basic) rendering with Vapory | |
See the result here: http://i.imgur.com/TdhxwGz.gifv | |
Zulko 2014 | |
This script is placed in the Public Domain (Licence Creative Commons 0) | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Turn a piano MIDI file into a basic 3D animated piano video. | |
See the result here: | |
I am leaving it as a script because it is not tested on enough MIDI files yet. | |
Zulko 2014 | |
This script is released under a Public Domain (Creative Commons 0) licence. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# vispy: gallery 2 | |
# Copyright (c) 2014, Vispy Development Team. | |
# Distributed under the (new) BSD License. See LICENSE.txt for more info. | |
# | |
# Modified for animation with MoviePy by Zulko | |
# See result here: http://i.imgur.com/sSCBkFd.gif | |
# |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
# vispy: gallery 30 | |
# ----------------------------------------------------------------------------- | |
# Copyright (c) 2014, Vispy Development Team. All Rights Reserved. | |
# Distributed under the (new) BSD License. See LICENSE.txt for more info. | |
# ----------------------------------------------------------------------------- | |
# Author: Nicolas P .Rougier | |
# Date: 06/03/2014 | |
# Abstract: Fake electrons orbiting | |
# Keywords: Sprites, atom, particles |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This script produces a video analysis proving for the first time in history | |
that bacterial populations grow exponentially. See the result here: | |
http://i.imgur.com/uoITKiA.gif | |
We proceed as follows: | |
- Download a video of bacteria growing under a microscope. | |
- Cut the video to keep only the first 7 seconds. | |
- Threshold each frame to find where the bacteria are, and compute the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Model of a Zombie outbreak in France, starting in Grenoble | |
This is a rewrite from this blog post by Max Berrgren: | |
http://maxberggren.github.io/2014/11/27/model-of-a-zombie-outbreak/ | |
with a different country, a slightly different model, and different | |
libraries. The map of population density is taken from Wikimedia Commons |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Conformal animations with MoviePy and Scikit Image, after user u/spel3o on Reddit. | |
Links: | |
Reddit discussion: | |
http://www.reddit.com/r/math/comments/2o9wge/conformal_image_map_animation_of_1z_to/ | |
Original gif: | |
https://i.imgur.com/2W5dCvF.gif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Animation of a head slicing. | |
Based on a BSD-like licenced code by Gael Varoquaux | |
http://docs.enthought.com/mayavi/mayavi/auto/example_mri.html | |
Result: | |
http://i.imgur.com/EJZELfi.gif | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Code for this GIF: | |
# http://imgur.com/gallery/pTypr1Y | |
# This demonstrates how to freeze a region with MoviePy | |
from moviepy.editor import * | |
clip = (VideoFileClip("the_fault_in_our_stars.mp4") | |
.subclip("00:59:48.4","00:59:49.6") | |
.resize(width=600) |