moviepy.video.compositing.CompositeVideoClip.CompositeVideoClip#
- class moviepy.video.compositing.CompositeVideoClip.CompositeVideoClip(clips, size=None, bg_color=None, use_bgclip=False, is_mask=False)[source]#
A VideoClip made of other videoclips displayed together. This is the base class for most compositions.
- Parameters:
size -- The size (width, height) of the final clip.
clips --
A list of videoclips.
Clips with a higher
layerattribute will be displayed on top of other clips in a lower layer. If two or more clips share the samelayer, then the one appearing latest inclipswill be displayed on top (i.e. it has the higher layer).For each clip:
- The attribute
posdetermines where the clip is placed. See
VideoClip.set_pos
- The attribute
The mask of the clip determines which parts are visible.
Finally, if all the clips in the list have their
durationattribute set, then the duration of the composite video clip is computed automaticallybg_color -- Color for the unmasked and unfilled regions. Set to None for these regions to be transparent (will be slower).
use_bgclip -- Set to True if the first clip in the list should be used as the 'background' on which all other clips are blitted. That first clip must have the same size as the final clip. If it has no transparency, the final clip will have no mask.
clip. (The clip with the highest FPS will be the FPS of the composite)