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?
Just clear your unnecessary data or reduce video size to free up the memory. App Caches/Cookies/History/Data is another representative cause for iPhone won't play videos online issue. Don't forget to periodically clear them to speed up your iPhone. Sometimes, video playback issue is caused by outdated apps.
Your Android's operating system isn't up to date. You may have downloaded any untrustworthy software on your mobile phone. The video may not have downloaded completely from the source web portal. The media player present in your handset is outdated.
To move photos and videos from your Android device to your iPhone, iPad, or iPod touch using a computer: Connect your Android to your computer and find your photos and videos. On most devices, you can find these files in DCIM > Camera. On a Mac, install Android File Transfer, open it, then go to DCIM > Camera.
As we know, iPhone videos' default format is MOV, which cannot be supported by Android. If you want to play iPhone videos on Android without extra apps or codecs installed, you need to convert MOV to common formats such as MP4, AVI, MKV, etc.
The iPhone supports video in MPEG-4 video format, and at a resolution not larger than 640x480
try this mediaRecorder.setVideoSize(640, 480);
MORE INFO: to play video on iphone
Video Format: MP4, MOV, M4V
Video Size: up to 640x480
Video Framerate: up to 30fps
Video Bitrate: up to 1.5Mbps for H.264, or 2.5Mbps for MPEG-4
Audio: AAC up to 160Kbps, 48kHz
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With