Convert Figma logo to code with AI

Red5 logored5-server

Red5 Server core

3,418
1,012
3,418
8

Top Related Projects

OpenVidu Platform main repository

Janus WebRTC Server

Ant Media Server — Ultra-low latency streaming engine with WebRTC (~0.5s), SRT, RTMP, HLS, CMAF, adaptive bitrate, transcoding & scaling

A complete web conferencing system for virtual classes and more!

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).

Quick Overview

Red5/red5-server is an open-source media streaming server written in Java. It supports various streaming protocols, including RTMP, RTSP, and HLS, making it suitable for live streaming, video on demand, and real-time communication applications.

Pros

  • Supports multiple streaming protocols (RTMP, RTSP, HLS)
  • Open-source and actively maintained
  • Scalable and customizable through plugins and extensions
  • Cross-platform compatibility (runs on Windows, Linux, and macOS)

Cons

  • Steeper learning curve compared to some commercial alternatives
  • Documentation can be sparse or outdated in some areas
  • Performance may not match some proprietary solutions for large-scale deployments
  • Limited built-in monitoring and analytics tools

Code Examples

  1. Connecting to Red5 server using RTMP:
import org.red5.client.net.rtmp.RTMPClient;

RTMPClient client = new RTMPClient();
client.connect("rtmp://localhost/live", new Object[] { "myStream" });
  1. Publishing a stream:
import org.red5.server.api.stream.IClientBroadcastStream;
import org.red5.server.api.stream.IBroadcastStream;

IClientBroadcastStream stream = Red5.getConnectionLocal().getStreamByName("myStream");
stream.saveAs("recordedStream", false);
stream.start();
  1. Playing a stream:
import org.red5.server.api.stream.ISubscriberStream;

ISubscriberStream stream = Red5.getConnectionLocal().getStreamByName("myStream");
stream.play("recordedStream", -2000, -1);

Getting Started

  1. Download the latest Red5 server release from the GitHub repository.
  2. Extract the downloaded archive to a directory of your choice.
  3. Open a terminal/command prompt and navigate to the extracted directory.
  4. Run the server using the following command:
./red5.sh
  1. Access the Red5 admin panel by opening a web browser and navigating to:
http://localhost:5080
  1. Start developing your streaming application using the Red5 API and supported protocols.

Competitor Comparisons

OpenVidu Platform main repository

Pros of openvidu

  • Easier to set up and use, with a more user-friendly API
  • Better documentation and tutorials for quick start
  • Built-in support for recording and screen sharing

Cons of openvidu

  • Less flexible for custom streaming protocols
  • More resource-intensive, especially for large-scale deployments
  • Limited support for legacy streaming formats

Code Comparison

openvidu:

var OV = new OpenVidu();
var session = OV.initSession();
session.connect(token)
    .then(() => console.log("Connected"))
    .catch(error => console.error(error));

red5-server:

RTMPClient client = new RTMPClient();
client.setHost("localhost");
client.setPort(1935);
client.connect(null, new INetConnectionListener() {
    public void onConnectionSuccess(RTMPConnection conn) {
        System.out.println("Connected");
    }
});

Both projects aim to provide real-time communication solutions, but they differ in their approach and target use cases. openvidu focuses on WebRTC-based video conferencing with a higher-level API, making it easier for developers to implement video chat features quickly. red5-server, on the other hand, is a more general-purpose streaming server that supports multiple protocols, offering greater flexibility for custom streaming applications.

openvidu is better suited for developers looking to add video conferencing features to their applications with minimal effort, while red5-server is more appropriate for those requiring a highly customizable streaming solution or support for legacy protocols.

Janus WebRTC Server

Pros of Janus-gateway

  • Written in C, offering better performance and lower resource usage
  • Supports WebRTC natively, ideal for modern real-time communication applications
  • Modular architecture allows for easy extension and customization

Cons of Janus-gateway

  • Steeper learning curve due to C programming and WebRTC complexity
  • Less extensive documentation compared to Red5-server
  • Smaller community and ecosystem than Java-based alternatives

Code Comparison

Red5-server (Java):

public class Application extends MultiThreadedApplicationAdapter {
    @Override
    public boolean appStart(IScope app) {
        System.out.println("Application started");
        return true;
    }
}

Janus-gateway (C):

static int janus_echotest_init(janus_callbacks *callback, const char *config_path) {
    JANUS_LOG(LOG_INFO, "%s initialized!\n", JANUS_ECHOTEST_NAME);
    return 0;
}

Both repositories provide server-side solutions for real-time communication, but they differ in their primary focus and implementation. Red5-server is a Java-based streaming server with support for various protocols, while Janus-gateway is a C-based WebRTC server focusing on modern web technologies. The choice between them depends on specific project requirements, performance needs, and developer expertise.

Ant Media Server — Ultra-low latency streaming engine with WebRTC (~0.5s), SRT, RTMP, HLS, CMAF, adaptive bitrate, transcoding & scaling

Pros of Ant-Media-Server

  • More active development with frequent updates and releases
  • Better documentation and community support
  • Offers additional features like WebRTC support and adaptive bitrate streaming

Cons of Ant-Media-Server

  • Steeper learning curve for beginners
  • More complex configuration and setup process
  • Limited free version with some features restricted to enterprise edition

Code Comparison

Ant-Media-Server (Java):

@RestController
public class StreamsSourceRestService {
    @Autowired
    private AntMediaApplicationAdapter appAdapter;

    @PostMapping("/start")
    public Result startStreaming(@RequestBody StreamSource streamSource) {
        return appAdapter.startStreaming(streamSource);
    }
}

Red5-Server (Java):

public class Application extends MultiThreadedApplicationAdapter {
    @Override
    public void streamPublishStart(IBroadcastStream stream) {
        super.streamPublishStart(stream);
        System.out.println("Stream " + stream.getPublishedName() + " is now published");
    }
}

Both projects are open-source media servers written in Java, but Ant-Media-Server offers more modern features and active development. Red5-Server has a simpler architecture and may be easier for beginners to understand and implement. The code examples show that Ant-Media-Server uses Spring Boot for RESTful services, while Red5-Server relies on a more traditional approach with method overrides for stream handling.

A complete web conferencing system for virtual classes and more!

Pros of BigBlueButton

  • More comprehensive web conferencing solution with features like whiteboard, screen sharing, and breakout rooms
  • Active development with frequent updates and a larger community
  • Better documentation and easier setup process for new users

Cons of BigBlueButton

  • Higher resource requirements and more complex infrastructure
  • Less flexibility for customization compared to Red5 Server
  • Steeper learning curve for developers looking to extend functionality

Code Comparison

BigBlueButton (HTML5 client):

import { Meteor } from 'meteor/meteor';
import { Session } from 'meteor/session';
import Auth from '/imports/ui/services/auth';
import { setCustomLogoUrl } from '/imports/ui/components/user-list/service';

Red5 Server (Java):

public class Application extends MultiThreadedApplicationAdapter {
    @Override
    public boolean appStart(IScope app) {
        return true;
    }
}

BigBlueButton focuses on a full-featured web conferencing experience, while Red5 Server provides a more low-level streaming server foundation. BigBlueButton's code reflects its web-based nature, utilizing Meteor for real-time updates. Red5 Server's code showcases its Java-based architecture, allowing for more direct control over streaming functionality.

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

  • Specifically designed for WebRTC-based video conferencing
  • Supports large-scale conferences with multiple participants
  • Active development and regular updates

Cons of jitsi-videobridge

  • Limited to WebRTC protocol
  • Steeper learning curve for integration

Code Comparison

jitsi-videobridge (Java):

public class VideoChannel extends RtpChannel {
    private final List<RtpEncoder> rtpEncoders = new ArrayList<>();
    private final List<RtcpFeedbackMessageSender> rtcpFeedbackMessageSenders = new ArrayList<>();
    // ...
}

red5-server (Java):

public class RTMPConnection extends RTMPMinaConnection {
    private volatile IoSession ioSession;
    private volatile IScope scope;
    private volatile String clientId;
    // ...
}

Both projects are written in Java, but they focus on different aspects of real-time communication. jitsi-videobridge is tailored for WebRTC video conferencing, while red5-server is a more general-purpose streaming server supporting multiple protocols like RTMP.

jitsi-videobridge has a more specialized codebase for handling video and audio streams in a conference setting, while red5-server's code reflects its broader functionality for various streaming scenarios.

The choice between these projects depends on the specific requirements of your application, with jitsi-videobridge being more suitable for WebRTC-based video conferencing and red5-server offering more flexibility for different streaming protocols.

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

Red5 open source media server

===========

Maven Central PRs Welcome

  • Red5 open source media server is one of the free live streaming solutions provided by Red5. It is written in Java and is designed to be flexible with a simple plugin architecture that allows for customization of virtually any video-on-demand (VOD) and live streaming scenario. Read more about its key features and capabilities here Installed over 1,000,000 times worldwide, Red5 open source media server has powered applications for organizations like Amazon, the US Department of Defense, Akamai, Harvard University, and many others. Red5 open source media server is server core for Red5pro and Red5Cloud.Red5 open source media server is ideal for developers, hobbyists, and students who want to experiment with live video streaming technology, build a media server and learn how it works.

Automatic builds (Courtesy of Apache OpenMeetings):

Developer Community Support

If you have questions regarding the development, there are a couple of places you get help help from fellow developers:Join Red5 Slack community Ask your question on Red5 official subreddit or Stack

Maven

Releases are available at Sonatype - Releases

Snapshots are available at Sonatype - Snapshots

Include the red5-parent in your pom.xml in the dependencyManagement section

<dependencyManagement>
    <dependencies>
      <dependency>
          <groupId>org.red5</groupId>
          <artifactId>red5-parent</artifactId>
          <version>${red5.version}</version>
          <type>pom</type>
      </dependency>
    </dependencies>
</dependencyManagement>  

in addition to any other Red5 projects in the dependencies section

  <dependency>
      <groupId>org.red5</groupId>
      <artifactId>red5-server</artifactId>
      <version>${red5.version}</version>
      <type>jar</type>
  </dependency>

Build from Source

As of release 1.2.2 the target JDK is now JDK 11 and the Maven poms use the toolchain plugin.

To build the red5 jars, execute the following on the command line:

mvn -Dmaven.test.skip=true install

This will create the jars in the "target" directory of the workspace; this will also skip the unit tests.

To package everything up in an assembly (tarball/zip):

mvn -Dmaven.test.skip=true clean package -P assemble

Docker RTMP Integration Test

This repo includes an integration test that:

  • starts a Red5 server container
  • launches 5 concurrent RTMP publishers via ffmpeg
  • validates subscriptions with ffprobe
  • collects logs and checks for handshake / rejection issues

Prerequisites:

  • docker
  • ffmpeg
  • ffprobe
  • Java 21 and Maven

Run against the published image (mondain/red5:latest):

mvn -pl tests -Pdocker-integration -Dred5.it.image=mondain/red5:latest -Dred5.it.autoPull=on -DskipTests=false verify

Run against your current checkout (build + dockerize local version first):

bash tests/src/test/resources/scripts/build_local_red5_docker_image.sh red5-local:dev
mvn -pl tests -Pdocker-integration -Dred5.it.image=red5-local:dev -Dred5.it.autoPull=off -DskipTests=false verify

Artifacts are written to:

tests/target/rtmp-docker-it/<timestamp>/

Key outputs:

  • red5-container.log: server logs from the container
  • publisher-stream*.log: per-publisher ffmpeg logs
  • ffprobe-stream*.json: per-stream probe validation
  • handshake-findings.log: handshake-related findings
  • connection-rejections.log: connection rejection findings

To build a milestone tarball:

mvn -Dmilestone.version=1.0.7-M1 clean package -Pmilestone

Older Releases

Visit this page to review release notes from all previous versions Releases·Red5/red5-server

Supporters

YourKit

YourKit supports open source projects with innovative and intelligent tools for monitoring and profiling Java and .NET applications.

Red5

Red5 is a trusted live streaming solution provider for developers, startups and enterprises, delivering video, audio, and data with under 250 ms of latency.