Talha Mir
Talha Mir

Reputation: 1258

Video call recording in Twilio Android SDK

I know Twilio doesn't support video call recording on server but I've been trying to figure out how to do it locally on the android end. I have studied the video-quickstart-android code in my try to figure out how i can extract the video stream from the LocalVideoTrack and VideoTrack classes of the Twilio android conversations API but couldn't find any such method from where i could extract the underlying Video Stream and record it locally on the android device.

Anyone have any idea how I can get video stream for recording the video locally on the android device from Twilio conversations api for android?

Upvotes: 2

Views: 924

Answers (1)

Iñaqui
Iñaqui

Reputation: 251

You would have to write a custom video renderer that takes each frame and converts them into your preferred media format.

As an example the VideoViewRenderer takes frames and passes them to the org.webrtc.SurfaceViewRenderer, rendering them to a View. In this case you would write another renderer, perhaps named VideoRecorderRenderer that implemented the VideoRenderer interface and did the work of taking each I420Frame and converting to a media type. You could then add the VideoRecorderRenderer to the VideoTrack. However, this alone may not be the solution you are looking for since this is only the video portion of the media, and does not provide the audio. The AudioTrack does not expose an interface to capture the audio output at the moment.

Upvotes: 2

Related Questions