Recorded Video playing without sound

I have followed this to record the video. I have used the following coding to play the recorded Video..

url = "file:///mnt/sdcard/CaptureVideo/1510402819.3gpp"

Intent i = new Intent(Intent.ACTION_VIEW);
i.setDataAndType(Uri.parse(url), "video/*");
startActivity(i);

i have tried with mp4 and mp3 format still could not hear the sound. . .

NOTE: if i am playing the recorded video directly not able to hear sound.. Any one help me..

Answers


Set the AudioSource and Audio Encoder as follows,

recorder.setVideoSource(MediaRecorder.VideoSource.DEFAULT);
recorder.setAudioSource(MediaRecorder.AudioSource.DEFAULT);
recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
recorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
recorder.setAudioEncoder(MediaRecorder.AudioEncoder.DEFAULT);

try this :

Intent movieIntent = new Intent();
movieIntent.setAction(android.content.Intent.ACTION_VIEW);
movieIntent.setDataAndType(Uri.fromFile(file), "video/*");
startActivity(movieIntent);

Need Your Help

Javascript: Quickly lookup value in object (like we can with properties)

javascript object loops lookup

I have an object that has pairs of replacement values used for simple encoding / decoding (not for security, just for a convenience; too complicated to explain it all here). It's in the form