createExportCommand method
Create an FFmpeg command string to export a cover image from the specified video.
The inputPath
specifies the location of the input video file to extract the cover image from.
The outputPath
specifies the path where the exported cover image file should be saved.
The scale
is scale=width*scale:height*scale
and reduce or increase cover size.
The quality
of the exported image (from 0 to 100 (more info))
Set isFiltersEnabled
to false
if you do not want to apply any changes
Implementation
String createExportCommand({
required String inputPath,
required String outputPath,
double scale = 1.0,
int quality = 100,
bool isFiltersEnabled = true,
}) {
final String filter = getExportFilters(
scale: scale,
isFiltersEnabled: isFiltersEnabled,
);
return '-i $inputPath $filter -y $outputPath';
}