Skip to main content

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


Download files

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

Source Distribution

ffmpy3-0.2.3.tar.gz (5.2 kB view hashes)

Uploaded Source

Built Distributions

ffmpy3-0.2.3-py3.5.egg (9.4 kB view hashes)

Uploaded Source

ffmpy3-0.2.3-py3-none-any.whl (7.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page