Skip to content

Overview

This extension is built entirely on FFmpeg’s public APIs — no private-struct access, no patches required to run. But building a first-class language binding surfaces a few real limitations in those APIs: places where information that is already stable and user-facing simply isn’t reachable from code. Where we hit one of those, we’d rather fix it upstream than carry a workaround forever — and the fix helps every binding, not just this one.

This section is where we work those proposals out in the open: the problem, why it matters, the paths we’ve explored, and the likely implementation. They’re contributions to FFmpeg, written in FFmpeg’s own style (a mailing-list RFC, then a patch series). None of them ask FFmpeg to change behaviour or break compatibility — each is a small, additive way to expose something that’s already part of the stable, documented surface.

  • Filter graph config diagnostics — let avfilter_graph_config() report why a graph failed through the return path, so a binding can tell the user what to fix instead of surfacing a bare “Invalid argument.”
  • Expression variables & constants — make each filter’s expression variables (t, n, w, …) and named constants programmatically discoverable, so a host language can safely parse and evaluate expression parameters (the groundwork for PHP-closure filter params).

Less developed — captured where we’ve hit the friction, to be worked up into full proposals.

  • Dynamic-pad port counts — expose how many pads a dynamic-pad filter (split, concat) will create, so bindings don’t instantiate a throwaway filter just to count them.
  • Flagging expression options — mark which AVOptions are expression-valued (drawtext’s x vs text), so they can be validated eagerly and given expression tooling.
  • Caller-supplied expression context — let callers add variables/functions to a filter’s expression evaluation, so a host closure can run per frame (the ambitious one; a custom filter on our fork is the fallback).

An Artisan Build project.

Built on FFmpeg — an independent binding, not affiliated with or endorsed by the FFmpeg project. Support FFmpeg.