Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Video Streaming and Broadcasting using WebRTC

I am very new to Real Time Protocols and I had some questions about how WebRTC works and how I can implement it. I am trying to create a one to many livestream like facebook or periscope, where one user broadcasts and other users join and stream the video. I am using Swift from my client end.

My questions are:

  1. How do I broadcast a video using WebRTC
  2. Is there an SDK for WebRTC in Swift/iOS

I know the questions are very vague but a guidance to the right direction would be great because I am not sure where to start

like image 696
Ryan Murphy Avatar asked Aug 26 '17 20:08

Ryan Murphy


People also ask

Is WebRTC good for streaming?

WebRTC is an open-source protocol that allows for the transmission of audio, video data (in both directions), and text between browsers. It is often praised for its low latency video streaming and ability to work in peer-to-peer networks, making it a popular choice for live-streaming applications.

Does Netflix use WebRTC?

Netflix primarily uses DASH (Dynamic Adaptive Streaming over HTTP), but also has some other fallback encoding profiles (depending on platform). As far as I can tell, WebRTC is not used by Netflix.

Is WebRTC an RTMP?

WebRTC is a bit different from RTMP and HLS since it is a project rather than a protocol. Web Real-Time Communication (WebRTC) is a streaming project that was created to support web conferencing and VoIP. It was purchased by Google and further developed to make peer-to-peer streaming with real-time latency possible.

What is WebRTC video?

WebRTC (Web Real-Time Communication) is a technology that enables Web applications and sites to capture and optionally stream audio and/or video media, as well as to exchange arbitrary data between browsers without requiring an intermediary.


2 Answers

You will need to use backend servers for that.

If you plan on broadcasting to multiple users directly from your mobile app then stop...

You need to connect your mobile app to a backend media server which then can be used to broadcast the video to a larger audience.

There are several commercial and open source alternatives that enable you to do that. I'd check Red5Pro, Wowza, SwitchRTC, Jitsi, Janus and Kurento for this task.

For the client side, look at react-native-webrtc

You can find more tools for WebRTC developers here.

like image 136
Tsahi Levent-Levi Avatar answered Oct 20 '22 00:10

Tsahi Levent-Levi


Regarding your question (2), there's also a SDK for iOS here and a neat get-started-page here (although 2.5ys old, but I haven't found anything better so far yet)

like image 20
ggs Avatar answered Oct 20 '22 00:10

ggs