Skip to main content

A fork of the excellent python-ffmpeg binding for FFmpeg, updated for native async API support only.

Project description

ffmpeg-asyncio

A fork of the excellent python-ffmpeg binding for FFmpeg, updated for native async API support only.

The primary difference from the upstream library's async API is handling of abnormal exit by FFmpeg. Rather than raising an exception, an event will be emitted, allowing async handling.

Example usage:

import asyncio

from ffmpeg_asyncio import FFmpeg, Progress


async def main():
    ffmpeg = (
        FFmpeg()
        .input("input.mp4")
        .output("output.mp4")
    )

    @ffmpeg.on("progress")
    def on_progress(progress: Progress):
        print(progress)

    @ffmpeg.on("completed")
    def completed():
        print("Finished!")

    @ffmpeg.on("terminated")
    def exited(return_code: int):
        print("Oh no!")

    await ffmpeg.execute()


if __name__ == "__main__":
    asyncio.run(main())

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

ffmpeg_asyncio-0.1.3.tar.gz (9.6 kB view details)

Uploaded Source

Built Distribution

ffmpeg_asyncio-0.1.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file ffmpeg_asyncio-0.1.3.tar.gz.

File metadata

  • Download URL: ffmpeg_asyncio-0.1.3.tar.gz
  • Upload date:
  • Size: 9.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for ffmpeg_asyncio-0.1.3.tar.gz
Algorithm Hash digest
SHA256 58813a8609c64c03b53470a555e817fd3ba6f59445890d808bb81aa4d42742a0
MD5 0dbea7347d42974dae17cbd6db9153e9
BLAKE2b-256 e9dbf211ef2582b02aef5332c3e40abc421c333316e6307b49317a37a4548617

See more details on using hashes here.

File details

Details for the file ffmpeg_asyncio-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for ffmpeg_asyncio-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8c74331bc39c4b3f1f9395de3c347a6e6824588baf00541c9a4902b3a13ac18a
MD5 b8cbcaf50cd252f7e59da3156dd71d11
BLAKE2b-256 b7777cda70883c66cbe1453291ab0eca6f447a01c87064f217250ac704cd2641

See more details on using hashes here.

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