Reply
New Member
staid
Posts: 1
Registered: 10-18-2011

Droid 3 flickering green squares with garbled video by MediaRecorder

[ Edited ]

  recorder = new MediaRecorder();
   recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);   

   recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);  
   surfaceHolder.setKeepScreenOn(true);
   recorder.setPreviewDisplay(surfaceHolder.getSurface()); 
   recorder.setVideoSize(352,288);   
   recorder.setVideoFrameRate(30); 
   recorder.setVideoEncodingBitRate(500 * 1024);       
   recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);   
 

20111018174534.jpg
Please use plain text.
New Member
caguilar
Posts: 1
Registered: 10-26-2011

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

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.

Please use plain text.
Motorola
Greg_Wilson
Posts: 767
Registered: 03-06-2009

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

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.

Please use plain text.
Visitor
DailyRoads
Posts: 5
Registered: 08-28-2010

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

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/camera.html#capture-video

 

Thanks and regards,

Robert

---
DailyRoads Voyager
http://www.dailyroads.com/voyager
Please use plain text.
Motorola
Greg_Wilson
Posts: 767
Registered: 03-06-2009

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

My Java source is attached. No guarantees, of course, but it worked for me.

 

-Greg Wilson

 MOTODEV Technical Support

 Motorola Mobility, Inc.

Please use plain text.
Visitor
DailyRoads
Posts: 5
Registered: 08-28-2010

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

Thanks, I'll try to adapt my code, and see if it changes anything on the users' phones.

---
DailyRoads Voyager
http://www.dailyroads.com/voyager
Please use plain text.
Visitor
DailyRoads
Posts: 5
Registered: 08-28-2010

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

No good news :smileysad: 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?

 

---
DailyRoads Voyager
http://www.dailyroads.com/voyager
Please use plain text.
Visitor
DailyRoads
Posts: 5
Registered: 08-28-2010

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

I heard back from 2 users, who updated their phones to Android 2.3.6. Both say the videos now record properly :smileyhappy: 

---
DailyRoads Voyager
http://www.dailyroads.com/voyager
Please use plain text.
Motorola
Greg_Wilson
Posts: 767
Registered: 03-06-2009

Re: Droid 3 flickering green squares with garbled video by MediaRecorder

Excellent news!

 

-Greg Wilson

 MOTODEV Technical Support

 Motorola Mobility, Inc.

Please use plain text.