FfmpegBuilder class

Builds an FfmpegCommand by accumulating all inputs and filter streams for a given command, and then generates the CLI arguments.

An FfmpegCommand can be constructed directly, but FfmpegBuilder helps to ensure that all of your inputs have appropriate flags, and all of your stream IDs match, where expected.

To build an FfmpegCommand, first, ddd inputs with addAsset, addNullVideo, addNullAudio, addVideoVirtualDevice, and addAudioVirtualDevice.

Configure the filter graph by creating streams with createStream, and then combine those FfmpegStreams with Filters, into FilterChains, and add the FilterChains with addFilterChain.

Once you've added all inputs, and you've configured the filter graph, create the FfmpegCommand with build.

Constructors

FfmpegBuilder()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addAsset(String assetPath, {bool hasVideo = true, bool hasAudio = true}) FfmpegStream
Adds an input asset at the given assetPath.
addAudioVirtualDevice(String device) FfmpegStream
addFilterChain(FilterChain chain) → void
addNullAudio() FfmpegStream
Adds a virtual audio input asset, which can be used to fill audio when no other audio source is available.
addNullVideo({required int width, required int height}) FfmpegStream
Adds a virtual video input asset with the given width and height, which can be used to fill up time when no other video is available.
addVideoVirtualDevice(String device) FfmpegStream
build({String? ffmpegPath, required List<CliArg> args, FfmpegStream? mainOutStream, required String outputFilepath}) FfmpegCommand
Accumulates all the input assets and filter chains in this builder and returns an FfmpegCommand that generates a corresponding video, which is rendered to the given outputFilepath.
createStream({bool hasVideo = true, bool hasAudio = true}) FfmpegStream
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited