ffmpeg-python-wrapper is a lightweight python binder built for the FFmpeg library. Unlike most of the other Ffmpeg python bindings, this project focuses on providing user friendly documentation and clear & simple syntax to perform music, image, and video editing tasks.
You need FFmpeg to be installed on your computer. If not, please follow the instructions below to get it.
Installing FFmpeg in Windows
- Download a static build from here.
- Use 7-Zip to unpack it in the folder of your choice.
- Open a command prompt with administrator's rights.
NOTE: Use CMD.exe, do not use Powershell! The syntax for accessing environment variables is different from the command shown in Step 4 - running it in Powershell will overwrite your System PATH with a bad value.
- Run the command (see note below; in Win7 and Win10, you might want to use the Environmental Variables area of the Windows Control Panel to update PATH):
setx /M PATH "path\to\ffmpeg\bin;%PATH%"
Do not run setx if you have more than 1024 characters in your system PATH variable. See this post on SuperUser that discusses alternatives.
Be sure to alter the command so that
path\toreflects the folder path from your root to
(Here's another explanation with pictures.)
Installing FFmpeg in OS X
Here are a couple of links to instructions:
Installing FFmpeg in Ubuntu
sudo add-apt-repository ppa:mc3man/trusty-media sudo apt-get update sudo apt-get install ffmpeg sudo apt-get install frei0r-plugins
Helpful links for Ubuntu users:
Creating a subclip of a video
video = Media('path_to_video') video.subclip(10,30)
music = Media('path_to_music') music.set_duration(80)
video = Media('path_to_video') target_duration = 120 video.loop(target_duration)
image = Media('path_to_image') new_size = [720,360] image.set_size(new_size)
clip_list = ['path_to_video1', 'path_to_video2'] concatenate_clips(clip_list, 'output_name.mp4')
This project is in the very early stages of development. Please feel free to fork the repository and mess around with it.
- For small changes, please open a pull request
- For larger changes, please start an issue so other people can weigh in. Otherwise, feel free to contact me at my email.