question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[bug] flutter_ffmpeg compatibility

See original GitHub issue

Flutter Sound Version : ^7.5.0+2

  • Released

  • FULL

  • Result of the command “flutter pub deps | grep flutter_sound” flutter pub deps | grep flutter_sound |-- flutter_sound 7.5.0+2 | |-- flutter_sound_platform_interface 7.5.0+2 | |-- flutter_sound_web 7.5.0+2 | | |-- flutter_sound_platform_interface…


Severity

  • Cannot build my App ? Yes

Platforms you faced the error

  • Android ? Yes

  • Real device ? Yes


Logs

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:checkReleaseDuplicateClasses'.          
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
   > Duplicate class com.arthenica.mobileffmpeg.Abi found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.AbiDetect found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.BuildConfig found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.CameraSupport found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Config found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Config$1 found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.FFmpeg found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.FFprobe found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Level found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.LogCallback found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.LogMessage found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.MediaInformation found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.MediaInformationParser found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Packages found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.Statistics found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.StatisticsCallback found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.StreamInformation found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.util.Pair found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
     Duplicate class com.arthenica.mobileffmpeg.util.Trio found in modules jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime (com.arthenica:mobile-ffmpeg-audio:4.3.1.LTS) and jetified-mobile-ffmpeg-video-4.4-runtime (com.arthenica:mobile-ffmpeg-video:4.4)
                                                                        
     Go to the documentation to learn how to <a href="d.android.com/r/tools/classpath-sync-errors">Fix dependency resolution errors</a>.
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 43s                  

Describe the bug Unable to use the plugin with flutter_ffmpeg: ^0.3.0 , I hope we need to move from jetified-mobile-ffmpeg-audio-4.3.1.LTS-runtime to v. 4.4.LTS

To Reproduce Steps to reproduce the behavior:

  1. create new flutter project
  2. add flutter_sound: ^7.5.0+2
  3. add flutter_ffmpeg: ^0.3.0 to pubspec.yaml
  4. Try to run the app

Expected behavior Build Failed

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
Larpouxcommented, Feb 11, 2021

Fixed in Flutter Sound release 7.6.3 You can read this

1reaction
Larpouxcommented, Jan 9, 2021

I am not happy with the actual situation neither. I did a hard link inside the Podfile and the build.gradle because I really wanted τ being able to use this fantastic library. But many users did not understood that and complained that they have to fight configuring their own Podfile and build.gradle.

You must understand that flutter_ffmpeg is just a wrapper above mobile_ffmpeg. mobile_ffmpeg is very heavy and it is not possible to link it 2 times.

  • If this library is linked by the App under flutter, tau-core will not be able to use it.
  • If this library is linked inside tau-core, the dart App will not be able to use it.

For example Lame and libopus are embedded inside mobile-ffmpeg and tau-core will need them to encode/decode MP3 and OPUS streams on the fly. I definitely want to be able to access mobile-ffmpeg from tau-core.

And ffmpeg-full-audio is just a part of the problem. Several users will want to use ffmpeg-video and will have also link-edit errors.

I will look tomorrow for a solution which will not duplicate mobile-ffmpeg, but it will not be simple.

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub - tanersener/flutter-ffmpeg
CocoaPods could not find compatible versions for pod "flutter_ffmpeg": In Podfile: flutter_ffmpeg (from `.symlinks/plugins/flutter_ffmpeg/ios`) Specs satisfying ...
Read more >
Flutter FFMPEG: Error setting profile baseline - Stack Overflow
I am only familiar with FFmpeg, not with the plugin for Flutter so I can't test easily. But I suspect you use scaling...
Read more >
A flutter ffmpeg kit example
/Users/joe/Projects/flutter-ffmpeg-kit-lts-repro/android/app/src/debug ... Suggestion: use a compatible library with a minSdk of at most 16, ...
Read more >
FFmpeg plugin for Flutter Supports iOS and Android - Morioh
Installation of FlutterFFmpeg using pub enables the default package, ... CocoaPods could not find compatible versions for pod "flutter_ffmpeg": In Podfile: ...
Read more >
flutter_ffmpeg - i2 git server
Installation of FlutterFFmpeg using pub enables the default package, ... CocoaPods could not find compatible versions for pod "flutter_ffmpeg": In Podfile: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found