-
-
Notifications
You must be signed in to change notification settings - Fork 382
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new audio format #8
Comments
Hi @AnthonyKoueik, You're lucky! I've made a lib for that yesterday. Please check AndroidAudioConverter. After the recording finish, you can convert WAV to AAC, MP3, M4A, WMA and FLAC: @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == 0) {
if (resultCode == RESULT_OK) {
// Great! User has recorded and saved the audio file
// Now you can convert it
AndroidAudioConverter.with(MyActivity.this)
.setFile(myWavFile)
.setFormat(AndroidAudioConverter.AudioFormat.MP3)
.setCallback(callback)
.convert();
} else if (resultCode == RESULT_CANCELED) {
// Oops! User has canceled the recording
}
}
} Please let me know if this solve your problem. |
that's amazing, but i want to ask if this affect the size? |
Yes, the size reduce a lot with AAC, MP3, M4A and WMA formats. |
I didn't read your Audio Recorder code, can't I change it to aac output ? |
I'm using OmRecorder lib to record audio. Currently it does't support other formats. |
i'm stucked with a "FFmpeg not loaded" Exception , can you help me with this? thx ~ |
how can i get the time of my audio file |
The library loads just fine for me, but I can not get it to convert files. All converts failed. I am not sure if it's because of the new scoped storage method for apps with api 29 and up or what the issue is. ActivityForResult is depreciated, and with the new method it still doesn't work. Hey Adrielcafe, will you please give us an update that works with Android 12 api 32, and the new ActivityForResult launcher method, and with the new scoped storage. Thanks! |
If anyone wants to try and fix the project that I started and see if you can get this to work go ahead. Download it here https://file.io/ds6UHOxV4yns If you get it to work please send the fixed project to my email [email protected] Thanks! |
can this app support other formats, like mp3, AAC ... ?
The text was updated successfully, but these errors were encountered: