twilio-video-app-android icon indicating copy to clipboard operation
twilio-video-app-android copied to clipboard

Using own camera to capture the frames

Open Laritaa opened this issue 4 years ago • 1 comments

It would be possible to use our own camera source from which we get the frames instead of using the camera source provided by Twilio. The use case I am asking about would be to be able to use our own camera with which to capture the frames in order to process them with a better quality than the one we get now. As we are doing now, we get the frames provided by Twilio through the camera capture of the SDK. To create the video track we have created a camera (CamaraPropia) that extends CameraCapturer and overrides the methods provided by that class.

cameraCapturer = new CamaraPropia(context, CameraCapturer.CameraSource.BACK_CAMERA, videoFrameListener); VideoConstraints videoConstraints = new VideoConstraints.Builder() .aspectRatio(AspectRatio.ASPECT_RATIO_16_9) .build(); localVideoTrack = LocalVideoTrack.create(context, true, cameraCapturer, videoConstraints); localVideoTrack.addRenderer(videoView);

All the posts I've seen refer to Twilio 6.x version, in my case we are using a 5.1.0 version.

Laritaa avatar Sep 14 '21 10:09 Laritaa

Hello, we have the same problem here. Right now, we're using Twilio's camera but we need to use the frames captured by Android native camera or even our own custom camera. Does any Twilio method accept the frames captured from Android native camera? Can we do this with version 5.x or is it mandatory to update to 6.x? Also, if we update to 6.x, could be receive the frames with a higher quality? Thank you

AliciaCamCas avatar Sep 20 '21 08:09 AliciaCamCas

@AliciaCamCas & @Laritaa Sorry about the late response. Yes, we do support creating a custom capturer. In our quickstart we have an example which you can use to help get started.

afalls-twilio avatar Apr 22 '24 15:04 afalls-twilio