how to set input resolution for Camera (Camera 2 API)

388 views
Skip to first unread message

Jinqiang Zeng

unread,
Jun 6, 2017, 5:05:52 PM6/6/17
to android-platform
Dear all,

I am working on a face tracking project. I want to make the camera running in the background in low resolution and low frame rate. What's the best way to do it?

Thanks
Jinqiang

jie liu

unread,
Jul 3, 2017, 10:49:44 PM7/3/17
to android-platform
MediaRecorder mediarecorder = new MediaRecorder();
mediarecorder.setVideoEncoder(MediaRecorder.VideoEncoder.H264);
mediarecorder.setVideoSize(176, 144);
mediarecorder.setVideoFrameRate(20);
mediarecorder.setPreviewDisplay(surfaceHolder.getSurface());

在 2017年6月7日星期三 UTC+8上午5:05:52,Jinqiang Zeng写道:
Reply all
Reply to author
Forward
0 new messages