According to the Camera.Parameters#getPreferredSizeForVideoPreview documentation:
we recommend to choose a preview size that has the same aspect ratio as the resolution of video to be recorded
I have found that, on certain devices (Galaxy S3), that selecting a video recording size with a different aspect ratio does indeed cause problems recording video (green/purple videos).
When I follow the documentation's advice and stick to the same aspect ratio, it mostly works, but on some devices (Nexus S / Android 4.0.4), calls to MediaRecorder.start()
fail with the message:
E/MediaRecorder﹕ start failed: -19
On other devices (HTCEVOV4G / Android 4.0.3) calls to MediaRecorder.stop
fail with the message:
E/MediaRecorder﹕ stop failed: -1007
I do find, however, that if I call MediaRecorder#setVideoSize
with the exact same dimensions as the camera's preview size, the video recording works.