build method
FFMpegCommand
build({
- required List<
CliArguments> args, - FFMpegStream? mainOutStream,
- required String outputFilepath,
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.
To run the command, see FFMpegCommand.
Implementation
FFMpegCommand build({
required List<CliArguments> args,
FFMpegStream? mainOutStream,
required String outputFilepath,
}) {
ffmpegBuilderLog.info('Building command. Filter chains:');
for (final chain in _filterChains) {
ffmpegBuilderLog.info(' - ${chain.toCli()}');
}
ffmpegBuilderLog.info('Filter chains: $_filterChains');
return FFMpegCommand(
inputs: _inputs.keys.toList(),
args: args,
filterGraph: FilterGraph(
chains: _filterChains,
),
outputFilepath: outputFilepath,
);
}