---
title: 'An Introduction to Moviepy - Automated Video Editing with Python'
source: 'https://youtube.com/watch?v=q19xFk95AHA'
video_id: 'q19xFk95AHA'
date: 2026-06-14
duration_sec: 228
---

# An Introduction to Moviepy - Automated Video Editing with Python

> Source: [An Introduction to Moviepy - Automated Video Editing with Python](https://youtube.com/watch?v=q19xFk95AHA)

## Summary

MoviePy is a free Python library for programmatic video editing. This tutorial demonstrates how to install MoviePy and concatenate two video files into one using the compose method.

### Key Points

- **Introduction to MoviePy** [0:00] — MoviePy is a Python library for video editing, useful for automating tasks without traditional video editing tools.
- **Installation** [0:16] — Install MoviePy via pip in the terminal: pip install moviepy.
- **Importing the Library** [0:31] — Import everything from moviepy.editor using: from moviepy.editor import *.
- **Loading Video Files** [0:44] — Load video files into memory using VideoFileClip with the file path (use raw string r'path' for Windows paths).
- **Concatenating Videos** [2:02] — Use concatenate_videoclips([clip1, clip2], method='compose') to join videos. The compose method handles different resolutions.
- **Writing Output** [2:40] — Write the final video to a file using final_clip.write_videofile('output.mp4').

### Conclusion

MoviePy makes it easy to automate video editing tasks like concatenation with just a few lines of Python code.

## Transcript

hello so I thought I'll make an
introduction here into movie pie it's
sort of a python Library dedicated to
video editing so let's say he wants to
do something programmatically or you
didn't have the tools for video edit
video editing you can use this free
python Library so let's just jump into
it so first thing you need to do is go
into your terminal shell and install
um movie Pi so something like bit
and that should run and it's installed
quick
now you need to add your Imports so
we're going to say from moviepi dot
editor import Star which means
everything from that Library
and then we're gonna say let's load the
first file of video file into memory so
the files you want to join together are
these two so the basic example we're
going to do here is we're going to get
this file and this file and then just
join them together to make a final
output file so let's just show you what
it looks like
if we open that in Explorer
so you can see it looks something like
that
and this one looks something like that
and hopefully they'll be joined together
as one file so the first thing we need
to do is load the first file into memory
video file and then we have to get the
the path to that file so if we copy that
path by doing copy path reference
absolute path and we put the r in front
and then we get our second video equals
video file
and then the second video file path
or in front
now you might be wondering what the r
does here it just allows us to use this
type of backslash to denote a path
otherwise it gets a bit confusing
so yeah we're gonna say final
video equals uh concatening
and then we're going to put a list in
here so first video second video
and then the method we're going to
specify here is compose
so what this basically does is it's
getting the video Here video here so the
first one second one
taking that in as a list so the order
does matter here so this one will be
shown first then this one
and then it's combining them through a
compose method that's useful if you have
two file sizes of the different
uh resolution size
final video dot far right and let's call
this Final in this
video dot MP4
all right let's run this
so I should be doing some magic and
usually the first one is sound so audio
and now we're doing the visual aspect
that we're joining over
and hopefully if all goes well you
should have a final file that you can
open up
and if one of the file is slightly
bigger then you'll you'll just see I'll
just show you his knee done
yeah so if we open that up in Explorer
open that
you can see here
this was a smaller file you can see the
kind of Slide the side bits are a bit
padded inwards
and if we move over to the other one you
can see that takes up the whole window
so yeah this is a simple example of how
to use movie pipe
um like subscribe and I'll see in the
next video bye
