ZPRP FFmpeg

docs

Documentation Status

tests

GitHub Actions Build Status Coverage Status

package

PyPI Package latest release PyPI Wheel Supported versions Supported implementations Commits since latest release

Implementation of the successor to the ffmpeg-python library

  • Free software: MIT license

Installation

The package is available on pip:

pip install zprp_ffmpeg

Getting started

A minimal example showing basic usage of the library:

import zprp_ffmpeg
stream = zprp_ffmpeg.input("input.mp4")
stream = zprp_ffmpeg.hflip(stream)
stream = zprp_ffmpeg.output(stream, "output.mp4")
zprp_ffmpeg.run(stream)

Check out more examples

Further documentation is available at https://zprp-ffmpeg.readthedocs.io/en/latest/

Development

Project uses poetry for package management. Check out their docs for installation steps. Tests are managed by tox, which uses pytest under the hood.

To install package in development mode, enter the virtual environment managed by poetry, then use install command:

poetry shell
poetry install --with="typecheck"

To run tests on multiple python interpreters, build documentation, check for linting issues, run:

tox

However, this might be cumbersome, since it requires having all supported python interpreters available. To run only selected interpreters, use -e option, for example:

tox -e py312-lin,check #python 3.12 on linux, and linter checks

You can view all defined interpreters with tox -l

To check for typing and linting issues manually, run:

mypy src
pre-commit run --all-files