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.editor import *
the module video.fx
is loaded as vfx
and you can use vfx.colorx
, vfx.resize
etc.
accel_decel |
new_duration |
blackwhite |
Desaturates the picture, makes it black and white. |
blink |
Makes the clip blink. |
colorx |
multiplies the clip’s colors by the given factor, can be used to decrease or increase the clip’s brightness (is that the reight word ?) |
crop |
Returns a new clip in which just a rectangular subregion of the original clip is conserved. |
even_size |
Crops the clip to make dimensions even. |
fadein |
Makes the clip progressively appear from some color (black by default), over duration seconds at the beginning of the clip. |
fadeout |
Makes the clip progressively fade to some color (black by default), over duration seconds at the end of the clip. |
freeze |
Momentarily freeze the clip at time t. |
freeze_region |
Freezes one region of the clip while the rest remains animated. |
gamma_corr |
Gamma-correction of a video clip |
headblur |
Returns a filter that will blurr a moving part (a head ?) of the frames. |
invert_colors |
Returns the color-inversed clip. |
loop |
Returns a clip that plays the current clip in an infinite loop. |
lum_contrast |
luminosity-contrast correction of a clip |
make_loopable |
Makes the clip fade in progressively at its own end, this way it can be looped indefinitely. |
margin |
Draws an external margin all around the frame. |
mask_and |
Returns the logical ‘and’ (min) between two masks. |
mask_color |
Returns a new clip with a mask for transparency where the original clip is of the given color. |
mask_or |
Returns the logical ‘or’ (max) between two masks. |
mirror_x |
flips the clip horizontally (and its mask too, by default) |
mirror_y |
flips the clip vertically (and its mask too, by default) |
painting |
Transforms any photo into some kind of painting. |
resize |
Returns a video clip that is a resized version of the clip. |
rotate |
Change unit to ‘rad’ to define angles as radians. |
scroll |
Scrolls horizontally or vertically a clip, e.g. |
speedx |
Returns a clip playing the current clip but at a speed multiplied by factor . |
supersample |
Replaces each frame at time t by the mean of nframes equally spaced frames taken in the interval [t-d, t+d]. |
time_mirror |
Returns a clip that plays the current clip backwards. |
time_symmetrize |
Returns a clip that plays the current clip once forwards and then once backwards. |