In previous posts, we introduced WebRTC technology and basic concepts. As we mentioned in previous articles, WebRTC is used for peer-to-peer communication in browsers. However, it is now widely used in multilateral practices with one-to-many or many-to-many participants. Also, to use WebRTC in such a project, you most likely need WebRTC servers.
Whatever you are developing with WebRTC, you should know what a WebRTC server is and what it is used for. This makes your job very easy.
In this detailed post, we will introduce WebRTC servers and new concepts such as Multipoint Conferencing Unit (MCU), Selective Forwarding Unit (SFU), transcoding, and simulcasting, and we’ll explain how to use a free WebRTC server.
Let’s start with the definition of WebRTC and continue with the question of what is WebRTC server.
What is WebRTC?
WebRTC stands for web real-time communications. WebRTC is a very exciting, powerful, and highly disruptive cutting-edge technology and an open-source streaming protocol.
WebRTC is HTML5 compatible and you can use it to add real-time media communications directly between browsers and devices. And you can do that without the need for any prerequisite of plugins to be installed in the browser. Previously, external plugins were required in order to achieve similar functionality as is offered by WebRTC. And Webrtc is progressively becoming supported by all major modern browser vendors including Safari, Google Chrome, Firefox, Opera, and others. Thanks to WebRTC, we can experience sub-second/real-time latency in video streaming. Let’s find out what is WebRTC streaming server.
What is WebRTC Server?
A server that provides the functionality required for the proper connection of WebRTC sessions in the cloud or self-hosting in order to make your WebRTC projects work is called a “WebRTC server”.
Types of WebRTC Server?
There are 4 types of WebRTC servers:
- WebRTC application servers
- WebRTC signaling servers
- NAT traversal servers for WebRTC
- WebRTC media servers
WebRTC application servers
Webrtc application servers are basically, application and website hosting servers. Yes, that’s all.
WebRTC signaling servers
WebRTC signaling server is a server that manages the connections between devices. It is not concerned with the media traffic itself, its focus is on signaling. This includes enabling one user to find another in the network, negotiating the connection itself, resetting the connection if needed, and closing it down.
NAT traversal servers for WebRTC
Network address translation traversal is a computer networking technique of establishing and maintaining Internet protocol connections across gateways that implement network address translation (NAT).
NAT traversal techniques are required for many network applications, such as peer-to-peer file sharing and Voice over IP.
WebRTC media servers
A WebRTC media server is a type of “multimedia middleware” (located in the middle of the communicating peers) through which media traffic passes as it passes from source to destination. Media servers can offer different types, including processing media streams and group communications (distributing media streams created by a peer between several receivers i.e. Multi-Conference Unit, acting as an MCU), mixing (converting several incoming streams to a single composite stream), transcoding (adapting codecs and formats between incompatible clients), recording (permanent storage of media exchanged between peers), etc.
Many popular WebRTC services are hosted today on AWS, Google Cloud, Microsoft Azure, and Digital Ocean servers. You can embed your WebRTC media into any WordPress, PHP, or another website.
Now, we know enough about the WebRTC server. It is time to dive into WebRTC Multiparty Topologies.
WebRTC Multiparty Topologies
Mesh is the simplest topology for a multiparty application. In this topology, every participant sends and receives media from all other participants. We said it is the simplest because it is the most straightforward method. Moreover, there are no tricky works and a central unit such as a WebRTC server.
- It requires only basic WebRTC implementation.
- Since each participant connects to the other peer-to-peer, no need for a central server.
- Only a restricted number of participants (nearly 4-6) can connect with each other.
- Since each participant sends media to each other it requires N-1 uplinks and N-1 downlinks.
Mixing Topology and MCU
Mixing is another topology where each participant sends its media to a central server and receives media from the central server. This media may contain some or all other participant’s media. This central server is called MCU.
- Client-side requires only basic WebRTC implementation.
- Each participant has only one uplink and one downlink.
- Since the MCU server makes decoding and encoding each participant’s media, it requires high processing power.
Routing Topology and SFU
Routing is a multiparty topology where each participant sends its media to a central server and receives all other’s media from the central server. This central server is called SFU.
- SFU requires less processing power than MCU.
- Each participant has one uplink and four downlinks.
- SFU requires more complex design and implementation on the server-side.
You can check here to get more information.
Transcoding is the process of decoding compressed media, changing something on it, and then re-encoding it. Change is the keyword of this process. What can be changed in the media?
First, you can change the codec since some codecs are compatible with protocols or players.
Moreover, transrating is one change that is on the bit rate of media. For example, changing the media bitrate from 600kbps to 300kbps.
Another change is trans-sizing which is in the size of media. For example, changing frame size of a media from 1280×720 (720p) to 640×480 (480p) is trans-sizing.
Besides, there are lots of other changes or filtering processes available in the video processing area.
Adaptive bitrate streaming is the adjustments to video quality according to the network quality. In other words, if the network quality is low then the video bitrate is decreased by the server. This is necessary to provide uninterrupted streaming under low-quality network connections. Clearly, the different bitrates of the stream must be available to provide an adaptive bitrate technique. One way to have different bitrates of the stream is transrating. Namely, the server produces different streams with different bitrates from the original stream. However, transrating is expensive in terms of processing power.
One alternative to transrating to provide adaptive bitrate is simulcast. In this technique, the publisher sends multiple streams with different bitrates instead of one stream. The server selects the best stream for the clients by considering the network quality.
With the change and development of communication needs in the world, the curiosity and interest in WebRTC and therefore WebRTC servers are increasing. In order to meet this interest and need, Ant Media Server is becoming a more powerful WebRTC streaming engine and offers new promising features for WebRTC video streaming every day.
How to use a free WebRTC server
Using an open-source WebRTC server for free must sound great. Ant Media has started to offer a pay-as-you-go license to contribute to the streaming world with 100 hours of free usage every month. There are no stream or viewer limits. This a unique opportunity, especially for people with limited use of WebRTC streaming server needs.
Use Ant Media Server for free, one of the most used WebRTC servers
Ant Media’s well-known product, called Ant Media Server, is a video streaming platform and one of the most used open-source WebRTC streaming servers, providing highly scalable, Ultra-Low Latency (WebRTC) and Low Latency (CMAF & HLS) video streaming solutions supported with operational management utilities. Ant Media Server is a completely open-source WebRTC Server to support developers and the streaming ecosystem.
Try Ant Media Server for Free
Explore Ant Media Server now to provide viewers with a unique experience.
Try Ant Media Server for free with its full features including Flutter and other WebRTC SDKs.
In this blog post, we tried to give you the information that you will need about your WebRTC server and WebRTC Multiparty Topologies. We hope we could help you!
For your questions, you can reach us by using the mail address firstname.lastname@example.org.
You can download native Android, iOS, Flutter, React Native, and Unity WebRTC SDKs and integrate them into your applications for free!
Ant Media Server Github Wiki
Setting up an Ant Media Server Scaling Solution with CloudFormation