Android Camera2 API Cropping Video
I'm trying to record a video using Android Camera2 API. I'm trying to crop video as a square by setting the SCALER_CROP_REGION in the request builder. I'm using the following code but it doesn't seem to work mCameraDevice.createCaptureSession(surfaces, new CameraCaptureSession.StateCallback() { @Override public void onConfigured( CameraCaptureSession cameraCaptureSession) { mCaptureSession = cameraCaptureSession; try { mIsRecording = true; /////****** this where i'm setting the coping mZoom = getZoomRect(); mPreviewRequestBuilder.set(CaptureRequest.SCALER_CROP_REGION, mZoom); /////////********