I am recording a video in android like this
List<Camera.Size> list = myCamera.getParameters().getSupportedPictureSizes();
Parameters parameters = myCamera.getParameters();
parameters.setColorEffect(coloreffects.get(index_color_effect));
myCamera.setParameters(parameters);
mediaRecorder = new MediaRecorder();
myCamera.unlock();
mediaRecorder.setCamera(myCamera);
mediaRecorder.setOrientationHint(90);
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
mediaRecorder.setAudioEncoder(AudioEncoder.HE_AAC);
mediaRecorder.setVideoEncoder(VideoEncoder.H264);
mediaRecorder.setOutputFile(Constants.videourl);
mediaRecorder.setMaxDuration(30000); // Set max duration 60 sec.
mediaRecorder.setVideoFrameRate(24);
mediaRecorder.setVideoFrameRate(30);
mediaRecorder.setVideoSize(720, 480);
mediaRecorder.setPreviewDisplay(myCameraSurfaceView.getHolder().getSurface());
this recored video and able to play in android well but unable to play on iphone.
if if use this code for recording
// work two
{
mediaRecorder.setAudioSource(MediaRecorder.AudioSource.CAMCORDER);
mediaRecorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
mediaRecorder.setProfile(CamcorderProfile.get(CamcorderProfile.QUALITY_HIGH));
mediaRecorder.setOutputFile(videourl);
mediaRecorder.setMaxDuration(30000); // Set max duration 60 sec.
}
THis records video compatible.with iphone well. but this records 30 seconds video about 47 mbs on samsung note2.
Any help?