moviepy.video.compositing.CompositeVideoClip.clips_array#

moviepy.video.compositing.CompositeVideoClip.clips_array(array, rows_widths=None, cols_heights=None, bg_color=None)[source]#

Given a matrix whose rows are clips, creates a CompositeVideoClip where all clips are placed side by side horizontally for each clip in each row and one row on top of the other for each row. So given next matrix of clips with same size:

`python clips_array([[clip1, clip2, clip3], [clip4, clip5, clip6]]) `

the result will be a CompositeVideoClip with a layout displayed like:

` ┏━━━━━━━┳━━━━━━━┳━━━━━━━┓                      clip1 clip2 clip3                      ┣━━━━━━━╋━━━━━━━╋━━━━━━━┫                      clip4 clip5 clip6                      ┗━━━━━━━┻━━━━━━━┻━━━━━━━┛ `

If some clips doesn’t fulfill the space required by the rows or columns in which are placed, that space will be filled by the color defined in bg_color.

array

Matrix of clips included in the returned composited video clip.

rows_widths

Widths of the different rows in pixels. If None, is set automatically.

cols_heights

Heights of the different columns in pixels. If None, is set automatically.

bg_color

Fill color for the masked and unfilled regions. Set to None for these regions to be transparent (processing will be slower).