moviepy.video.fx (vfx)¶
The module moviepy.video.fx
regroups functions meant to be used with videoclip.fx()
.
For all other modifications, we use clip.fx
and clip.fl
. clip.fx
is meant to make it easy to use already-written transformation functions, while clip.fl
makes it easy to write new transformation functions.
Because this module is starting to get large and will only get larger in the future, it allows two kinds of imports. You can either import a single function like this:
from moviepy.video.fx.scroll import crop
newclip = myclip.fx( vfx.crop, x1=15)
Or import everything:
import moviepy.video.fx.all as vfx
newclip = (myclip.fx( vfx.crop, x1=15)
.fx( vfx.resize, width=200)
.fx( vfx.freeze_at_end, 1))
When you type:
from moviepy import *
the module video.fx
is loaded as vfx
and you can use vfx.multiply_color
, vfx.resize
etc.
Accelerates and decelerates a clip, useful for GIF making. |
|
Desaturates the picture, makes it black and white. |
|
Makes the clip blink. |
|
Returns a new clip in which just a rectangular subregion of the original clip is conserved. |
|
Crops the clip to make dimensions even. |
|
Makes the clip progressively appear from some color (black by default), over |
|
Makes the clip progressively fade to some color (black by default), over |
|
Momentarily freeze the clip at time t. |
|
Freezes one region of the clip while the rest remains animated. |
|
Gamma-correction of a video clip. |
|
Returns a filter that will blur a moving part (a head ?) of the frames. |
|
Returns the color-inversed clip. |
|
Returns a clip that plays the current clip in an infinite loop. |
|
Luminosity-contrast correction of a clip. |
|
Makes the clip fade in progressively at its own end, this way it can be looped indefinitely. |
|
Draws an external margin all around the frame. |
|
Returns the logical ‘and’ (minimum pixel color values) between two masks. |
|
Returns a new clip with a mask for transparency where the original clip is of the given color. |
|
Returns the logical ‘or’ (maximum pixel color values) between two masks. |
|
Flips the clip horizontally (and its mask too, by default). |
|
Flips the clip vertically (and its mask too, by default). |
|
Multiplies the clip’s colors by the given factor, can be used to decrease or increase the clip’s brightness (is that the right word ?) |
|
Returns a clip playing the current clip but at a speed multiplied by |
|
Transforms any photo into some kind of painting. |
|
Returns a video clip that is a resized version of the clip. |
|
Rotates the specified clip by |
|
Scrolls horizontally or vertically a clip, e.g. |
|
Replaces each frame at time t by the mean of n_frames equally spaced frames taken in the interval [t-d, t+d]. |
|
Returns a clip that plays the current clip backwards. |
|
Returns a clip that plays the current clip once forwards and then once backwards. |