FilterGraph

expect class FilterGraph : AutoCloseable

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.

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

actual class FilterGraph : AutoCloseable

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.

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

actual class FilterGraph : AutoCloseable

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.

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

actual class FilterGraph : AutoCloseable

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.

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

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard
expect val inputCount: Int

Number of buffersrc inputs this graph was built with.

actual val inputCount: Int

Number of buffersrc inputs this graph was built with.

actual val inputCount: Int

Number of buffersrc inputs this graph was built with.

actual val inputCount: Int

Number of buffersrc inputs this graph was built with.

Link copied to clipboard

Time-base of frames leaving the graph. Filters like fps/atempo may change it.

Time-base of frames leaving the graph. Filters like fps/atempo may change it.

Time-base of frames leaving the graph. Filters like fps/atempo may change it.

Time-base of frames leaving the graph. Filters like fps/atempo may change it.

Functions

Link copied to clipboard
expect open override fun close()
actual open override fun close()
actual open override fun close()
actual open override fun close()
Link copied to clipboard
expect fun feedInput(index: Int, frame: Frame, onOutput: (Frame) -> Unit)

Push one frame into input index; every output frame that becomes available is handed to onOutput. Closes frame (the graph keeps its own reference). Output frames are valid only for the duration of the callback; Frame.copy to keep one.

actual fun feedInput(index: Int, frame: Frame, onOutput: (Frame) -> Unit)

Push one frame into input index; every output frame that becomes available is handed to onOutput. Closes frame (the graph keeps its own reference). Output frames are valid only for the duration of the callback; Frame.copy to keep one.

actual fun feedInput(index: Int, frame: Frame, onOutput: (Frame) -> Unit)

Push one frame into input index; every output frame that becomes available is handed to onOutput. Closes frame (the graph keeps its own reference). Output frames are valid only for the duration of the callback; Frame.copy to keep one.

actual fun feedInput(index: Int, frame: Frame, onOutput: (Frame) -> Unit)

Push one frame into input index; every output frame that becomes available is handed to onOutput. Closes frame (the graph keeps its own reference). Output frames are valid only for the duration of the callback; Frame.copy to keep one.

Link copied to clipboard
expect fun flushInput(index: Int, onOutput: (Frame) -> Unit)

Signal EOF on input index and drain whatever the graph can produce. Filters like overlay emit their final frames only once every input is flushed. Flush every input, in any order. The last call delivers the remaining frames.

actual fun flushInput(index: Int, onOutput: (Frame) -> Unit)

Signal EOF on input index and drain whatever the graph can produce. Filters like overlay emit their final frames only once every input is flushed. Flush every input, in any order. The last call delivers the remaining frames.

actual fun flushInput(index: Int, onOutput: (Frame) -> Unit)

Signal EOF on input index and drain whatever the graph can produce. Filters like overlay emit their final frames only once every input is flushed. Flush every input, in any order. The last call delivers the remaining frames.

actual fun flushInput(index: Int, onOutput: (Frame) -> Unit)

Signal EOF on input index and drain whatever the graph can produce. Filters like overlay emit their final frames only once every input is flushed. Flush every input, in any order. The last call delivers the remaining frames.

Link copied to clipboard
expect fun process(input: Flow<Frame>): Flow<Frame>

Drive input through the graph (single-input graphs only), emitting each processed frame owned by the collector. Closes every input frame once consumed, and closes the graph when the flow ends.

actual fun process(input: ERROR CLASS: Symbol not found for Flow<io/github/yuroyami/kiteffmpeg/Frame>): ERROR CLASS: Symbol not found for Flow<io/github/yuroyami/kiteffmpeg/Frame>
actual fun process(input: Flow<Frame>): Flow<Frame>

Drive input through the graph (single-input graphs only), emitting each processed frame owned by the collector. Closes every input frame once consumed, and closes the graph when the flow ends.

actual fun process(input: Flow<Frame>): Flow<Frame>

Drive input through the graph (single-input graphs only), emitting each processed frame owned by the collector. Closes every input frame once consumed, and closes the graph when the flow ends.

Link copied to clipboard
expect fun setOutputFrameSize(samples: Int)

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.

actual fun setOutputFrameSize(samples: Int)

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.

actual fun setOutputFrameSize(samples: Int)

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.

actual fun setOutputFrameSize(samples: Int)

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.