Possible to build android jitsi client that manually forces FPS selection on a device?

Is it possible to build an android jitsi client that manually selects a FPS range using Camera2Session? E.G. 1280x720@[7.0:100.0]FPS?

I have a jitsi instance (constraints set to 720 resolution)
Jitsi android client is selecting: 1280x720 (15FPS)

This selection causes the video feed slow 15FPS and the picture is flickering under the fluorescent lights.

Android logcat reports:
“org.webrtc.Logging: CameraCapturer: startCapture: 1280x720@30”
"org.webrtc.Logging: Camera2Session: Available preview sizes: [1920x1080, 1280x720, etc…
“org.webrtc.Logging: Camera2Session: Available fps ranges: [[15.0:15.0], [24.0:24.0], [30.0:30.0], [7.0:100.0]]”

"Using capture format: 1280x720[15.0:15.0]" (bad selection)

Would it be possible to manually program Jitsi to select 1280x720[7.0:100.0] (good selection)?
Would that make FPS variable between 7 and 100?

There is a function: “getClosestSupportedFramerateRange” that seems to be selecting the 15FPS instead of the variable 7-100FPS

This seems to be a bug in WebRTC or the Camera2 implementation of your device. We do pass 30 fps to it and I cannot reproduce this problem on the devices I have at hand :-/

Here is where we call the camera2 enumerators and things: https://github.com/react-native-webrtc/react-native-webrtc/blob/master/android/src/main/java/com/oney/WebRTCModule/VideoTrackAdapter.java as you can see we don’t really do much there other than passing values around to libWebRTC.

I think you are totally right, that could be a bug with camera2 or the WebRTC implementation on the device.

The software is selecting 1280x720@30FPS, but the CameraCapturer oddly chooses [15.0:15.0] even though the [30.0:30.0] selection is available.

Forgive me if I am ignorant -might it be possible to force the argument: “CameraCapturer: startCapture: 1280x720@100” to see if the CameraCapturer can produce “Using capture format: 1280x720[7.0:100.0]”?

or is this outside of Jitsi framework, and needing to modify system code on the device (need rooted device)?

Thank you for your time!

We maintain the React Native WebRTC plugin, so making changes is not out of the question: https://github.com/react-native-webrtc/react-native-webrtc/graphs/contributors

I am, however, quite busy these days. If you are able to test the changes out and validate if it fixes your issue that would be ideal, specially since you are able to reproduce the problem.

I will do my best to test out as soon as I can find more time (am doing this for job but not personal benefit).
I have not built the apk from source yet, but I assume that is my first step towards testing out this issue.

Let me read up on the documentation on how to build Jitsi apk from source and continue as soon as I can.
Thank you for letting me know it might be possible!

1 Like