How to build a live video streaming app for mobile and web

advices
How to build a live video streaming app for mobile and web

Live video streaming apps and services continue to gain traction in social media and as a collaboration tool. Live streaming is the most used and fastest growing method, offering individuals and companies a direct path to reaching and capturing followers in real time. As a consequence, there are a variety of live video streaming apps, from free social networks to advanced video production and collaboration platforms.

Live video streaming seems a simple enough idea, and has arguably been around in some form for a while already (think of Skype). So, specifically how did Facebook Live and Periscope differentiate themselves and break–out with so much fanfare? First of all, they are mobile apps. This means they are suited for both viewing and streaming, access is no longer tethered to one’s home or office computer, and can be done anywhere. Both apps are also closely aligned with existing social media platforms and they allow followers (and random viewers) to comment on the action directly, meaning real-time feedback and interaction.

Live video services aid both social media and businesses by streamlining communication and operations. Live video streaming apps can connect businesses across the world allowing them to easily organise video conferences, screen sharing, live presentations, etc. With the advancements in technology we now have access to more sophisticated and effective methods of communication. Technology has enabled us to seamlessly connect with people of our choice anytime anywhere in the world.

How to build a live video streaming app for mobile and web?

Self-hosted or 3rd party managed service?

When building a live video streaming app, the first question you should ask yourself is whether you would prefer a self-hosted or a 3rd party ready-made solution.

When deciding between the two, you should consider the following aspects:

  1. development price – a self-hosted solution will increase the development cost, as it will include extra DevOps and integration efforts compared to a 3rd party ready-made solution;
  2. hosting costs vs. the 3rd party’s price – a careful eye should be kept on the hosting price compared to the 3rd party’s pricing model;
  3. feature set – make sure the required feature set is available on both 3rd party and the self-hosted solution;
  4. ease of integration with the other features of the app – the solution should be easy to integrate in the app’s ecosystem, and can include authentication, social sharing, monetisation, user relations, etc.;
  5. scalability – the system needs to be scalable in order to sustain the growth.

Bellow you can find a list of 3rd party solutions for real-time video streaming:

Custom or open-source solution?

Based on the features needed and on the budget, a decision must be made regarding the use of a custom built or an open-source solution. A custom built solution will allow greater flexibility in terms of features, monitoring and tracking, while an open-source solution will have some constraints.

The PROs of using a custom built solution are:

  • more flexible feature set;
  • better tracking and more control over the system;
  • easier to integrate in the system’s ecosystem.

CONs of using a custom built solution are:

  • high development price;
  • need of continuous maintenance over time;
  • additional testing requirement.

PROs of using an open-source solution:

  • better development price compared to the custom developed solution;
  • requires less testing;
  • Good chance of finding 3rd party extension to increase the feature set.

CONs of using an open-source solution are:

  • rigid feature set;
  • prone to security issues as they are widely used and attackers might be familiar with their exploits;
  • harder to integrate in the ecosystem.

Here are a few open-source video streaming solutions:

Technology stack for developing a real-time video streaming app

Regarding the technology stack for developing a live video streaming app for mobile and web, we will approach both the custom developed and the open-sourced solution.

For the custom developed solution our recommendations are:

  • mobile apps: SWIFT for iOS and KOTLIN for Android;
  • web apps: AngularJS, Express.js.;
  • hosting: Amazon Web Services;
  • API server: nginx, Node.js, Loopback;
  • video transcoding: AWS Elastic Transcoder;
  • CDN: AWS CloudFront;
  • database: MySQL and DynamoDB;
  • real-time server: NodeJS, node-media-server, FFMPEG;
  • monitoring: AWS Kinesis, AWS CloudWatch, AWS Elasticsearch, Kibana, Google Firebase Analytics;
  • push notifications: Google Firebase Notifications;
  • messaging queues: AWS Simple Queue System.

For an open-source solution we would recommend Jitsi as the real-time video server. It supports up to 250 users in the same video call, screen sharing, full-featured chat and many other features. It is easy to deploy on AWS and has SDKs for iOS, Android and web apps. We recommend the following jitsi based technology stack for the live video server:

  • mobile apps: SWIFT for iOS and KOTLIN for Android;
  • web apps: AngularJS, Express.js.;
  • hosting: Amazon Web Services;
  • API server: nginx, Node.js, Loopback;
  • video transcoding: AWS Elastic Transcoder;
  • CDN: AWS CloudFront;
  • database: MySQL and DynamoDB;
  • real-time server: Jitsi;
  • monitoring: AWS Kinesis, AWS CloudWatch, AWS Elasticsearch, Kibana, Google Firebase Analytics;
  • push notifications: Google Firebase Notifications;
  • messaging queues: AWS Simple Queue System.

If you would like to test our Jitsi based real-time video streaming solution, please contact us and we will prepare a dedicated testing environment for you within 48 hours.