Convert Figma logo to code with AI

Kurento logokurento-media-server

[ARCHIVED] Contents migrated to monorepo: https://github.com/Kurento/kurento

3,065
698
3,065
2

Top Related Projects

Jitsi Videobridge is a WebRTC compatible video router or SFU that lets build highly scalable video conferencing infrastructure (i.e., up to hundreds of conferences per server).

OpenVidu Platform main repository

Janus WebRTC Server

WebRTC Media Server

Cutting Edge WebRTC Video Conferencing

Server for PeerJS

Quick Overview

Kurento Media Server is an open-source WebRTC media server and a set of client APIs. It allows developers to add advanced media capabilities to their web and mobile applications, including group communications, transcoding, recording, mixing, broadcasting, and routing of audiovisual flows.

Pros

  • Supports a wide range of media processing capabilities, including real-time video and audio effects
  • Provides flexible media pipeline architecture for complex media workflows
  • Offers client APIs for multiple programming languages (Java, JavaScript, C++)
  • Integrates well with existing web technologies and frameworks

Cons

  • Can be complex to set up and configure for advanced use cases
  • Documentation may be lacking in some areas, especially for newer features
  • Performance can be resource-intensive for high-quality video processing
  • Community support may be limited compared to some more mainstream projects

Code Examples

  1. Creating a basic WebRTC loopback:
const kurentoClient = require('kurento-client');

kurentoClient.create('ws://localhost:8888/kurento', (error, client) => {
  client.create('MediaPipeline', (error, pipeline) => {
    pipeline.create('WebRtcEndpoint', (error, webRtcEndpoint) => {
      webRtcEndpoint.connect(webRtcEndpoint, (error) => {
        // WebRTC loopback established
      });
    });
  });
});
  1. Adding a filter to a WebRTC stream:
pipeline.create('WebRtcEndpoint', (error, webRtcEndpoint) => {
  pipeline.create('FaceOverlayFilter', (error, faceOverlayFilter) => {
    webRtcEndpoint.connect(faceOverlayFilter, (error) => {
      faceOverlayFilter.connect(webRtcEndpoint, (error) => {
        // WebRTC stream with face overlay filter
      });
    });
  });
});
  1. Recording a WebRTC stream:
pipeline.create('WebRtcEndpoint', (error, webRtcEndpoint) => {
  pipeline.create('RecorderEndpoint', { uri: 'file:///tmp/recording.webm' }, (error, recorderEndpoint) => {
    webRtcEndpoint.connect(recorderEndpoint, (error) => {
      recorderEndpoint.record((error) => {
        // Recording started
      });
    });
  });
});

Getting Started

  1. Install Kurento Media Server:
sudo apt-get update
sudo apt-get install kurento-media-server
  1. Start the server:
sudo service kurento-media-server start
  1. Install the Kurento Client library (for Node.js):
npm install kurento-client
  1. Create a basic WebRTC application using the code examples provided above.

Competitor Comparisons

Jitsi Videobridge is a WebRTC compatible video router or SFU that lets build highly scalable video conferencing infrastructure (i.e., up to hundreds of conferences per server).

Pros of jitsi-videobridge

  • Lightweight and efficient, designed specifically for WebRTC conferencing
  • Supports large-scale video conferences with many participants
  • Active development and community support

Cons of jitsi-videobridge

  • Limited media processing capabilities compared to Kurento
  • Less flexibility for custom media pipelines and advanced scenarios
  • Primarily focused on video conferencing, may not be suitable for other use cases

Code Comparison

Kurento Media Server (C++):

kurento::MediaPipeline pipeline;
auto webRtcEndpoint = pipeline.create<kurento::WebRtcEndpoint>();
auto recordEndpoint = pipeline.create<kurento::RecorderEndpoint>();
webRtcEndpoint->connect(recordEndpoint);

Jitsi Videobridge (Java):

Conference conference = videobridge.createConference();
Endpoint endpoint = conference.createEndpoint();
Channel channel = endpoint.createChannel(MediaType.VIDEO);
channel.setPayloadTypes(Arrays.asList(new PayloadTypePacketExtension(96, "VP8", 90000)));

The code snippets demonstrate the different approaches:

  • Kurento uses a flexible pipeline model for media processing
  • Jitsi Videobridge focuses on conference and endpoint management

Both projects serve different purposes within the WebRTC ecosystem, with Kurento offering more versatility for media processing and Jitsi Videobridge excelling in large-scale video conferencing scenarios.

OpenVidu Platform main repository

Pros of OpenVidu

  • Higher-level abstraction, making it easier to implement video conferencing features
  • Provides ready-to-use client-side libraries for various platforms (Web, iOS, Android)
  • Includes additional features like recording and screen sharing out-of-the-box

Cons of OpenVidu

  • Less flexibility for custom media processing compared to Kurento
  • Potentially higher resource usage due to additional abstraction layers
  • May have a steeper learning curve for developers familiar with WebRTC basics

Code Comparison

Kurento (server-side pipeline creation):

pipeline.create('WebRtcEndpoint', function(error, webRtcEndpoint) {
  // Handle WebRTC endpoint
});

OpenVidu (session creation and management):

var OV = new OpenVidu();
var session = OV.initSession();
session.connect(token);

OpenVidu provides a higher-level API for managing WebRTC sessions, while Kurento offers more granular control over media pipelines. OpenVidu is built on top of Kurento, abstracting away some of the complexities but potentially limiting fine-grained control. Developers should choose based on their specific requirements for customization, ease of use, and desired features.

Janus WebRTC Server

Pros of Janus-gateway

  • Lightweight and modular architecture, allowing for easier customization and extension
  • Supports a wider range of protocols, including WebRTC, RTMP, and SIP
  • More active community and frequent updates

Cons of Janus-gateway

  • Less comprehensive media processing capabilities compared to Kurento
  • Steeper learning curve for beginners due to its plugin-based architecture
  • Limited built-in recording and streaming features

Code Comparison

Janus-gateway (JavaScript client):

var janus = new Janus({
    server: 'wss://janus.example.com',
    success: function() {
        // Attach to plugin
    },
    error: function(error) {
        console.error(error);
    }
});

Kurento (JavaScript client):

var ws = new WebSocket('wss://kurento.example.com');
ws.onopen = function() {
    var kurentoClient = kurentoClient(ws);
    // Create pipeline and elements
};

Both projects are open-source WebRTC media servers, but they differ in their approach and focus. Janus-gateway is more flexible and supports a broader range of protocols, making it suitable for various use cases. Kurento, on the other hand, offers more advanced media processing capabilities out of the box, which can be beneficial for complex media manipulation scenarios. The choice between the two depends on the specific requirements of your project and your team's expertise.

WebRTC Media Server

Pros of media-server

  • Lightweight and efficient, with lower resource usage
  • More flexible architecture, allowing easier customization
  • Better support for modern codecs like VP8 and VP9

Cons of media-server

  • Less mature and less widely adopted than kurento-media-server
  • Smaller community and fewer available resources/tutorials
  • Limited built-in functionality compared to kurento-media-server's extensive features

Code Comparison

media-server:

MediaServer* server = MediaServer::Create();
MediaFrameListener* listener = new MyCustomListener();
server->AddMediaListener(listener);

kurento-media-server:

kurento::MediaPipeline pipeline;
auto webRtcEndpoint = pipeline.create<kurento::WebRtcEndpoint>();
webRtcEndpoint->connect(webRtcEndpoint);

The code snippets demonstrate that media-server offers a more low-level approach, allowing direct interaction with the media server and custom listeners. In contrast, kurento-media-server provides a higher-level abstraction with pre-defined components like WebRtcEndpoint, which simplifies common use cases but may limit flexibility for advanced scenarios.

Both projects aim to provide robust media server solutions, but they cater to different needs. media-server is more suitable for developers who require fine-grained control and customization, while kurento-media-server offers a more comprehensive out-of-the-box solution with a larger ecosystem.

Cutting Edge WebRTC Video Conferencing

Pros of mediasoup

  • Designed for modern WebRTC applications with a focus on scalability and performance
  • Supports multiple transport protocols (WebRTC, PLAIN, and PIPE)
  • More active development and frequent updates

Cons of mediasoup

  • Steeper learning curve due to its modular architecture
  • Requires more manual configuration compared to Kurento's all-in-one approach
  • Less extensive documentation and fewer examples available

Code Comparison

mediasoup (JavaScript):

const worker = await mediasoup.createWorker();
const router = await worker.createRouter({ mediaCodecs });
const transport = await router.createWebRtcTransport(webRtcTransportOptions);
const producer = await transport.produce({ kind: 'video', rtpParameters });

Kurento (Java):

KurentoClient kurento = KurentoClient.create();
MediaPipeline pipeline = kurento.createMediaPipeline();
WebRtcEndpoint webRtcEndpoint = new WebRtcEndpoint.Builder(pipeline).build();
webRtcEndpoint.connect(webRtcEndpoint);

Both mediasoup and Kurento are powerful media server solutions for WebRTC applications. mediasoup offers more flexibility and scalability, making it suitable for complex, high-performance scenarios. Kurento provides a more straightforward setup with its integrated approach, which can be beneficial for simpler use cases or developers new to WebRTC. The choice between the two depends on specific project requirements, development expertise, and scalability needs.

Server for PeerJS

Pros of peerjs-server

  • Lightweight and easy to set up for simple peer-to-peer connections
  • Focuses specifically on WebRTC signaling, making it more straightforward for basic P2P use cases
  • Active development and community support

Cons of peerjs-server

  • Limited functionality compared to kurento-media-server's full media server capabilities
  • Less suitable for complex media processing or streaming scenarios
  • Lacks advanced features like media recording, mixing, or transcoding

Code Comparison

peerjs-server (JavaScript):

const { PeerServer } = require('peer');

const peerServer = PeerServer({ port: 9000, path: '/myapp' });

kurento-media-server (C++):

#include <kurento/MediaPipeline.hpp>
#include <kurento/WebRtcEndpoint.hpp>

kurento::MediaPipeline pipeline = kurento::MediaPipeline::create(kurento::getKurentoClient());
auto webRtcEndpoint = kurento::WebRtcEndpoint::create(pipeline);

The code snippets demonstrate the simplicity of setting up peerjs-server compared to the more complex initialization required for kurento-media-server. While peerjs-server is focused on peer connections, kurento-media-server offers a full media pipeline with various endpoints and processing capabilities.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

Kurento Media Server

CII Best Practices FIWARE Chapter License badge Build Status Docker badge Support badge
Documentation badge FIWARE member status

Kurento Media Server is Kurento's core element. It is responsible for media transmission, processing, loading and recording. It is implemented in low level technologies based on GStreamer to optimize the resource consumption. It provides the following features:

  • Networked streaming protocols, including HTTP, RTP and WebRTC.
  • Group communications (MCUs and SFUs functionality) supporting both media mixing and media routing/dispatching.
  • Generic support for computational vision and augmented reality filters.
  • Media storage supporting writing operations for WebM and MP4 and playing in all formats supported by GStreamer.
  • Automatic media transcoding between any of the codecs supported by GStreamer including VP8, H.264, H.263, AMR, OPUS, Speex, G.711, etc.

This project is part of FIWARE. For more information check the FIWARE Catalogue entry for Context Processing, Analysis and Visualization.

:books:Documentation:page_facing_up: Site:mortar_board: Academy:whale: Docker Hub

About Kurento

Kurento is an open source software project providing a platform suitable for creating modular applications with advanced real-time communication capabilities. For knowing more about Kurento, please visit the Kurento project website: https://kurento.openvidu.io/.

Kurento is part of FIWARE. For further information on the relationship of FIWARE and Kurento check the Kurento FIWARE Catalog Entry.

Kurento has been rated within FIWARE as follows:

  • Version Tested:
  • Documentation:
  • Responsiveness:
  • FIWARE Testing:

Kurento is also part of the NUBOMEDIA research initiative.

Documentation

The Kurento project provides detailed documentation including tutorials, installation and development guides. The Open API specification, also known as Kurento Protocol, is available on apiary.io.

Useful Links

Usage:

Issues:

News:

Training:

Source

All source code belonging to the Kurento project can be found in the Kurento GitHub organization page.

Testing

Kurento has a full set of different tests mainly focused in the integrated and system tests, more specifically e2e tests that anyone can run to assess different parts of Kurento, namely functional, stability, tutorials, and API.

In order to assess properly Kurento from a final user perspective, a rich suite of E2E tests has been designed and implemented. To that aim, the Kurento Testing Framework (KTF) has been created. KTF is a part of the Kurento project aimed to carry out end-to-end (E2E) tests for Kurento. KTF has been implemented on the top of two well-known open-source testing frameworks: JUnit and Selenium.

If you want to know more about the Kurento Testing Framework and how to run all the available tests for Kurento you will find more information in Kurento developers documentation > Testing

Licensing and distribution

Copyright 2019 Kurento

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.