moviepy.video.fx.all.margin

moviepy.video.fx.all.margin(clip, margin_size=None, left=0, right=0, top=0, bottom=0, color=(0, 0, 0), opacity=1.0)[source]

Draws an external margin all around the frame.

Parameters:
margin_sizeint, optional

If not None, then the new clip has a margin size of size margin_size in pixels on the left, right, top, and bottom.

leftint, optional

If margin_size=None, margin size for the new clip in left direction.

rightint, optional

If margin_size=None, margin size for the new clip in right direction.

topint, optional

If margin_size=None, margin size for the new clip in top direction.

bottomint, optional

If margin_size=None, margin size for the new clip in bottom direction.

colortuple, optional

Color of the margin.

opacityfloat, optional

Opacity of the margin. Setting this value to 0 yields transparent margins.