Is there any possible that we can playback our recorded voice in android through media player with the format of wav or mp3 instead of 3gp or mp4.
if it is possible please give me a source code or URL.
Thanks in advance.
I've already seen this kind of question. All yours...
https://stackoverflow.com/questions/5165295/android-voice-recording
Android audio and voice processing
Android Audio record
https://stackoverflow.com/questions/5234017/android-voice-recording-in-wav-format
Please be more specific describing your problem. I think the first step would be, to show us, what you've got until now. As this is a place to solve specific problems, I would recommend you to take a look into the "What kind of questions can I ask here?" section in the https://stackoverflow.com/faq.
3GP and MP4 are video formats. MP3/WAV are audio formats. The MediaPlayer class definitely supports both MP3 and WAV, as well as MP4 and 3GP. View this link for a list of all supported media formats on Android.
Here is the MediaPlayer Audio sample part of the API Demos application. You could try using this code to play your audio.
Related
I am currently developing a video streaming feature for one of my android apps. I am using android media framework for the purpose. Videos are streamed from an nginx server. Android recorded videos works fine but iOS recorded videos plays only the video not the sound.
It happens because the android support limited codecs in-built like mp3,mp4,mpeg.
While iphone support most of codecs.
What is the way to resolve this?
MP4 for video and MP3 for audio are widely accepted and work on both platforms.
So you need do some stuff at the server. Implement the ffmpeg library that will convert all the videos to MP4 and audio to MP3.
We are doing same mechanism to resolve this issue.
Some more information to understand the problem
Refer stackoverflow answer here
Hope This may help you to get the rid of your problem
Happy Coding!
I'm trying to replace the audio of a video in Android.
I think to solutions like mute the video and put on it an audio track, but
that not works very well if you want to save the video with the track on.
Is there a way to replace the sound part of a video to make it savable?
Thanks in advance.
I guess there are easier solutions, but it seems to be possible to use ffmpeg on android (FFmpeg on Android might get you going at installing it). You can then strip the audio (if you have set an audiosource while recording), and add other audio to your video. You can find many example ffmpeg-commands on how to remove from and add audio to your video.
I have tried so many different formats when I record a audio on android, that I get dizzy by just thinking about it. When I record by using .wav on ios, I can play it on android without any problem. But Im not able to play the recorded audio from a android on a ios.
I have tried to play it as a base64 and streaming by using the url. I don't know what to do play it, since nothing seems to work. But if some one just can point me in the right direction when it comes to what format I should use to record the audio on android so I can play it on ios, I would be very greatfull.
What I have so far:
recorder.setAudioSource(MediaRecorder.AudioSource.MIC);
recorder.setAudioSamplingRate(44100);
recorder.setAudioEncodingBitRate(96000);
recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.AAC);
but I got no idea what I should name the file I record on (like this record.mp3). Im using cordova so I have to do it when I start the recording. I have tried mp4, m4v, m4a, mp4, mp4, mpeg4 and mpeg. I have tried to record the file as a wav file as well, but then I get audio/x-wav in my base64 string.. Do I need to change the samplingRate, bitrate, outputformat or audio encoder to something else if I want to use .wav (not x-wav) and still make it work on ios?
After googling this issue, it seems even the very popular app "Evernote" has the same issue, and users are gutted about it. I did come across this question here on SO:
audio format for iOS and Android
They use a web service to convert the files to mp3, which works universally. I am sure you could find some way to do this without a middle man, but it should "point you in the right direction".
Hope this helps.
Cheers
I need to play multiple audio track at a time from sd card. I was trying to play with SoundPool. But it does not support larger files.
I tried with AudioTrack but it needs pure PCM code. PCM code generation bit of complex from mp3 or 3gp file, as android do not have anything build in to that.
I've look OpenSL Engine, But did not find any good example or tutorial to work with it.
How can I play multiple audio at a time in loopy style? any idea, suggestion would be great a help.
I am building an app that downloads .mp4 files from the Internet and plays them.
It seems there are no decoders for this particular video type, and I only get audio, no picture. The same thing happens with the standalone player, so it is not a problem with the program or file.
Is it possible to use a user library for the decoding and plug it into VideView?
The .mp4 in question can be found here: https://www.coursera.org/modelthinking/lecture/preview_view?lecture_id=17
Thanks in advance.