Concatenate Video Files


You want to concatenate some of your video files to create one single video file.


import Draft

# Define input and output files
inputVideoFile1 = '//path/to/'
inputVideoFile2 = '//path/to/'
inputVideoFile3 = '//path/to/'
outputVideoFile = '//path/to/'

# Concatenate video files
Draft.ConcatenateVideoFiles( [ inputVideo1, inputVideo2, inputVideo3 ], outputVideo )


In order to successfully concatenate video files, the input files must all share the same codec and all have the same file extension than the output file. The line:

Draft.ConcatenateVideoFiles( [ inputVideoFile1, inputVideoFile2, inputVideoFile3 ], outputVideoFile )

concatenates the three input video clips and writes the result back in outputVideoFile, respecting the order in which they appear in the list.