Real-time Audio video Streaming app like BigoLive

105 views Asked by At

I'm currently in the process of building a live streaming app similar to Bigo Live, FancyLive. I'm trying to decide between using Node.js/Express.js and Laravel for the backend or any other technology except laravel or node js . My frontend side is React Native framework. My primary concerns are performance, scalability, ease of use, and third-party library integration.

I expect to receive insights and recommendations from the community regarding the optimal technology stack for building a live streaming app with smooth, fast, and real-time data communication capabilities. Any personal experiences, case studies, or best practices in implementing similar features would be highly valuable.If you have question or I miss something to add please let me know.

1

There are 1 answers

0
sudayn On

The question seems vague but I will try my best to answer from scratch.

If you are going to build a live streaming app, you must consider first the media servers. Media server is the key piece you need to consider. I assume you are not building it from scratch, so you must either use open source or 3rd party platform (Wowza, Antmedia server, Kurento, Red5 Server and so on). You can also find media servers on github (like https://github.com/bluenviron/mediamtx, https://github.com/ireader/media-server).

The basic steps for live streaming are:

  • Setup Media Server
  • Choose which protocol (RTMP, RTSP, SRT, WebRTC, HLS)
  • Ingestion (client side)
  • Playback (client side)

Basic Flow

App -> (RTMP | SRT | RTSP | Other) -> Media Server -> (HLS | SRT | RTMP | RTSP | Other) -> App

Media Server

I have already explained about the media server above. You can connect with the media server with the url and stream name.

for example:

rtmp://<your ip>:1935/<streamname>

or

srt://IP:port?option1=value1&option2=value2

Client Side (App)

On mobile side you have to take care of publishing (ingestion) and playback (streaming) the video.For publishing to the media server, you could use choose multiple protocols like in above flow. Some libraries for react native are https://github.com/ezranbayantemur/react-native-rtmp-publisher or https://github.com/apivideo/api.video-reactnative-live-stream and for streaming you can use react-native-video or VLC Player https://github.com/razorRun/react-native-vlc-media-player.

The choice of library depends on what type of protocol you are going to use.

Backend

Here you can add the logic for providing the mediaserver url to the client side, Authentication and other Apis endpoints. I am not going to tell you which backend technology to use between Node.js/Express.js and Laravel because both can handle it and its all about your preference.

Final thoughts

I suggest you to use cloud service provider to deploy your media server so that it will be easy for auto-scaling and load balancing purposes.