Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Video recording and Frame processing simultaneously #106

Closed
bipinvaylu opened this issue Jan 10, 2019 · 5 comments
Closed

Video recording and Frame processing simultaneously #106

bipinvaylu opened this issue Jan 10, 2019 · 5 comments
Labels
enhancement New feature or request

Comments

@bipinvaylu
Copy link

bipinvaylu commented Jan 10, 2019

My use cases required to Preview, Record and Process the frames simultaneously, I have used this codebase, It seems promising but it's still, not supporting recording and frame processing at the same time. It would be nice if you can incorporate the same if you have some time.

@pvasa
Copy link
Owner

pvasa commented Jan 11, 2019

@bipinvaylu Technically it is possible but it might require some api level changes might even have to deprecate some current apis. Can you provide some more description about your use case like what kind of formats you use and what is the exact use case that you are trying to implement. Preview frames and video can be very different in terms of size and quality.

@bipinvaylu
Copy link
Author

Thanks @pvasa for a quick response, Yeah, Actually I am trying to achieve my use case since last few days. But unable to find any sustainable solution so far. Please find the proper use case details here: https://stackoverflow.com/questions/54091648/camera-2-api-to-preview-record-and-extract-the-preview-frame-to-firebase-face-d

Btw, If you can provide me some help/insight for the same. I can work out that way and if able achieve, I will push it here as well for others.

@pvasa pvasa added the enhancement New feature or request label Jan 27, 2019
@pvasa
Copy link
Owner

pvasa commented Jan 27, 2019

@bipinvaylu the way to achieve this would be to provide both mediaRecorder surface and imageReader surface to videoRequestBuilder and camera?.createCaptureSession(..). So you will need to update startVideoRecording().
You can take a shot at it and let me know if you need any help, meanwhile I am implementing (updating) the CameraView.cameraMode api to achieve exactly this functionality. With this update you will be able to enable multiple camera modes at the same time. For eg., SINGLE_CAPTURE and CONTINUOUS_FRAME or VIDEO_CAPTURE and CONTINUOUS_FRAME or even all 3 (possibly).

@pvasa
Copy link
Owner

pvasa commented Jan 29, 2019

@bipinvaylu Release v3.0.1-beta now supports this feature.

Video capturing and frame processing can be achieved simultaneously by using below methods

  • In xml
app:cameraMode="continuous_frame|video_capture"
  • Or in code
camera.cameraMode = Modes.CameraMode.CONTINUOUS_FRAME or Modes.CameraMode.VIDEO_CAPTURE

@pvasa pvasa closed this as completed Jan 29, 2019
@krghv85
Copy link

krghv85 commented Jul 10, 2022

Hi @pvasa

This feature still is not working, it giving exception(java.lang.ArithmeticException: divide by zero) 'Unable to start video recording'

Using - 3.5.5-alpha"

app:cameraMode="continuous_frame|video_capture"

I also log a issue for the same - #236

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants