What is WebRTC? Introducing Kurento “a WebRTC communication server.

Tram Ho

About WebRTC.

1: A brief history of WebRTC

The idea of ​​developing WebRTC was launched by the team of engineers responsible for Google Hangouts since 2009. At that time, to transmit videos and images on the web, people often had to use Flash. The Hangouts team doesn’t want to use this technology, and they start making their own standards. By 2010, Google acquired two companies, On2 and Global IP Solutions (GIPS), to get real-time data transfer technology as the foundation for WebRTC later.

In May 2011, Google launched an open source project for real-time communication between browsers, and from this moment the project was named WebRTC. In parallel, the World Wide Web Association (W3C) and the International Association of Engineers (IETF) are also developing a number of protocols to use for real-time connection, so they shake hands to continue to complete Good to then decide to combine into WebRTC.

By October 27, 2011, the W3C launched the first draft of WebRTC. In November 2011, Chrome 23 launched, becoming the first browser to integrate WebRTC right from the inside. And as of the time I wrote this article, WebRTC is still continuing to be developed and not yet completed officially.

2: What is WebRTC?

WebRTC stands for Web Real-Time Communication phrase. As a web API developed by the World Wide Web Consortium (W3C), the ability to support browsers to communicate with each other via VideoCall, VoiceCall or Peer-to-Peer (P2P) data transfer without a browser Install additional plugins or support software from outside.

3: Main parts of WebRTC and WebRTC API functions.

The main parts of WebRTC include:

  • getUserMedia, allowing the web browser to access the camera and / or microphone to retrieve audio image data for transmission.
  • RTCPeerConnection is used to install videocall / voicecall for transmission.
  • RTCDataChannel allows peer-to-peer data sharing browser.

WebRTC API includes functionality:

  • getStats allows web applications to get a set of statistics about WebRTC sessions.

4: What is WebRTC used for?

WebRTC can be used for video and audio transmission to send real-time data between two or more devices without having to go through an intermediate server.

Automatically deploy Laravel project to server with Laravel Envoy Github Webhooks – part 1
Brief introduction about Design Patterns in Web development

Introducing Kurento.

1: What is Kurento?

Kurento is a WebRTC communications server and a customer API suite that simplifies the development of advanced video applications for web and smartphone platforms. Its features include group communication, transcoding, recording, mixing, broadcast and audiovisual routing. Kurento provides a multimedia framework that eases the task of building multimedia applications with the following features and characteristics:

  • Dynamic WebRTC Media pipelines : Kurento allows customized media pipelines to be connected to WebRTC peers such as web browsers and mobile applications. These media pipelines are based on associative elements such as players, recorders, mixers, etc. that can be mixed and combined, activated or deactivated at any time.
  • Client / Server Architecture : Applications developed with Kurento follow client / server architecture. Kurento Media Server (KMS) is the server and provides WebSocket interface to implement the Kurento protocol, allowing client applications to determine pipelines topology.
  • Java and JavaScript Client Applications : A typical use case of a KMS deployment consists of an architecture browser, where the user browser interacts with the KMS server with the intermediate client application. There are some official Kurento libraries that support the use of Java and JavaScript for client applications. Clients for other languages ​​can easily follow the WebSocket protocol.
  • Third party Modules : Kurento Media Server has an extended architecture based on plugins, allowing third parties to implement modules that can be added to their communication pipeline. This allows media integration to handle algorithms for any WebRTC application, such as Computer Vision integration, Virtual Reality Technology, Video, and voice analysis. All it takes is to create a new Kurento element and use it in any existing media pipelines.

2: What is WebRTC media servers?

WebRTC is a set of protocols, mechanisms and APIs that provide browsers and mobile applications with Real-Time Communications (RTC) via peer-to-peer connection . It has been conceived as a technology that allows browsers to communicate directly without intermediaries of any kind of infrastructure. However, this model is only enough to create basic web applications; features such as group communication, media streaming, broadcast media, or media transcoding are difficult to implement. For this reason, many applications require an intermediate media server.

Conceptually, WebRTC media servers are just a multimedia middleware, where media traffic passes through when moving from source to destination.

Media servers have the ability to handle media streams and provide different results, such as:

  • Group Communications: Distributes among a number of recipients of the media stream that a peer has created, ie acts as a multi-conference unit (DAY MCU).
  • Mixing: Convert some incoming streams into a single synthesis stream.
  • Transcoding: Quickly adapt codecs and formats between incompatible clients.
  • Recording: Store a continuous way of communication between colleagues.

3: What is Kurento media server?

The main component of Kurento is Kurento media server (KMS), responsible for transmission, media processing, recording and playback. KMS is built on the excellent GStreamer multimedia library and provides the following features and features:

  • Networked protocols, including HTTP, RTP and WebRTC.
  • Group communication (MCU and SFU functions) supports both media mixing and routing / sending media.
  • General support for filters implementing Computer Vision and Virtual Reality technologies.

  • Media memory supports recording operations for WebM and MP4 and plays in all formats supported by GStreamer.
  • Automatically transcoding media between any GStreamer supported codec, including VP8, H.264, H.263, AMR, OPUS, Speex, G.711, etc.

Example of kurento with livestream sample web application.

You must first install Kurento Media Server (KMS).

  1. Make sure GnuPG is installed.

  1. Determine which version of Ubuntu is installed on your system.

  1. Add Kurento repository to your system configuration.

Run these two commands in the same terminal you used in the previous step:

  1. Install KMS.

Use the following command to start, stop KMS.

  1. Check your settings.

You follow these steps:

Now you can open the browser and enter the path https: // localhost: 8443 / , the result will be as follows.

Click the “Presenter” button to start the livestream, click the “Viewer” button to view the livestream.

Above are some of my knowledge about WebRTC in general as well as Kurento in particular, hoping that it can help you in understanding WebRTC.

ECMAScript – ES6 What is? Overview about ES6
What is Web framework? Top 5 Best Web Framework 【Java / Ruby / PHP / JS / CSS】
Share the news now

Source : viblo