Re:Android 14 adds support for using your smartphone as a we...
by imjonse on Friday September 22, 2023 @07:45AM
(#37610728)
Do you know if there are any devices where the high FPS mode can be used not only for capture but also for the image analysis use case?
Re:Android 14 adds support for using your smartphone as a we...
by chenxiaolong on Friday September 22, 2023 @11:04AM
(#37613000)
I don't think this is possible, at least not directly. My understanding is that there's a special optimized path for CameraConstrainedHighSpeedCaptureSession recording to MediaCodec surfaces backed by a hardware encoder. If you capture to a different type of surface, the frame rate will likely drop to 60 or lower (assuming it's even allowed--I have not tested).
I'm not too familiar with image analysis, but if it's acceptable to work on lossy frames and to take a small hit to latency, you could record to a MediaCodec hardware encoder and then immediately send the output to another MediaCodec instance to decode it.
For folks willing to build from source, I have an additional commit on top of the PR (linked in the comments) that enables support for Android's constrained high speed capture mode, allowing 120fps/240fps camera streaming. Not the most useful for meetings, but enables things like capturing high frame rate mixed reality VR footage. As far as I'm aware, there's no other Android webcam app, proprietary or open source, that can do anything above 60fps.