10-18-2011 02:36 AM - last edited on 10-18-2011 02:50 AM
recorder = new MediaRecorder();
recorder.setVideoSource(MediaRecorder.VideoSour
recorder.setOutputFormat(MediaRecorder.OutputFo
surfaceHolder.setKeepScreenOn(true);
recorder.setPreviewDisplay(surfaceHolder.getSur
recorder.setVideoSize(352,288);
recorder.setVideoFrameRate(30);
recorder.setVideoEncodingBitRate(500 * 1024);
recorder.setVideoEncoder(MediaRecorder.VideoEnc
10-26-2011 09:47 AM
Hi,
you ever get anywhere with this. I have been having the same problems with this. and so far your the only post i have found on the matter.
12-27-2011 02:54 PM
I finally got around to playing with this (the office is pretty quiet this week; a lot of folks are taking an extended Christmas break) and after adding the needed bits of code (surfaceChanged(), surfaceCreated(), and surfaceDestroyed() methods, primarily), it seems to be working fine for me on a DROID 3 running Android 2.3.5. If you are still having problems with this, try the attached APK (unzip it first, of course); it is from the project I created based on your code.
-Greg Wilson
MOTODEV Technical Support
Motorola Mobility, Inc.
02-11-2012 03:45 AM
Would you mind sharing the essential parts from your code? I'd like to see specifically how you handle the surface events you mentioned. We are having the same problem (with the green/purple squares) on all the newer Motorola devices, and trying to rewrite the video recording code, using as the starting point this recommended way:
http://developer.android.com/guide/topics/media/ca
Thanks and regards,
Robert
02-13-2012 10:28 AM
My Java source is attached. No guarantees, of course, but it worked for me.
-Greg Wilson
MOTODEV Technical Support
Motorola Mobility, Inc.
02-13-2012 02:38 PM
Thanks, I'll try to adapt my code, and see if it changes anything on the users' phones.
02-17-2012 04:57 AM
No good news
On a Droid Razr Maxx my test app still creates corrupt video files. And the apk you posted simply won't run, just crashes. Any other ideas?
02-19-2012 02:53 PM
I heard back from 2 users, who updated their phones to Android 2.3.6. Both say the videos now record properly
02-20-2012 10:18 AM
Excellent news!
-Greg Wilson
MOTODEV Technical Support
Motorola Mobility, Inc.
© Copyright 1994-2012 Motorola Mobility, Inc. All rights reserved.
Portions of this page are modifications based on work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License.
Android, Android Market and YouTube are trademarks of Google, Inc.
DROID is a trademark of Lucasfilm Ltd. and its related companies. Used under license.
Source code displayed on this page may be licensed under Apache License, Version 2
Copyright © 2010, Android Open Source Project. All rights reserved unless otherwise explicitly indicated.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.