camera-samples icon indicating copy to clipboard operation
camera-samples copied to clipboard

Using video and image capture use-cases together causing front camera preview lag on HUAWEI P40 PRO

Open ali0094 opened this issue 3 years ago • 4 comments

CameraX video capture use case preview is causing lag when switched to the front-facing camera on HUAWEI P40 PRO with Android OS 12.0 Issue has been observed in official CameraXVideo sample and in the latest release as well.

ali0094 avatar Mar 22 '22 08:03 ali0094

Thank you for filing the issue. Would you please provide a bit more information?

  • What Quality setting are you using for the Recorder? Does the lag occur with different Quality?
  • Do you observe the lag before, during or after starting a recording?
  • Does the recorded video also appear laggy when it is played back?

I have created an issue on the issue tracker to follow this bug: https://issuetracker.google.com/226136997 Feel free to respond here or on that bug.

temcguir avatar Mar 22 '22 16:03 temcguir

Hi @temcguir, I have tried following solutions so far

  1. Setting quality highest (UHD) and lowest (SD) , issue still persists.
  2. Lag is coming before and after recording both and back camera is working fine and as soon as I am switching to front camera, it is laging.
  3. Yes video is also laggy

Here is my implementation :

QualitySelector.fromOrderedList( ArrayList(filteredQualities), FallbackStrategy.lowerQualityOrHigherThan(Quality.SD) )

val camera = cameraProvider.bindToLifecycle( this, cameraSelector, preview, imageCapture, videoCapture )

ali0094 avatar Mar 23 '22 06:03 ali0094

Thanks for the follow-up. I'm trying to get one of these devices and will try to reproduce once I can.

temcguir avatar Mar 24 '22 21:03 temcguir

Anyone know what www. file magic.com is I keep seeing it in my chrome history

On Wed, Mar 23, 2022, 1:17 AM Muhammad Ali @.***> wrote:

Hi @temcguir https://github.com/temcguir, I have tried following solutions so far

  1. Setting quality highest (UHD) and lowest (SD) , issue still persists.
  2. Lag is coming before and after recording both and back camera is working fine and as soon as I am switching to front camera, it is laging.
  3. Yes video is also laggy

Here is my implementation :

QualitySelector.fromOrderedList( ArrayList(filteredQualities), FallbackStrategy.lowerQualityOrHigherThan(Quality.SD) )

val camera = cameraProvider.bindToLifecycle( this, cameraSelector, preview, imageCapture, videoCapture )

— Reply to this email directly, view it on GitHub https://github.com/android/camera-samples/issues/476#issuecomment-1075960300, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOIM457KCL2TJUDTSZKPHTDVBKZODANCNFSM5RKDGN3Q . You are receiving this because you are subscribed to this thread.Message ID: @.***>

tri-cloud avatar Mar 25 '22 15:03 tri-cloud