LeGoffMael / video_editor

A flutter package for editing video written in pure Dart with fully customizable UI. Supports crop, trim, rotation and cover selection.

Home Page:https://pub.dev/packages/video_editor

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to reduce video exporting time?

RzTutul opened this issue · comments

Is there any way to reduce video exporting time? it takes much time to export a video.

commented

The exportation is handled by ffmpeg_kit, i don't really know how to improve the exportation time

Ok. Can you add some filters?

commented

I am not sure what is your question

This is the command used to export the video :

" -i \'$videoPath\' ${customInstruction ?? ""} $filter ${_getPreset(preset)} $_trimCmd -y \"$outputPath\"";

You can use both preset and customInstruction to customize the exportation

@RzTutul Did you solve it?

Is there any way to reduce video exporting time? it takes much time to export a video.

Try to use preset ultrafast and maybe if you want reduce video size you can reduce audio quality like the customInstruction .

  await _controller.exportVideo(
      preset: VideoExportPreset.ultrafast,
      customInstruction: '-c:a aac -b:a 64k',

#140 @peyton-v5 @RzTutul I just move to custom command using the _controller variables

    final _filePath = await Utils.createTrimmedVideo(
        startValue: _controller.startTrim,
        endValue: _controller.endTrim,
        outputPath: _temporalRoute,
        videoPath: _controller.file.path,
      );
commented

The latest version 3.0.0 is out.
It now gives you complete control of the exportation process