Search code examples
video-streamingvideo-processingopentoktokbox

TokBox iOS Video conference app performance


I have been building a video conference app with TalkBox platform. My first phase was to check out the performance of the framework. My requirement was video conference call of 6 users.

I built up the app with the reference app Multi-Party-Call sample from TokBox. I have used the exact same classes and functions. I am facing quality and performance issues with the conference call. The app runs smooth with up to 3 users. As soon as users 4, 5, 6 subscribe, the video no longer runs smooth.

I suppose this has something to do with the video quality that is streamed. The app is tested on more than 100 MB/s thus connection speed shouldn't be problem.

The problem is fps, dimension that is streamed. I have tried changing the _capturePreset in the TBExampleVideoCapture class, but this ruins the subscribers stream. After that I thought the decryption of the stream written in class TBExampleVideoRender should be the one.

How can I select the dimensions of upload stream and the decryption of the stream without compromising on the quality?


Solution

  • Firstly, with 4,5,6 video streams rendering at the same time, the bottleneck becomes the hardware. I don't think iOS devices are capable of rendering 6 videos simultaneously without sacrificing video quality significantly.

    One suggestion is to subscribe to one subscriber video at a time and subscribe to all video streams. This way, you can hear everybody and see the person important to you. OpenTokRTC (on the app store) does that. To see OpenTokRTC code: https://github.com/opentok/OpenTokRTC-iOS

    If you would like to change the settings of resolution and frame rate, you might want to download the iOS SDK and look into the samples folder: https://tokbox.com/opentok/libraries/client/ios/

    Let's build OTPublisher example has the code for changing resolution/framerate. Look at: _capturePreset = AVCaptureSessionPreset352x288; and setActiveFrameRate in TBExampleVideoCapture.m