2011年11月23日水曜日

add more MediaRecorder API 2

I try setOutputFormat and setVideoEncoder.

_recorder.setOutputFormat(MediaRecorder.OutputFormat.THREE_GPP);
_recorder.setOutputFormat(MediaRecorder.OutputFormat.MPEG_4);
but RAW_AMR is audio only.
_recorder.setVideoEncoder(MediaRecorder.VideoEncoder.MPEG_4_SP);
_recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H263);
_recorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);

try setVideoEncodingBitRate()
_recorder.setVideoEncodingBitRate(10000000);

try setVideoFrameRate()
_recorder.setVideoFrameRate(5);

setVideoSize
_recorder.setVideoSize(100, 100);
If set odd size, app comes exception.

source code here

0 件のコメント:

コメントを投稿