flutter_sound
flutter_sound copied to clipboard
[BUG]:Codec Codec.aacMP4 is not supported on Android.
Flutter Sound Version :
-
FULL or LITE flavor ?
-
Important: Result of the command :
flutter pub deps | grep flutter_sound
Severity
-
Crash ?
-
No crash
-
Result is not what expected ?
-
I am getting Codec not supported. Using the codec Codec.aacMP4 on Android.
-
Cannot build my App ?
-
Minor issue ?
Platforms you faced the error
-
iOS ? No
-
Android ? Yes
-
Flutter Web ?
-
Emulator ? No
-
Real device ? Yes
Describe the bug A clear and concise description of what the bug is.
Trying recording by providing the codec as Codec.aacMP4. Exception is thrown as Codec not supported. Recording works fine with default codec. MinSdk version is 23 and Android version of device is 10
To Reproduce Steps to reproduce the behavior:
- Go to '...'
- Click on '....'
- Scroll down to '....'
- See error
Logs!!!!
(This is very important. Most of the time we cannot do anything if we do not have information on your bug).
To activate the logs, you must instantiate your modules with the Log Level set to Level.debug :
I/flutter (27730): │ 🐛 FS:---> _startRecorder. I/flutter (27730): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── E/flutter (27730): [ERROR:flutter/lib/ui/ui_dart_state.cc(209)] Unhandled Exception: Instance of '_CodecNotSupportedException' E/flutter (27730): #0 FlutterSoundRecorder._startRecorder
FlutterSoundPlayer myPlayer = FlutterSoundPlayer(logLevel: Level.debug);
FlutterSoundRecorder myRecorder = FlutterSoundRecorder(logLevel: Level.debug);
See this
Alright, I figured it out and it's a bit funny that I was getting that error as I did not append the extension ie. ".mp4" at the end of my file name. I think file name should not be used to determine a Codec's support. "What's in a name?" .. to quote Shakesspeare here :p
I think file name should not be used to determine a Codec's support.
Yes, myself I thought also that the file name was not used to determine the codec. But several Flutter Sound users have actually problems when the file extension is not consistent withe encoded data. Specifically when the extension is '.aac' but the codec is AAC/MP4 and not AAC/ADTS.
I guess that the file name is probably important even if Shakespeare does not agree 😆
Haha well may be you could find a way out keeping both the sects of users happy. Thanks for the library tho!
Is the extension .m4a good for Codec.aacMP4 for example 'filename.m4a'?
This issue is stale because it has been open 90 days with no activity. Leave a comment or this will be closed in 7 days.