FilterGraph
A compiled libavfilter graph. Build with FilterGraph.buildVideo / FilterGraph.buildAudio (single input) or buildVideoMulti / buildAudioMulti (N inputs: overlay, amix, …). Feed frames through process (single input) or feedInput (any input). Close it when done. feedInput and flushInput answer with a FeedResult, which names the input a graph with several inputs waits for.
A graph is single-shot: once EOF has been flushed through it, it cannot accept more frames. process closes the graph itself when its returned flow terminates; push-style users call close (idempotent) when finished.
Multi-input descriptions reference pads by label: inputs are [in0]…[inN-1], the output is [out], e.g. "[in0][in1]overlay=10:10[out]" or "[in0][in1]amix=inputs=2[out]".
Properties
Functions
Push one frame into input index; each output frame is handed to onOutput as it comes out, before the graph is asked for the next one. Closes frame (the graph keeps its own reference). Output frames are valid only for the duration of the callback; Frame.copy to keep one.
Fixed-size sample chunking for the buffersink (audio graphs only). Encoders such as AAC accept exactly frameSize samples per call; setting this makes the graph emit that.