How to Use FFmpeg on Python?

I often read the python weekly Newsletters as my Sunday night routine. To prepare for Monday and to prepare for my future coding project.

In the latest newsletter I find this project ffmpeg-python on Github. It’s pretty convenient for me(maybe also for you)

In case you don’t actually know what FFmpeg is, I give the introduction from Wikipedia below:

  • ffmpeg is a command-line tool that converts audio or video formats. It can also capture and encode in real-time from various hardware and software sources such as a TV capture card.

So how to use it?

Step1: Install it via pip

pip install ffmpeg-python

Step2: Read the API reference

ffmpeg-python: Python bindings for FFmpeg

Step3: Use it

You can refer to its exampleor create your own scriptFor example: change the video quality, change the file type, change the bit rates........

Written by

Machine Learning / Deep Learning / Python / Flutter cakeresume.com/yanwei-liu

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store