android-Camera2Video icon indicating copy to clipboard operation
android-Camera2Video copied to clipboard

Turn off recording, get high framerate preview data?

Open twerdster opened this issue 10 years ago • 5 comments

Is it possible to turn off the recording and simply receive the camera preview data at 60fps or 120fps? This would enable real-time processing of the camera stream.

twerdster avatar Apr 19 '16 12:04 twerdster

Yes, you can test by with this example by not calling mMediaRecorder.start() in the fragment. You'll get 30 fps with this example, so you'll need to enable high speed previews on a device that supports it.

cybaker avatar May 24 '16 18:05 cybaker

We tried to do that using a S6 but nothing shows on the screen (although we do see onCaptureCompleted being called at 120 fps). http://pastebin.com/LVdYkWFR Is there something obviously wrong with what we changed? And more importantly how do we get the pixel data out of either the TotalCaptureResult or the SurfaceTexture? I tried an ImageReader but apparently the ImageReader surface is not a supported surface for the highspeed capture setting.

twerdster avatar May 25 '16 06:05 twerdster

@twerdster Have you reached any conclusions? Can you reach 60 frames in the preview?

MRYangY avatar Aug 14 '18 08:08 MRYangY

when i use the method createConstrainedHighSpeedCaptureSession occur error below: Session 1: Failed to create capture session; configuration failed 08-14 15:56:23.058 22882-22882/com.example.android.camera2video W/System.err: android.hardware.camera2.CameraAccessException: CAMERA_ERROR (3): endConfigure:442: Camera 0: Error configuring streams: Broken pipe (-32)

MRYangY avatar Aug 14 '18 08:08 MRYangY

This sample has been migrated to a new location where we can accept Pull Requests (check README for more information).

As recommended by GitHub, we are closing all issues and pull requests now that this older repo will be archived.

If you still see this issue in the updated repo, please reopen the issue/PR there. Thank you!

codingjeremy avatar Sep 19 '19 22:09 codingjeremy