I have added video calling functionality to my android app using sinch, I was wondering, what kind of technology-infrastructure is needed to do such a thing without using any 3rd party services? Assuming I have a server with a public IP which I can install any server software on, to provide signalling etc., whatever is required.

I have read up on webrtc, which sinch uses too. From what I vaguely understand, I need a signaling server, plus a TURN server, maybe plus a STUN server, plus client code which can talk to that servers. I guess these are the things provided by sinch out of the box.

Webrtc has a javascript API on supported browsers, with related objects and methods implementing the protocol. I guess I need java equivalent of that API, which wraps the protocol and is able to talk to servers I stated above.

If there are viable (easier) alternatives to webrtc for this job, or I will be happy to learn about them too. A better approach to the problem than mine is welcome too.

  • 1
    Easier in comparison to setting up TURN and STUN servers? Probably. Easier in comparison to 3rd party solution like sinch? Probably not. That said, if you want to get down in the weeds and build your own solution, then end-to-end UDP (perhaps TCP, if connection is fast) would be my suggestion. For android, see the documentation about capturing video and this SO question about capturing video to a buffer or socket stream. Such a thing would definitely take commitment, though, and I'm sure there are easier (maybe even better) libraries available. – Spencer D Feb 26 '17 at 17:44

Check https://quickblox.com, it is free if users are less than 20k. Moreover, WebRTC is based on TCP and UDP you can implement your own SIP server. Please visit the https://xmpp.org/about/technology-overview.html for more information.


Forget about TURN and STUN servers. This is simple and to be done in following steps in any language, we've done in C#.

  1. Capture screen and divide into tiles (say 4 by 4)
  2. Transmit only changed tiles into communication (UDP for speed) do not transmit old tiles as screen could've changed and this will spoil bandwidth
  3. Receive and place tiles on screen.

Peek inside our code for Windows at GitLab

  • Why not use a state-of-the-art video codec that does what you described, and more, for you? The problem is usually in establishing the connection and in compensation for transmission delays. – 9000 Mar 30 '17 at 16:46
  • Yes you can, referred method is quick dirty tried and tested method without any 3rd party dependency and it'll work on any systems where drivers may fail to work (as may not be compatible) – SACn Mar 31 '17 at 6:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.