Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A simple asynchronous Python wrapper for ffmpeg

Project description

Latest version Travis-CI Documentation Status

ffmpy3

ffmpy3 is a fork of ffmpy, a simplistic FFmpeg command line wrapper. ffmpy implements a Pythonic interface for executing FFmpeg via command line and uses Python’s subprocess module for synchronous execution. Asynchronous execution using yield from or await is also supported using Python’s asyncio.subprocess module.

Installation

You guessed it:

pip install ffmpy3

Quick example

The following code snippet executes FFmpeg synchronously, taking input.mp4 from the current directory as the input. It remuxes the contents of input.mp4 into a new file called output.avi which is saved in the current directory.

>>> import ffmpy3
>>> ff = ffmpy3.FFmpeg(
...     inputs={'input.mp4': None},
...     outputs={'output.avi': None}
... )
>>> ff.run()

The following code snippet does the same thing as above, but executes FFmpeg asynchronously.

>>> ff = ffmpy3.FFmpeg(
...     inputs={'input.mp4': None},
...     outputs={'output.avi': None}
... )
>>> ff.run_async()
>>> await ff.wait()

Documentation

http://ffmpy3.readthedocs.io/en/latest

See Examples section for usage examples.

License

ffmpy3 is licensed under the terms of the MIT license.

Project details


Release history Release notifications

This version

0.2.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ffmpy3, version 0.2.3
Filename, size File type Python version Upload date Hashes
Filename, size ffmpy3-0.2.3-py3.5.egg (9.4 kB) File type Egg Python version 3.5 Upload date Hashes View hashes
Filename, size ffmpy3-0.2.3-py3-none-any.whl (7.0 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size ffmpy3-0.2.3.tar.gz (5.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page