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

format: 'gif', is error

tudosxxx opened this issue · comments

await _controller.exportVideo(
        format: 'gif',
        onError: (object, stackTrace){
          print('=================error');
          print(object.toString());
          print(stackTrace.toString());
        },
        onProgress: (stats, value){
          _exportingProgress.value = value;
          print(value);
        },
        onCompleted: (file)
I/flutter (21474): Loaded ffmpeg-kit-flutter-android-min-gpl-arm64-v8a-5.1.0.
I/flutter (21474): =================error
I/flutter (21474): Exception: FFmpeg process exited with state COMPLETED and return code 1.
I/flutter (21474): ffmpeg version n5.1.2 Copyright (c) 2000-2022 the FFmpeg developers
I/flutter (21474):   built with Android (7155654, based on r399163b1) clang version 11.0.5 (https://android.googlesource.com/toolchain/llvm-project 87f1315dfbea7c137aa2e6d362dbb457e388158d)
I/flutter (21474):   configuration: --cross-prefix=aarch64-linux-android- --sysroot=/files/android-sdk/ndk/22.1.7171670/toolchains/llvm/prebuilt/linux-x86_64/sysroot --prefix=/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/ffmpeg --pkg-config=/usr/bin/pkg-config --enable-version3 --arch=aarch64 --cpu=armv8-a --target-os=android --enable-neon --enable-asm --enable-inline-asm --ar=aarch64-linux-android-ar --cc=aarch64-linux-android24-clang --cxx=aarch64-linux-android24-clang++ --ranlib=aarch64-linux-android-ranlib --strip=aarch64-linux-android-strip --nm=aarch64-linux-android-nm --extra-libs='-L/home/taner/Projects/ffmpeg-kit/prebuilt/android-arm64/cpu-features/lib -lndk_compat' --disable-autodetect --enable-cross-c
I/flutter (21474): #0      VideoEditorController.exportVideo. (package:video_editor/domain/bloc/controller.dart:597:26)
I/flutter (21474): 

Error generating gif. Just change this final String gif = videoFormat != "gif" ? "" : "fps=10 "; Need to be removed ‘loop 0’ to out.
The problem now is that cropping the video and then flipping the video will exceed the size of the control. Form a full-screen video.

commented

Sorry for the late reply and thank you for the report, i will check it when i have some times

commented

This issue should be fixed in latest 2.3.0.

The api to export the video has changed a bit, check the changelog for more info :

controller.exportVideo(
  format: VideoExportFormat.gif, // or GifExportFormat(fps: 20), to customize the fps
  onCompleted: (file) {
    // ...
  },
);