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.rtfd.io

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.4.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

ffmpy3-0.2.4-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file ffmpy3-0.2.4.tar.gz.

File metadata

  • Download URL: ffmpy3-0.2.4.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.10

File hashes

Hashes for ffmpy3-0.2.4.tar.gz
Algorithm Hash digest
SHA256 fffb1b9e3efc95e94a02b01f29f24ee8177b86329aec8a8af078bf2a42b03094
MD5 734a1bd820a9d22381b2d549adcc9235
BLAKE2b-256 774cacd9dd8efb0907bacab30176ab443e552b10dd8b7a8dc5f82e4e43fe5277

See more details on using hashes here.

File details

Details for the file ffmpy3-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: ffmpy3-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.10

File hashes

Hashes for ffmpy3-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 092521e5f0e1974a1b4850d0e283d9d893d0b830216ddd2a44c6eaf463f8a365
MD5 463e3ee9ef5f34b7c523131546163255
BLAKE2b-256 a55fbb239b798da618428674b849334b2c6971f8e23c95e4436ec71fea66135c

See more details on using hashes here.

Supported by

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