PyAV
PyAV copied to clipboard
Allow using the ffmpeg cli API
a.k.a ffmpeg.c in fftools
Overview
Doing many tasks using the "proper" APIs is verbose, error-prone, and brittle in the face of major ffmpeg version bumps.
Allowing using the command line syntax is fast and familiar to users. It also lets developers not have to bundle separate ffmpeg binaries if they want to use that api.
Expected PyAV API
from av.fftools import ffmpeg
ffmpeg(["-i", "input.mp4", "output.mkv"])
def ffmpeg(args: list[str]) -> None:
"""Interprets args like the ffmpeg cli does. Wraps `main()` in `fftools/ffmpeg.c`"""
...
Will this just call ffmpeg and quit or provide imageio-ffmpeg like capabilities where it can communicate with it?
FFmpeg's build system does not support this, and I don't want to maintain those patches.
An alternative idea is to provide a high-level, fluent syntax that's ffmpeg-like.