2012-07-22 3 views
0

나는 안드로이드 4.0과 함께 타블렛 에이서 a500을 가지고 있습니다.setVideoSize에서 mediarecorder로 앱 고정

_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(); 

을하지만 비디오 녹화의 변화 크기를 원하는 :

나는 (: 176x144 대상 크기)에서 비디오를 녹화 할 수 있습니다.

다음 크기 지원 있나요 : _recorder.setOutputFormat 후

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 

설정 _recorder.setVideoSize (640, 480)와 문제가 있습니다. 비디오 시작 쓰기 (파일 3kb 참조) 및 응용 프로그램이 고정되었습니다. 나는 다른 크기를 시도한다. 그러나 2 : 176x144 및 352x288만으로 작업 할 수 있습니다. 솔루션 노하우, http://bit.ly/Oa5O0D

이, 제발 도와주세요 : 동결에

나는 긴 스택을 참조하십시오.

답변

3

해결책을 찾았습니다 : 문제는 비디오 인코더 VideoEncoder.Default를 사용했기 때문입니다. 에이서 기본값은 h263입니다. MPEG_4_SP 또는 H264를 변경하면 모든 해상도에서 안정적으로 작동합니다. 3.x 미만의 API를 사용하는 기기에서 확인해야합니다.