Most movie editing is done using a graphical user interface. As a programmer, there must be another way. You want to save time and work on a number of videos at the same time. The first step is to install MoviePy and you are ready to go. The next step was to get a number of videos. Finally you 'edit' those clips using MoviePy. The 'edit' involves taking making subclips of the original video and joining them. But how did we do it?You need to import the relevant functions to work with. Then we load the video into VideoFileClip and apply it's method .subclip which makes a snippet of a certain length of the original video and we save that result in a variable clip1. We do the same for the second video and save that into another variable, clip2. Then we combine both video snippets, which are clip1 & clip2, using concatenate_videoclips and save that result into a variable called final_clip. To get the result of the video we now call the write_videofile method indicating the filename and location of the resulting video. Then you have your edited video. 

Tags: 

laudbentil's picture
20 April 2024