getExecuteConfig method
Returns a FFmpegVideoEditorExecute command to be executed with FFmpeg to export the video applying the editing parameters.
Implementation
@override
Future<FFmpegVideoEditorExecute> getExecuteConfig() async {
final String videoPath = controller.file.path;
final String outputPath =
await getOutputPath(filePath: videoPath, format: format);
final List<String> filters = getExportFilters();
return FFmpegVideoEditorExecute(
command: commandBuilder != null
? commandBuilder!(this, "\'$videoPath\'", "\'$outputPath\'")
// use -y option to overwrite the output
// use -c copy if there is not filters to avoid re-encoding the video and speedup the process
: "$startTrimCmd -i \'$videoPath\' $toTrimCmd ${filtersCmd(filters)} $gifCmd ${filters.isEmpty ? '-c copy' : ''} -y \'$outputPath\'",
outputPath: outputPath,
);
}