Companion
object Companion
Builds graphs.
Functions
Link copied to clipboard
fun buildAudio(description: String, sampleRate: Int, sampleFormat: SampleFormat, channels: Int, timeBase: Rational, outputSampleRate: Int = 0, outputSampleFormat: SampleFormat = SampleFormat.None, outputChannels: Int = 0, channelLayoutMask: Long? = null, outputChannelLayoutMask: Long? = null): FilterGraph
Build a single-input audio graph. When the output* parameters are given, an aformat stage is appended so emitted frames arrive encoder-ready (resampled / reformatted / remixed inside the graph).
Link copied to clipboard
fun FilterGraph.Companion.buildAudio(chain: FilterChain, sampleRate: Int, sampleFormat: SampleFormat, channels: Int, timeBase: Rational, outputSampleRate: Int = 0, outputSampleFormat: SampleFormat = SampleFormat.None, outputChannels: Int = 0, channelLayoutMask: Long? = null, outputChannelLayoutMask: Long? = null): FilterGraph
The audio half of buildVideo's chain overload, with the same refusal.
Link copied to clipboard
fun buildAudioMulti(description: String, inputs: List<AudioInput>, outputSampleRate: Int = 0, outputSampleFormat: SampleFormat = SampleFormat.None, outputChannels: Int = 0, outputChannelLayoutMask: Long? = null): FilterGraph
N-input audio graph. "[in0][in1]amix=inputs=2:duration=longest[out]" mixes two tracks.
Link copied to clipboard
fun buildVideo(description: String, width: Int, height: Int, pixelFormat: PixelFormat, timeBase: Rational, frameRate: Rational, sampleAspectRatio: Rational = Rational(1, 1)): FilterGraph
Builds a single-input video graph from description, for input frames of the given shape.
Link copied to clipboard
fun FilterGraph.Companion.buildVideo(chain: FilterChain, width: Int, height: Int, pixelFormat: PixelFormat, timeBase: Rational, frameRate: Rational, sampleAspectRatio: Rational = Rational(1, 1)): FilterGraph
Builds a video graph from a typed FilterChain, refusing before FFmpeg is asked to parse anything when this build lacks one of the chain's filters.
Link copied to clipboard
N-input video graph for compositions. "[in0][in1]overlay=W-w-10:H-h-10[out]" puts input 1 as a watermark in input 0's bottom-right corner.