I have tablet acer a500 with android 4.0.
I can record video by (target size: 176x144):
_recorder = new MediaRecorder();
camera.unlock();
_recorder.setCamera(camera);
_recorder.setVideoSource(MediaRecorder.VideoSource.CAMERA);
_recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
_recorder.setVideoEncoder(MediaRecorder.VideoEncoder.DEFAULT);
_recorder.setOutputFile(outputPath);
_recorder.setPreviewDisplay(surface);
_recorder.prepare();
But I want change size of recording video.
Have next supported sizes:
front
previewSize support size: width = 176 height = 144 aspect = 1,222222
previewSize support size: width = 320 height = 240 aspect = 1,333333
previewSize support size: width = 352 height = 288 aspect = 1,222222
previewSize support size: width = 640 height = 480 aspect = 1,333333
previewSize support size: width = 672 height = 378 aspect = 1,777778
previewSize support size: width = 720 height = 576 aspect = 1,250000
previewSize support size: width = 800 height = 600 aspect = 1,333333
previewSize support size: width = 1280 height = 720 aspect = 1,777778
videSizes support size: width = 176 height = 144 aspect = 1,222222
videoSizes support size: width = 320 height = 240 aspect = 1,333333
videoSizes support size: width = 352 height = 288 aspect = 1,222222
videoSizes support size: width = 640 height = 480 aspect = 1,333333
videoSizes support size: width = 720 height = 576 aspect = 1,250000
videoSizes support size: width = 1280 height = 720 aspect = 1,777778
back
previewSize support size: width = 176 height = 144 aspect = 1,222222
previewSize support size: width = 320 height = 240 aspect = 1,333333
previewSize support size: width = 352 height = 288 aspect = 1,222222
previewSize support size: width = 640 height = 480 aspect = 1,333333
previewSize support size: width = 672 height = 378 aspect = 1,777778
previewSize support size: width = 720 height = 576 aspect = 1,250000
previewSize support size: width = 800 height = 600 aspect = 1,333333
previewSize support size: width = 1280 height = 720 aspect = 1,777778
previewSize support size: width = 1920 height = 1080 aspect = 1,777778
videoSizes support size: width = 176 height = 144 aspect = 1,222222
videoSizes support size: width = 320 height = 240 aspect = 1,333333
videoSizes support size: width = 352 height = 288 aspect = 1,222222
videoSizes support size: width = 640 height = 480 aspect = 1,333333
videoSizes support size: width = 720 height = 576 aspect = 1,250000
videoSizes support size: width = 1280 height = 720 aspect = 1,777778
Set _recorder.setVideoSize(640, 480) after _recorder.setOutputFormat and have problem. Video start writes (I see file 3 kb) and application freezed. I try different size. But can worked only with two: 176x144 and 352x288.
On freeze I see long stack: http://bit.ly/Oa5O0D
Please, help me, how know solution.