Closed jcblancomartinez closed 3 years ago
flutterSoundHelper.duration()
does not work on a remote file.
If you want to have informations on a remote file, you must download it.
Eventually this can be improved in a future versions
That would be a nice feature. Other plugins like just_audio have it already.
Thanks.
@Larpoux
FYI.
I added flutter_ffmpeg: ^0.3.0 as dependency and tried the following and it worked:
MediaInformation info = await FlutterFFprobe().getMediaInformation('https://xxx/flutter_sound_yyy.aac');
Map<dynamic, dynamic> mediaProperties = info.getMediaProperties();
double seconds = double.parse(mediaProperties['duration']);
This is weird. Flutter Sound just calls ffmpeg. If ffmpeg works, Flutter Sound should work too. I am going to look to this.
It might be related to the version of flutter_ffmpeg.
They seem to have done some non-backwards compatible changes like change of the data structure returned by getMediaInformation.
Yes, I think you are right.
BTW, other Flutter Sound users complained that Flutter Sound and flutter_ffmpeg are incompatible, and that they have duplicates symbols when they add flutter_ffmpeg as a dependency of their app.
This is something (near) the top of my todo stack. I am surprised that you are able to do it.
Yes, you are right. I was forced to remove flutter_sound as dependency to be able to run the above test.
Regards.
Thanks.
@Larpoux is this something you are planning to solve in the upcoming 4 weeks? If not, I will need to change the plugin.
Thanks.
Yes @jcblancomartinez . This bug in on top of my todolist. Unfortunately I work on τ half time, because I have another important project waiting for me. So things are sometimes long to be solved. I am sorry, I do my best ...
@Larpoux I understand it and I appreciate your dedication. I will check the status of this in 4 weeks and I will make a decision then.
Actually I am fighting with terrible asynchronous problems. The way τ handle asynchronous events is not good. But τ is at the middle of an App which does anythings and an OS which does what it wants.
Asynchronous processing is very very hard to handle correctely and need many tests before release. And even after many tests, I will not be sure that Flutter Sound users will not have problems.
@jcblancomartinez ,
I solved the incompatibility issue with flutter_ffmpeg. I will do several tests tomorrow and I will release a new Flutter Sound version.
I hope that I am not too late for your project.
Hi @Larpoux,
I appreciate your update. Good luck with the testing!!
You are in time :)
Thanks.
Regards.
Hi @Larpoux ,
I've upgraded flutter_sound to 7.6.3+2 and I'm getting null duration for both local and remote files:
Duration d = await flutterSoundHelper.duration
Could you please confirm it is working for you?
Thanks.
@jcblancomartinez ,
Yes, you are right : there is something wrong in 7.6.3 with getDuration(). 👎 I am very sorry. I am working on that, and I will tell you when it will be fixed.
@Larpoux no need to be sorry :). I actually appreciate your dedication.
Thanks.
@jcblancomartinez ,
7.6.4 is released. I hope that this release is better.
Was FFMPEG incorrectly included in Flutter Sound Lite?
v7.6.4 of flutter_sound_lite fails to build with the following error.
F:\Development\flutter-sdk\.pub-cache\hosted\pub.dartlang.org\flutter_sound_lite-7.6.4+2\android\src\main\java\com\dooboolab\fluttersound\FlutterSound.java:65: error: cannot find symbol
FlutterSoundFFmpeg.attachFFmpegPlugin( Flauto.androidContext, registrar.messenger () );
^
symbol: variable FlutterSoundFFmpeg
location: class FlutterSound
@searchy2 , I am sorry. I did something wrong yesterday. I am going to fix that this morning.
@searchy2 , I built a new release. I hope it is better, now.
@Larpoux should I try get duration against the new build or you haven't tested that yet?
Thanks.
Yes, you can try version 7.6.5
Incredible, thanks for the quick turnaround and maintaining this library!
Is there a sponsor link?
@Larpoux it works like a charm.
Thank you so much!!
Yeah! 💯
@Larpoux The error that was introduced breaks iOS as well. Please release a fix for iOS when you are able. Thank you!
In file included from
/Users/ray/Development/NOCDiOS/my_flutter/.ios/Pods/Target Support
Files/flutter_sound_lite/flutter_sound_lite-umbrella.h:14:
/Users/ray/.pub-cache/hosted/pub.dartlang.org/flutter_sound_lite-7.6.5+1/ios
/Classes/FlutterSoundFFmpeg.h:24:9: fatal error:
'mobileffmpeg/MobileFFmpegConfig.h' file not found
#import <mobileffmpeg/MobileFFmpegConfig.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.
/Users/ray/Development/NOCDiOS/my_flutter/.ios/Flutter/FlutterPluginRegistra
nt/Classes/GeneratedPluginRegistrant.m:26:9: fatal error: could not build
module 'flutter_sound_lite'
#import <flutter_sound_lite/FlutterSound.h>
~~~~~~~^
@searchy2 ,
Flutter Sound 7.7.0 is released. I really hope that the problems that you have with the LITE flavor are fixed, now.
@Larpoux Resolving as this has been implemented.
Thanks for your support.
Flutter Sound Version :
FULL or LITE flavor ? Full
Important: Result of the command :
flutter pub deps | grep flutter_sound
|-- flutter_sound 7.5.3+1 | |-- flutter_sound_platform_interface 7.5.3+1 | |-- flutter_sound_web 7.5.3+1 | | |-- flutter_sound_platform_interface...Severity
Result is not what expected
iOS/Android emulator and real device (I haven't tried it in web)
Your problem
Describe the bug
[BUG]: Duration null for remote audio file (i.e. https://xxx/flutter_sound_yyy.aac)
To Reproduce Steps to reproduce the behavior:
Logs!!!!
D/flutter-ffmpeg( 2759): Getting media information for https://xxx/flutter_sound_yyy.aac. I/mobile-ffmpeg( 2759): https protocol not found, recompile FFmpeg with openssl, gnutls or securetransport enabled. I/mobile-ffmpeg( 2759): https://xxx/flutter_sound_yyy.aac: Protocol not found