Search code examples
androidopentoktokbox

Framerate is always 30 on tokbox/Android


I have an Android app which streams audio/video with Opentok with session in routed mode.

I'm trying to change framerate but it does not matter, it's always streaming at 30fps.

Any thoughts? thanks

otPublisher = new Publisher.Builder(mContext).
                        frameRate(Publisher.CameraCaptureFrameRate.FPS_1).
                        build();

Solution

  • The framerate is just a suggestion to the device. If the device does not support that capture framerate then it will not work. From the TokBox Documentation

    If the device does not support the specified frame rate, it will use the closest supported frame rate...

    https://tokbox.com/developer/sdks/android/reference/com/opentok/android/Publisher.Builder.html#frameRate-com.opentok.android.Publisher.CameraCaptureFrameRate-