Video recording flash not working

84 views
Skip to first unread message

Nitin Londhe

unread,
Aug 24, 2023, 4:48:00 AM8/24/23
to Android CameraX Discussion Group
Video recording flash is not working. But Camera photo capture flash is working.

Camera version 1.3.0-beta01

   val recorder = Recorder.Builder()
            .setQualitySelector(QualitySelector.from(Quality.HIGHEST,
                FallbackStrategy.higherQualityOrLowerThan(Quality.SD)))
            .build()
        videoCapture = VideoCapture.withOutput(recorder)

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


tonyt...@google.com

unread,
Aug 24, 2023, 5:00:33 AM8/24/23
to Android CameraX Discussion Group, nitin....@codeastu.com
Hi,
Thanks for the question. What do you mean by "video recording flash"? Do you want to turn on torch while recording? Or do you want to take picture with flash while a video recording is in-progress?

Nitin Londhe

unread,
Aug 24, 2023, 7:00:38 AM8/24/23
to tonyt...@google.com, Android CameraX Discussion Group
Thank you for your reply. I will use it.

INFORMATION: Please note that this email and message, including any attachments, is intended solely for the individual(s) or entity (ies) to whom it is addressed and may contain information that is private, confidential and privileged. In case you are not the intended recipient, you are requested to notify the sender by reply mail and delete this email, including any copies or attachments from your system. Any unauthorized dissemination, disclosure, copy and/or use of the contents of this communication, including the attachment, to anyone is strictly prohibited and punishable by law.


Opinions, conclusions and statements of intent expressed in this e-mail are of the sender and Codeastu Technologies Private Limited (Company) does not accept liability for the views expressed in this email unless confirmed by an authorized representative of the Company independently of this communication. Internet communications cannot be guaranteed to be timely, secure, error or virus-free. The sender does not accept liability for any errors or omissions.

Protect our environment - please print this only if you really have to!

Nitin Londhe

unread,
Aug 24, 2023, 7:17:18 AM8/24/23
to tonyt...@google.com, Android CameraX Discussion Group
Hi!,
I actually want to turn on the flash or keep it on auto mode while recording video. as well as I wanted to add shutter sound while taking pictures.

Could you please help me with that ASAP?

Thanks.
Nitin

tonyt...@google.com

unread,
Aug 24, 2023, 8:05:29 AM8/24/23
to Android CameraX Discussion Group, nitin....@codeastu.com, Android CameraX Discussion Group, tonyt...@google.com
To be clear, you want to apply the flash (torch) to a video recording right? To do that, you may use CameraControl.enableTorch to turn on torch before/after the recording is started.

As for shutter sound, unfortunately CameraX doesn't support playing a sound while taking pictures. You may play the sound in your application before calling ImageCapture.takePicture or after receiving ImageCapture.OnImageCapturedCallback depending on the intended user experience.

Reply all
Reply to author
Forward
0 new messages