Video turn off to save bandwidth with JVB COLIBRI REST

Jitsi team,

I made some changes in Jicofo and JVB to use COLIBRI HTTP REST API between Jicofo and JVB. For two parties conference (P2P is disabled), the video showed up. But minutes later, the video was turned off on each party. The following is copied from JVB log,

179 JVB 2022-03-29 15:55:47.842 WARNING: [81] [confId=61211409fd1bd6a6 epId=e755fca6 gid=-1 stats_id=Buck-HHf] RembHandler.onRembPacket#54: Ignoring unexpected REMB, when using TCC (for 61.62 kbps bps). Will suppress future logs for this endpoint.
180 JVB 2022-03-29 15:55:50.226 WARNING: [82] [confId=61211409fd1bd6a6 epId=6cf0afef gid=-1 stats_id=Lucious-kPN] RembHandler.onRembPacket#54: Ignoring unexpected REMB, when using TCC (for 194.41 kbps bps). Will suppress future logs for this endpoint.
181 JVB 2022-03-29 15:55:51.161 SEVERE: [78] [confId=61211409fd1bd6a6 epId=6cf0afef gid=-1 stats_id=Lucious-kPN] Endpoint.acceptSctpConnection$lambda-24#636 : Timed out waiting for SCTP connection from remote side
182 JVB 2022-03-29 15:55:51.685 INFO: [24] HealthChecker.run#171: Performed a successful health check in PT0.000015S. Sticky failure: false
183 Got sctp association state update: 1
184 sctp is now up. was ready? false
185 JVB 2022-03-29 15:55:57.688 INFO: [81] [confId=61211409fd1bd6a6 epId=6cf0afef gid=-1 stats_id=Lucious-kPN] BandwidthAllocator.allocate#379: Endpoints were suspended due to insufficient bandwidth (bwe=-1 bps): e755fca6
186 JVB 2022-03-29 15:55:57.839 INFO: [80] [confId=61211409fd1bd6a6 epId=e755fca6 gid=-1 stats_id=Buck-HHf] BandwidthAllocator.allocate#379: Endpoints were suspended due to insufficient bandwidth (bwe=-1 bps): 6cf0afef

Basically I changed the ColibriConferenceImpl.java in Jicofo as below.

  1. Copy JSONSerializer/JSONDeserializer from JVB to Jicofo

  2. Create a conference with HTTP REST API when allocating channel for first participant

  3. Translates the ColibriConferenceIQ to JSON, and sends over HTTP REST API to JVB

  4. Translates the JSON response from JVB to ColibriConferenceIQ

  5. Jicofo/JVB is based on jtisi-meet_7001 (the latest from quick install package)

  6. Jicofo/JVB, browser clients all run on same local network

  7. There is a small change in JSONSerializer/Deserializer to make call work. The code change is listed below.

  1. In the webrtc-internal, and jicofo log and JVB log, I do not see REMB is enabled in SDP offer/answer. Why JVB complains REMB is received?

Many thanks,

/Kaiduan

You can try it on www.encrify.com

More logs from JVB

51602 JVB 2022-04-04 15:22:12.862 WARNING: [82] [confId=2afcf94b44e4ceb4 epId=3e0971db gid=-1 stats_id=Rose-BHB] TransportCcEngine.tccReceived#171: TCC packet contained received sequence numbers: 3758. Couldn’t find packet detail for the seq nums: 3758. Sent packet details map was empty. Latest RTT is 37.240691 ms.
51603 JVB 2022-04-04 15:22:13.915 WARNING: [82] [confId=2afcf94b44e4ceb4 epId=3e0971db gid=-1 stats_id=Rose-BHB] TransportCcEngine.tccReceived#171: TCC packet contained received sequence numbers: 3828. Couldn’t find packet detail for the seq nums: 3828. Sent packet details map was empty. Latest RTT is 41.501742 ms.
51604 JVB 2022-04-04 15:22:14.572 WARNING: [82] [confId=2afcf94b44e4ceb4 epId=3e0971db gid=-1 stats_id=Rose-BHB] TransportCcEngine.tccReceived#171: TCC packet contained received sequence numbers: 3857. Couldn’t find packet detail for the seq nums: 3857. Sent packet details map was empty. Latest RTT is 35.418399 ms.
51605 JVB 2022-04-04 15:22:15.965 WARNING: [92] [confId=2afcf94b44e4ceb4 epId=3e0971db gid=-1 stats_id=Rose-BHB] TransportCcEngine.tccReceived#171: TCC packet contained received sequence numbers: 3983. Couldn’t find packet detail for the seq nums: 3983. Sent packet details map was empty. Latest RTT is 42.203914 ms.

As we mentioned on the community call, we think the issue might be related to the serialization of RTP header extensions being missing from the JSON serializer. Can you check this PR: Serialize RTP header extensions in colibri1 JSON serializer. by JonathanLennox · Pull Request #1852 · jitsi/jitsi-videobridge · GitHub and see if it fixes the issue?

Thanks @Jonathan_Lennox , I will try the above change and see how it goes.

Thank you very much @Jonathan_Lennox , the fix works!

There are two small errors in the JSONSerializer/JSONDeserializer.

  1. In JSONDeserializer, the id of RTPHeaderExt is Long while it is String in JSONSerializer.

Please see the change in my branch below.

  1. In JSONDeserializer, we need to change CandidatePacketExtension to IceCandidatePacketExtension.

The change is listed below,

Thank you again.

/Kaiduan

That’s great to hear!

If you have a CLA, can you submit these changes as PRs against the jitsi-videobridge project?

Where is the CLA? I am very happy to submit the change!

For individuals: ICLA
For corporations: CCLA

Just signed the individual CLA, what is the next?

I believe that’s it. The PRs will be reviewed and if there are no conflicts, they’ll be merged.
Thanks for contributing!