RtspServerLive555 C++ library v1.0.0

RTSP server C++ library based on opensource Live555 library with simple interface.

Overview

The RtspServerLive555 is a C++ library provides RTSP server. The library based on popular opensource Live555 library (source code not included, just linked). The RtspServerLive555 library provides simple interface to include in any C++ project. The library allows you to create an RTSP server (multicast by default) without the complexity of the Live555 library. User can set general RTSP server parameters: RTSP server port, IP, stream name, user name and password. Server works frame-by-frame: user put video frame (encoded by H264 and JPEG). The RTSP server provided by library compatible with all popular RTSP clients: ffmpeg, gstreamer, VLC, Milestone etc. The library depends on Frame class (source code included) and Live555 (linked in CMake and must be installed in the OS). The library tested on Linux OS. Library interface:

class RtspServerLive555
{
public:
    /// Get class version string.
    static std::string getVersion();

    /// Init RTSP server.
    bool init(int port,
              std::string streamName = "unicast",
              std::string ip = "",
              std::string userName = "",
              std::string password = "");

    /// Put video frame into server for streaming.
    bool sendFrame(cr::video::Frame& frame);

    /// Close RTSP server.
    void close();
};

How to use

Test application shows how to create RTSP server and send frames:

#include <iostream>
#include "RtspServerLive555.h"

int main(void)
{
    // Init RTSP server.
    cr::rtsp::RtspServerLive555 server;
    if(!server.init(8554, "unicast", "127.0.0.1", "user", "password"))
        return -1;

    // Create H264 frame.
    cr::video::Frame frameH264(640, 480, cr::video::Fourcc::H264);

    // Main loop.
    while(1)
    {
        // ---------------------------------
        // Prepare h264 frame data ...
        // ---------------------------------

        // Send frame to RTSP server.
        if(!server.sendFrame(frameH264))
            cout << "Can not send frame to rtsp server" << endl;
    }
    return 1;
}

Downloads

RtspServerLive555 C++ library programmer’s manual: DOWNLOAD

Price and Terms

The RtspServerLive555 C++ library is supplied under a custom license. Library pricing and license agreements are available upon request info@constantrobotics.com.