Home » Android » android – Qt mobile video call streaming

android – Qt mobile video call streaming

Posted by: admin June 15, 2020 Leave a comment


I’m completely new to Qt mobile, I even don’t have a solid mobile dev experience, so sorry if I’m asking something obvious.

I need to develop a mobile app that should have the ability to receive a call like functionality (over internet, not GSM call). When answered, it should start streaming audio and video from our server. The call should be one way only, meaning, that stream goes from server to device, but never from device to server.

So my questions is:

  1. Is this possible in Qt? I chose Qt because I’ familiar with it and I want to support desktop, android and ios. maybe windows phone later.
  2. Is it possible to receive a call when the screen is shut off and my app is not running? I mean, this is a mobile device, the app won’t be running all the time, it should be started only when a call is made from server to device. How can I achieve that? I think Viber, Skype and other messaging apps do that.

Many thanks in advance 🙂

How to&Answers:

1 – Well, sure it can, although it might not be as easy and straightforward as you’d want. Qt Multimedia does provide the necessary classes, but you do have to check how supported they are on the platforms you need to target.

However, the classes Qt provides are either too high level to serve any purpose but their intended purpose, or too low level, so you must implement pretty much everything by hand. In this aspect, the benefit of Qt being capable of producing portable apps may not outweigh the ease of using certain platform specific libraries that offer video streaming out of the box. In other words, it might be easier to write separate Android and iOS apps using Android and iOS libraries than a single Qt app that will work on both.

But just in case you decide to go with Qt, as I mentioned for the time being you are left with one option – do most of the work yourself. This means you should record audio using QAudioRecorder and capture frames periodically from a QCamera in a buffer of given length, compress that data (and preferably encrypt it if security is a concern), send it to the client over a QTcpSocket connection, decompress (and decrypt) the data and play it back in sync. It is certainly doable, but as already mentioned, it will be much harder since Android and iOS libraries offer pretty much “out of the box” solutions. Alternatively, you might decide to use a third party solution that offers support for all the platforms you target.

2 – whether your screen is on or off – that will be a call to a platform specific API, so are requests to turn it on or to keep in on for a given duration. Whether your app is running on the device or not, that is easy – just try a TCP connection with the client on the device, if it succeeds then the client is running. If you want to receive calls while your app is not running, you will have to implement a platform specific service that runs all the time instead and starts your application when a call is received.


QT Mobility does not have a a framework for supporting VoIP as you can see from the reference :

You could create the VoIP framework of your app natively (which is going to require a good understanding of the various audio and video frameworks available) but another way to go
would be to use a VoIP SDK that supports both iOS and Android such as the Twilio mobile client


Qt mobile will help you in your application’s UI, however you will have to write some native code for each platform you are going to use. Note that Qt is extending fast, you might need not to get your hands dirty with platform specific native code in upcoming versions of Qt.

Yes, you can receive a VoIP call when your application is closed by creating a background service (but as I know so far Qt doesn’t do the job for you, you’ll need to do it natively), it is the way Skype and Viber work.


As per I know new Blackberry10 OS using qt for developing. There is one source code available about VoiP Calling in qt. I am still searching about video call.

Check below link, May be helpful

1) Blackberry Developer Blog

(2) PjSip Blog

(3)Download Source Code

I don’t know how to develop app in Android, ios, desktop using qt language.

But I am suggesting develop app in all native language instead qt.