tanersener / flutter-ffmpeg

FFmpeg plugin for Flutter. Not maintained anymore. Superseded by FFmpegKit.
GNU Lesser General Public License v3.0
645 stars 132 forks source link

No implementation found for method executeFFmpegWithArguments on channel flutter_ffmpeg #114

Closed remcova closed 4 years ago

remcova commented 4 years ago

Description I'm trying to run a simple ffmpeg command:

-i test.mp4 test.avi

but unfortunately I get the following error:

No implementation found for method executeFFmpegWithArguments on channel flutter_ffmpeg

Expected behavior Convert mp4 file to avi with ffmpeg.

Current behavior ffmpeg function not working, error:

No implementation found for method executeFFmpegWithArguments on channel flutter_ffmpeg

Logs MissingPluginException(No implementation found for method executeFFmpegWithArguments on channel flutter_ffmpeg) http://prntscr.com/rkcxcr

Environment [√] Flutter (Channel dev, v1.8.0, on Microsoft Windows [Version 10.0.18362.720], locale nl-NL) • Flutter version 1.8.0 at C:\flutter • Framework revision 2fefa8c731 (9 months ago), 2019-07-01 11:33:22 -0700 • Engine revision 3c51a7bfff • Dart version 2.5.0 (build 2.5.0-dev.0.0 b5aeaa6796)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0) • Android SDK at C:\ADI-sdk\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.0 • ANDROID_HOME = C:\ADI-sdk\sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) X Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.

[√] Android Studio (version 3.4) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 36.1.1 • Dart plugin version 183.6270 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] IntelliJ IDEA Community Edition (version 15) • IntelliJ at C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.3 X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins X This install is older than the minimum recommended version of 2017.1.0.

tanersener commented 4 years ago

You're using flutter dev channel right now. Do you have the same error using the stable channel?

Can you please share more information about your flutter_ffmpeg integration? Which version do you use, which flutter_ffmpeg functions do you use in your app, etc. ?

remcova commented 4 years ago

Yes, I get the same error when using the stable channel. I'm using version 0.2.10 of flutter_ffmpeg and this is the line of code that i'm trying to execute: _flutterFFmpeg.execute("-i test.mp4 test.avi").then((rc) => print("FFmpeg process exited with rc $rc"));

tanersener commented 4 years ago

Did you try running another _fluttter_ffmpeg function? Can you please provide some sort of log, logcat, console output?

remcova commented 4 years ago

No I did not try something else, here is the log:

E/flutter (26163): [ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No im plementation found for method executeFFmpegWithArguments on channel flutter_ffmpeg) E/flutter (26163): #0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:300:7) E/flutter (26163): E/flutter (26163): #1 FlutterFFmpeg.execute (package:flutter_ffmpeg/flutter_ffmpeg.dart:371:65) E/flutter (26163): E/flutter (26163): #2 _MyHomePageState.ffmpegTest (package:tiktok_video_editor/main.dart:52:20) E/flutter (26163): #3 _MyHomePageState._incrementCounter. (package:tiktok_video_editor/ma in.dart:64:7) E/flutter (26163): #4 State.setState (package:flutter/src/widgets/framework.dart:1117:30) E/flutter (26163): #5 _MyHomePageState._incrementCounter (package:tiktok_video_editor/main.dart:56:5) E/flutter (26163): #6 _InkResponseState._handleTap (package:flutter/src/material/ink_well.dart:511:14) E/flutter (26163): #7 _InkResponseState.build. (package:flutter/src/material/ink_well.dar t:566:30) E/flutter (26163): #8 GestureRecognizer.invokeCallback (package:flutter/src/gestures/recognizer.dart:166:24) E/flutter (26163): #9 TapGestureRecognizer._checkUp (package:flutter/src/gestures/tap.dart:240:9) E/flutter (26163): #10 TapGestureRecognizer.acceptGesture (package:flutter/src/gestures/tap.dart:211:7) E/flutter (26163): #11 GestureArenaManager.sweep (package:flutter/src/gestures/arena.dart:156:27) E/flutter (26163): #12 _WidgetsFlutterBinding&BindingBase&GestureBinding.handleEvent (package:flutter/src/ges tures/binding.dart:225:20) E/flutter (26163): #13 _WidgetsFlutterBinding&BindingBase&GestureBinding.dispatchEvent (package:flutter/src/g estures/binding.dart:199:22) E/flutter (26163): #14 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerEvent (package:flutter /src/gestures/binding.dart:156:7) E/flutter (26163): #15 _WidgetsFlutterBinding&BindingBase&GestureBinding._flushPointerEventQueue (package:flu tter/src/gestures/binding.dart:102:7) E/flutter (26163): #16 _WidgetsFlutterBinding&BindingBase&GestureBinding._handlePointerDataPacket (package:fl utter/src/gestures/binding.dart:86:7) E/flutter (26163): #17 _rootRunUnary (dart:async/zone.dart:1136:13) E/flutter (26163): #18 _CustomZone.runUnary (dart:async/zone.dart:1029:19) E/flutter (26163): #19 _CustomZone.runUnaryGuarded (dart:async/zone.dart:931:7) E/flutter (26163): #20 _invoke1 (dart:ui/hooks.dart:233:10) E/flutter (26163): #21 _dispatchPointerDataPacket (dart:ui/hooks.dart:154:5) E/flutter (26163):

tanersener commented 4 years ago

No I did not try something else, here is the log:

Could you please try?

Also, can you please try running example application provided in this repository?

remcova commented 4 years ago

I've tried your example application and now I get the following error:

MissingPluginException(No implementation found for method enableLogs on channel flutter_ffmpeg)

Am I missing something? because every time it's a "no implementation found" error. I followed the install instructions so I would say it should work. I'm also using the stable channel now of Flutter.

Edit: I get this error in debug mode, in regular run mode I get the following error:

I/flutter (30226): Loading flutter-ffmpeg. I/flutter (30226): ══╡ EXCEPTION CAUGHT BY SERVICES LIBRARY ╞══════════════════════════════════════════════════════════ I/flutter (30226): The following MissingPluginException was thrown while activating platform stream on channel I/flutter (30226): flutter_ffmpeg_event: I/flutter (30226): MissingPluginException(No implementation found for method listen on channel flutter_ffmpeg_event)

tanersener commented 4 years ago

If you can't run example application this shows that you have a more general error. enableLogs() is the first library method that is called in example test application. This is why you have it in the error message.

Can you please list instructions you've used to test example application? So we can be sure that you're not missing something.

remcova commented 4 years ago

I copied the required dependencies into my pubspec.yaml dependencies: flutter: sdk: flutter flutter_ffmpeg: ^0.2.10 path: ^1.6.2 path_provider: ^1.4.0

Then I copied the code from your example project (flutter_ffmpeg_example.dart) into my main.dart and changed the application name corresponding to your example application name. After this I ran the application in debug mode.

In debug mode I get an error about the method enableLogs and in Run/build mode I get an error saying "no implementation found for method listen".

tanersener commented 4 years ago

Testing example application is important to understand whether you have an error in your application or in your flutter setup. But you can not test example application by copying files from it. You're creating another hybrid application which doesn't help us. At least it is not helping me.

Is it possible to test it using the following steps?

git clone https://github.com/tanersener/flutter-ffmpeg.git
cd flutter-ffmpeg/example
flutter packages get 
flutter run -t lib/flutter_ffmpeg_example.dart
remcova commented 4 years ago

I followed your steps, the app runs but I still get the same error for every method. I attached the output of the log for you. log.txt

tanersener commented 4 years ago

Can you share me your flutter doctor output on stable flutter channel?

remcova commented 4 years ago

Here is the output:

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18362.720], locale nl-NL) • Flutter version 1.12.13+hotfix.8 at C:\flutter • Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800 • Engine revision e1e6ced81d • Dart version 2.7.0

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.0) • Android SDK at C:\ADI-sdk\sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.0 • ANDROID_HOME = C:\ADI-sdk\sdk • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01) X Android license status unknown. Try re-installing or updating your Android SDK Manager. See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.

[√] Android Studio (version 3.4) • Android Studio at C:\Program Files\Android\Android Studio • Flutter plugin version 36.1.1 • Dart plugin version 183.6270 • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[!] IntelliJ IDEA Community Edition (version 15) • IntelliJ at C:\Program Files (x86)\JetBrains\IntelliJ IDEA Community Edition 15.0.3 X Flutter plugin not installed; this adds Flutter specific functionality. X Dart plugin not installed; this adds Dart specific functionality. • For information about installing plugins, see https://flutter.dev/intellij-setup/#installing-the-plugins X This install is older than the minimum recommended version of 2017.1.0.

[!] VS Code, 64-bit edition (version 1.20.1) • VS Code at C:\Program Files\Microsoft VS Code X Flutter extension not installed; install from https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

! Doctor found issues in 3 categories.

remcova commented 4 years ago

I got it working! I force updated my Flutter on the stable channel which seems the reason why it works now. Also I had to downgrade the version of the path dependency from 1.6.4 to 1.6.2 otherwise I couldn't run the application. Thank you for your help!