Kurento Tutorials


Warning

Kurento is a low-level platform to create WebRTC applications from scratch. You will be responsible of managing STUN/TURN servers, networking, scalability, etc. If you are new to WebRTC, we recommend using OpenVidu instead.

OpenVidu is an easier to use, higher-level, Open Source platform based on Kurento.

Tutorials

Table of Contents

This section contains tutorials showing how to use the Kurento framework to build different types of WebRTC and multimedia applications.

Note

These tutorials have been created with learning purposes. They don’t have comprehensive error handling, or any kind of sophisticated session management. As such, these tutorials should not be used in production environments; they only show example code for you to study, in order to achieve what you want with your own code.

Use at your own risk!

These tutorials come in three flavors:

  • Java: Showing applications where clients interact with Spring Boot-based applications, that host the logic orchestrating the communication among clients and control Kurento Media Server capabilities.

    To run the Java tutorials, you need to first install the Java JDK and Maven:

    sudo apt-get update && sudo apt-get install --no-install-recommends --yes \
        git \
        default-jdk \
        maven
    

    Java tutorials are written on top of Spring Boot, so they already include most features expected from a full-fledged service, such as a web server or logging support.

    Spring Boot is also able to create a “fully executable jar”, a standalone executable built out of the application package. This executable comes already with support for commands such as start, stop, or restart, so it can be used as a system service with either init.d (System V) and systemd. For more info, refer to the Spring Boot documentation and online resources such as this Stack Overflow answer.

  • Browser JavaScript: These show applications executing at the browser and communicating directly with the Kurento Media Server. In these tutorials all logic is directly hosted by the browser. Hence, no application server is necessary.

  • Node.js: In which clients interact with an application server made with Node.js technology. The application server holds the logic orchestrating the communication among the clients and controlling Kurento Media Server capabilities for them.

Note

These tutorials require HTTPS in order to use WebRTC. Following instructions will provide further information about how to enable application security.

Hello World

This is one of the simplest WebRTC applications you can create with Kurento. It implements a WebRTC loopback (a WebRTC media stream going from client to Kurento Media Server and back to the client)

WebRTC Magic Mirror

This web application consists of a WebRTC loopback video communication, adding a funny hat over detected faces. This is an example of a Computer Vision and Augmented Reality filter.

RTP Receiver

This web application showcases reception of an incoming RTP or SRTP stream, and playback via a WebRTC connection.

WebRTC One-To-Many broadcast

Video broadcasting for WebRTC. One peer transmits a video stream and N peers receive it.

WebRTC One-To-One video call

This web application is a videophone (call one to one) based on WebRTC.

WebRTC One-To-One video call with recording and filtering

This is an enhanced version of the the One-To-One application with video recording and Augmented Reality.

WebRTC Many-To-Many video call (Group Call)

This tutorial connects several participants to the same video conference. A group call will consist (in the media server side) in N*N WebRTC endpoints, where N is the number of clients connected to that conference.

Media Elements metadata

This tutorial detects and draws faces present in the webcam video. It connects filters: KmsDetectFaces and the KmsShowFaces.

WebRTC Media Player

This tutorial reads a file from disk and plays the video to WebRTC.

WebRTC outgoing Data Channels

This tutorial injects video into a QR filter and then sends the stream to WebRTC. QR detection events are delivered by means of WebRTC Data Channels, to be displayed in browser.

WebRTC incoming Data Channel

This tutorial shows how text messages sent from browser can be delivered by Data Channels, to be displayed together with loopback video.

WebRTC recording

This tutorial has two parts:

  1. A WebRTC loopback records the stream to disk.

  2. The stream is played back.

Users can choose which type of media to send and record: audio, video or both.

WebRTC repository

This is similar to the recording tutorial, but using the repository to store metadata.

WebRTC statistics

This tutorial implements a WebRTC loopback and shows how to collect WebRTC statistics.

Chroma Filter

This web application consists of a WebRTC video communication in mirror (loopback) with a chroma filter element.

Crowd Detector Filter

This web application consists of a WebRTC video communication in mirror (loopback) with a crowd detector filter. This filter detects people agglomeration in video streams.

Plate Detector Filter

This web application consists of a WebRTC video communication in mirror (loopback) with a plate detector filter element.

Pointer Detector Filter

This web application consists of a WebRTC video communication in mirror (loopback) with a pointer-tracking filter element.

   

© Copyright 2020, Kurento Revision 4309751a.

Built with Sphinx using a theme provided by Read the Docs.

Kurento has been supported under Project LERNIM (RTC-2016-4674-7), co-funded by the Ministry of Economy, Finance and Competitiveness of Spain, as well as by the European Regional Development Fund, whose main goal is to promote technological development, innovation and high-quality research.

 

copyright

https://doc-kurento.readthedocs.io/en/stable/user/tutorials.html

 

上一篇:历经10年发展,开源框架WebRTC现已成为官方Web标准


下一篇:开源框架WebRTC终极指南:3大 API 详解