PyAV icon indicating copy to clipboard operation
PyAV copied to clipboard

Allow using the ffmpeg cli API

Open WyattBlue opened this issue 1 year ago • 1 comments

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`"""
   ...

WyattBlue avatar Jun 11 '24 06:06 WyattBlue

Will this just call ffmpeg and quit or provide imageio-ffmpeg like capabilities where it can communicate with it?

moonsikpark avatar Jun 17 '24 09:06 moonsikpark

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.

WyattBlue avatar Jul 17 '24 23:07 WyattBlue