LeGoffMael / video_editor

A flutter package for editing video written in pure Dart with fully customizable UI. Supports crop, trim, rotation and cover selection.
https://pub.dev/packages/video_editor
MIT License
395 stars 236 forks source link

error exporting file, I just copy example from videoeditor page #24

Closed threepat1 closed 3 years ago

threepat1 commented 3 years ago

Everything seems ok. crop, trim, switch but can't export..

void _exportVideo() async { Misc.delayed(1000, () => _isExporting.value = true); //NOTE: To use [-crf 17] and [VideoExportPreset] you need ["min-gpl-lts"] package final File file = await _controller.exportVideo( preset: VideoExportPreset.slow, customInstruction: "-crf 17", onProgress: (statics) { if (_controller.video != null) _exportingProgress.value = statics.time / _controller.video.value.duration.inMilliseconds; }, );

actully I'm not sure how can I export to first page that show video to post by using editor

eul commented 3 years ago

The same, file is always null

If comment preset and customInstruction - it works

output: flutter: Loading flutter-ffmpeg. flutter: Loaded flutter-ffmpeg-ios-arm64. flutter: ffmpeg version v4.4-dev-416 flutter: Copyright (c) 2000-2020 the FFmpeg developers flutter: flutter: built with Apple clang version 11.0.3 (clang-1103.0.32.62) flutter: configuration: --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk --prefix=/Users/taner/Projects/mobile-ffmpeg/prebuilt/ios-arm64/ffmpeg --enable-version3 --arch=aarch64 --cpu=armv8 --target-os=darwin --ar=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar --cc=clang --cxx=clang++ --as='/Users/taner/Projects/mobile-ffmpeg/.tmp/gas-preprocessor.pl -arch aarch64 -- clang -arch arm64 -target aarch64-ios-darwin -march=armv8-a+crc+crypto -mcpu=generic -DMOBILE_FFMPEG_ARM64 -Wno-unused-function -Wno-deprecated-declarations -fstrict-aliasing -fembed-bitcode -DIOS -DMOBILE_FFMPEG_BUILD_DATE=20200725 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk -Oz -miphoneos-version-min=12.1 -I/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk/usr/include' --ranlib=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib --strip=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/strip --enable-neon --enable-cross-compile --enable-pic --enable-asm --enable-inline-asm --enable-optimizations --enable-swscale --enable-static --disable-shared --enable-small --disable-v4l2-m2m --disable-outdev=v4l2 --disable-outdev=fbdev --disable-outdev=audiotoolbox --disable-indev=v4l2 --disable-indev=fbdev --disable-openssl --disable-xmm-clobber-test --disable-debug --disable-neon-clobber-test --disable-programs --disable-postproc --disable-doc --disable-htmlpages --disable-manpages --disable-podpages --disable-txtpages --disable-sndio --disable-schannel --disable-securetransport --disable-xlib --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --disable-appkit --disable-alsa --disable-cuda --disable-cuvid --disable-nvenc --disable-vaapi --disable-vdpau --enable-gmp --enable-gnutls --disable-sdl2 --enable-zlib --enable-audiotoolbox --enable-bzlib --enable-videotoolbox --enable-avfoundation --enable-iconv flutter: libavutil 56. 55.100 / 56. 55.100 flutter: libavcodec 58. 96.100 / 58. 96.100 flutter: libavformat 58. 48.100 / 58. 48.100 flutter: libavdevice 58. 11.101 / 58. 11.101 flutter: libavfilter 7. 87.100 / 7. 87.100 flutter: libswscale 5. 8.100 / 5. 8.100 flutter: libswresample 3. 8.100 / 3. 8.100 flutter: Unrecognized option 'preset'. flutter: ERROR ON EXPORT VIDEO (CODE 1)

bojidartonchev commented 3 years ago

Hello,

I added some fixes to my local fork and now it seems working. Could you give it a try before creating a pull request?

Change video_editor dependencie in pubspec.yaml to:

video_editor:
    git:
      url: https://github.com/bojidartonchev/video_editor
seel-channel commented 3 years ago

Hello,

I added some fixes to my local fork and now it seems working. Could you give it a try before creating a pull request?

Change video_editor dependencie in pubspec.yaml to:

video_editor:
    git:
      url: https://github.com/bojidartonchev/video_editor

Would you like give maintenance to video editor package? (If you would like to maintenance it, I will give you permission to pub.dev for you launch new releases) I think I won't give maintenance it in few months because I'm too busy, if you are creating a video app you can help you some people with your video_editor updates.