How to get raw preview data from Camera object at least 15 frames per second in Android?

I’m affraid, you can not. Preview framerate setting is hint for camera appplication ( which runs in separate process) – and it is free to accept or silently ignore it. It is also not related with preview frame retrieval

When you request preview frame, you just say external application that you would like to have it. Buffer for it is allocated in camera application and then passed to your activity via mmaped memory segment – this takes time.

You may get desired performance on some devices, but not necessarily on one you are playing with.

If you need defined frame rate, you will have to capture video and then parse / decompress resulting binary stream.

Leave a Comment