Kurento Media Server – All you Need to know

ravi garg, mss, kurento, media server, kurento media server

What is Kurento?

Kurento is a media server based on WebRTC. It is an open-source project whose source code is released under “Apache License version 2.0” and is available on Git Hub. Kurento Media Server (KMS) is a multi-media server package that provides a set of client APIs that can be used to develop advanced mobile video applications for the WebRTC platform. It enables group communications, transcoding, recording, mixing, broadcasting, and routing audiovisual flows.

However, Kurento doesn’t use a few features of WebRTC, like Simulcast, end-to-end encryption, insertable streams, and support for more than one video and audio in the same WebRTC peer connection.

Built-in modules in Kurento

Kurento offers a toolbox of media as part of its API. This API controls the Kurento Media Server, allowing Kurento developers to use high-level languages to interact with it. The Kurento open-source project provides SDK implementations of the API for several platforms.

The built-in modules in Kurento are:

Media Elements and Media Pipelines

Kurento is based on two concepts – Media Elements and Media Pipelines. They are the building blocks for developers working on Kurento.

Media Element

It is referred to as a “black box” that is self-sufficient for the application developers, who don’t understand low-level details of the element. The Media Elements can receive (through media sources) and send media from other elements (through media sinks). Based on the functionality of the elements, they can be divided into four parts:

Input Endpoints – They can receive and transmit media into the pipeline. There are different types of input endpoints, like File input endpoints, which take media from a file, Network input endpoints, which take media from the network, and Capture endpoints, which capture the media stream directly from a camera and other kinds of hardware.
Filters – They analyze and transform media. They perform operations, like mixing, muxing, analyzing, and augmenting.
Hubs – Media Objects manage multi-media flows in pipelines. The Hub has several HubPorts for each connected Media Element. You can control the media, depending on the Hub type.
Output Endpoints – It takes a media stream out of the Media Pipeline. Several output endpoints specialize in files, networks, screens, etc.

Media Pipeline

It is a chain of Media Elements. Source elements generate an output stream, which is processed and delivered into one or more sink elements. The pipeline can operate a sequence of processes over a stream.

Endpoints

Endpoints in Kurento provide bidirectional WebRTC features, managing input and output within a media pipeline. The Endpoints are the connection points for media sourced and sinks, enabling the interaction between Kurento Media Server and external media, like web browsers, media files, or network streams.

Here are the primary types of endpoints in Kurento:

WebRTCEndpoint – It enables the users to send and receive media streams.

PlayerEndpoint – An Input Endpoint that fetches media/content from RTSP, HTTP, or local sources.

RecorderEndpoint – An output Endpoint that stores media streams into local or remote file system. It has Media Sink pads for audio and video.

RTPEndpoint – The input or output Endpoints provide bidirectional delivery capabilities with remote networked peers, through RTP protocol. It uses SDP for media negotiation.

HttpPostEndpoint – The Input Endpoint accepts media that uses HTTP POST requests, including the HTTP file upload function.

ravi garg, mss, buit-in, modules, kurento, media pipeline, media pipeline, endpoint, filters, hubs, example module

Filters

These MediaElements perform media processing, Computing Vision, Augmented Reality, etc. It enables media processing within media pipelines. The filters can modify, enhance, or analyze media streams as they pass through the pipeline. You can apply visual effects, and analyze content, like face detection, or barcode recognition, and real-time video streaming. The types of filters are:

ZBarFilter – It helps detect QR and bar codes in the video stream. The filter raises a CodeFoundEvent when a code is identified. Users can add a listener to the event to execute some action.
FaceOverlayFilter – It detects the face in the video and overlays it with a configurable image.
GstreamerFilter – It is a general filter that integrates the GStreamer element into the Kurento Media Pipeline. The current implementation of GstreamerFilter allows a single element and you can not implement more than one element at a time.

Hubs

They are the media objects that manage multi-media flow in a pipeline. Several hub ports connect other media elements. They enable complex media routing scenarios, allowing efficient distribution and mixing of media streams within a media pipeline. Primary types of Hubs:

Composite – It creates a grid with the video stream and mixes the audio stream of its connected input.
DispatcherOneToMany – It distributes the given input to all the connected output HubPorts.
Dispatcher – It routes between input-output HubPort pairs.

Example module

There are additional example modules provided for demonstration purposes. You can extend the basic features of the Kurento Media server:
Chrome – You can make the top-left area of the video transparent, revealing another background image.
CrowdDetector – It can detect groups of people in video streams.
Plate Detector – It can help detect the vehicle license plates in video streams.
PointerDetector – It detects pointers in video streams based on color tracking.

[BLOG CTA]

What are the features of the Kurento Media Server?

Kurento Media Server (KMS) can be used with the WebRTC Media Server model, which allows media transmission, recording, and playback. It uses the GStreamer multimedia library and offers features like:

  • It offers Networked streaming protocols, including HTTP, RTP, and WebRTC.Provides MCU and SFU functionality for group communications. It supports media mixing and media routing/ dispatching.
  • Kurento offers generic filters, implementing Computer Vision and Augmented Reality algorithms.
  • Media storage on the Kurento Media Server allows writing operations for WebM and MP4. You can play the media in all the formats.
  • Kurento allows automatic media transcoding with GStreamer-compatible codecs, including VP8, H.264, H263, AMR, OPUS, Speed, G.711, etc.

    What are the benefits of the Kurento Media Server?

    The Kurento Media Server (KMS) is a tool for developing multimedia applications. This media server is critical for sophisticated, real-time multimedia applications that provide the tools and features to handle media workflows efficiently.

    Here are several key reasons why you might need a Kurento Media Server:

    Real-time media processing

    Kurento Server helps handle real-time media processing tasks, like transcoding, mixing, and filtering. Transcoding converts media streams from one format to another in real time. Mixing combines multiple media streams into one stream. Filters allow you to apply video and audio filters, such as overlays, chroma keying (green screen), and face recognition.

    WebRTC supports

    Kurento provides powerful WebRTC support that allows peer-to-peer communication and media gateways. Peer-to-peer communication facilitates direct media stream exchange between browsers or devices. It is an intermediary for WebRTC communications, enabling connections between WebRTC clients and non-WebRTC endpoints.

    Scalability

    KMS is a highly scalable platform that allows large media handling, essential for applications. It can manage numerous concurrent media streams or large audiences. This is essential for videoconferencing solutions, live streaming, broadcasting platforms, and interactive media applications.

    Interoperability

    Kurento Media Server supports media protocols and formats to ensure interoperability with different media sources and endpoints. This includes RTP/RTSP for media streaming and broadcasting, and HTTP for adaptive streaming and file-based media serving.

    Extensibility

    Kurento is an extensive platform that allows developers to create custom media processing modules and integrate them seamlessly into their applications. It enables developers to design customer filters, tailored to specific needs, such as unique video effects or analytics. The platform allows third-party integrations, like facial recognition or object detection.

    Media Recording and Playback

    Kurento Media Server supports recording media streams in various formats. You can record video calls for later playback or archival purposes. It also offers on-demand video services to play recorded streams on request.

    Ease of Integration

    Kurento is an open-source project, offering tools and client libraries (SDKs) for different languages. These computer languages include Java, JavaScript, and Node.js, making web and mobile integrations easy.

    Kurento Media Server – Use-cases

    Kurento WebRTC is used across various industries due to its powerful and robust functionalities. The platform helps handle real-time multimedia processing, WebRTc support, scalability, and extensibility.

    The key industries that use Kurento Media Server are:

    Telecommunications

    Kurento is used to build robust videoconferencing solutions for seamless video and audio multi-party calls, recording, and real-time streaming. It is also used in Voice over IP (VoIP) services for real-time voice communication, integrating with webRTC for browser-based calling. You can integrate existing telecom infrastructure using SIP, RTP, and WebRTC. It supports large-scale conferencing solutions, handling numerous users.

    Healthcare

    Kurento has facilitated telemedicine, allowing secure and reliable remote consultation between doctors and patients, video calls, remote diagnostics, and virtual follow-ups. The WebRTC video streaming server enables live and recorded training sessions, surgeries, and medical procedures, allowing interactive and on-demand learning. It ensures encrypted communication, maintaining patient confidentiality.

    Education

    This open-source project allows e-learning, empowering virtual classrooms, webinars, and online courses with live video streaming and interactive features, including quizzes, discussions, and screen sharing. It allows session recording for on-demand playback. The platform supports one-on-one and group tutoring sessions using real-time video and audio communication.
    ravi garg, mss, kurento media server, kurento, use cases, industries, telecommunications, healthcare, education, media and entertainment, customer service, gaming

    Media and Entertainment

    Kurento is used to broadcast live events, concerts, sports, and shows to large crowds in real-time. You can create interactive broadcasting, combining video with interactive elements like polls, chats, and audience engagement. The media server allows you to record media and playback it on-demand.

    Customer service

    Kurento enables customer service through video calls, enhancing the support experience by providing face-to-face interaction and visual troubleshooting. The virtual video-based assistance services offer more personalized customer interactions. You can record support sessions for quality assurance and training.

    Gaming

    The platform empowers live game streaming, including real-time commentary and audience interaction. It also provides in-game communication features, supporting video and audio communication between players for a more immersive gaming experience. The platform allows users to manage large volumes of simultaneous streams during gaming events.

    Conclusion

    The Kurento Media Server is one of the best WebRTC media servers and a powerful and flexible platform for developing multimedia applications. It offers features, including advanced media processing capabilities, extensive support from WebRTC, and the ability to create custom media pipelines, making it a great tool for developers. If you are looking to develop real-time communications using Kurento, hire a Kurento WebRTC developer.