强制Android中的相机提供30 FPS [英] Forcing the camera in Android to deliver 30 FPS
问题描述
我正在尝试将相机用于需要30 FPS左右的高恒定帧频的视频处理.
I'm trying to use the camera for video processing that needs a high constant frame rate around 30 FPS.
我正在使用Camera类和setPreviewCallbackWithBuffer接收视频帧.我注意到大多数相机不支持30000-30000的FPS范围.但是,在录制影片时,我认为这些设备上的相机仍可提供约30的帧速率.我目前的方法?
I'm using the Camera class and setPreviewCallbackWithBuffer to receive the video frames. I have noticed that most camera does not support a FPS range of 30000 - 30000. However, when recording movies I assume the camera on those devices still delivers a frame rate around 30. Is there some other way to achieve a higher frame rates than with my current method?
推荐答案
请注意,带有廉价摄像头的非顶级设备(尤其是前置摄像头)不可靠地支持您要求的fps.如果您请求30,则设备可以答复ok(将开始捕获,没有崩溃等),但实际上,它会根据光照条件以每秒fps的速度发送帧... [4-30](较少的光需要更长的曝光时间),也可能是其他内容.这种相机的示例是银河S3 mini上的前置相机
Note that non-top devices with cheap cameras, especially front ones, don't support reliably fps you've requested. If you request 30, device can reply ok (will start capture, no crash, etc) but in real it will deliver frames with fps in range say... [4-30] depending on lighting conditions (less light needs longer exposition time) and may be something else too. Example of such camera is front camera on galaxy S3 mini
这篇关于强制Android中的相机提供30 FPS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!