RtspServerLive555 C++ lib. RTSP server (H264, HEVC and JPEG) C++ library for Linux

€4,000.00

The RtspServerLive555 is a C++ library version 2.0.1 provides RTSP server with H264, HEVC and JPEG support. The library based on popular opensource library Live555 and provides simple interface to include in any C++ project.

LICENSE: We sell source code of this library as is, without future updates and technical support according to perpetual non-exclusive royalty-free license. You pay once and can use this library in your software and hardware products without limits. Please read the license agreement before purchasing: DOWNLOAD LICENSE. You can buy technical support service for this product.

Add To Cart
Technical support service
Options:

Purchase options

You can by this software online by card or you can buy the software by bank transfer. Bank transfer available only for companies. To buy software by bank transfer please send us request to info@constantrobotics.com. Also, you can buy technical support service for this product.

Downloads

Programmer’s manual: DOWNLOAD

Overview

The RtspServerLive555 is a C++ library version 2.0.1 provides RTSP server. The library based on popular opensource library Live555 (source code not included, just linked). The RtspServerLive555 library provides simple interface to include in any C++ project. It 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 puts video frame. RtspServerLive555 is capable of streaming both raw frame formats (such as NV12) and compressed formats like H264. Users can provide frames that are either in a raw state or already compressed. If the frame is in a compressed format (H264, HEVC or JPEG), it bypasses any overlay and resizing processes and is sent directly to clients. However, if the frame is raw, it undergoes a series of processing steps. First, resizing is performed if necessary, followed by the application of any required overlay. Finally, the processed frame is encoded into a compressed format before being transmitted to clients (to use this functions the user must define video codec and video overlay implementation according to VCodec, VOverlay interfaces). The library relies on several dependencies, including VCodec (defaines video codec interface, source code included), VOverlay (defaines video overlay interface, source code included), FormatConverterOpenCv (provides methods to convert pixel formats, source code included), ConfigReader (provides methods to work with JSON files) and OpenCV (version 4.5 and higher). It has been specifically tested and verified for functionality on the Linux operating system. The RTSP server provided by library compatible with all popular RTSP clients: ffmpeg, gstreamer, VLC, Milestone etc.

Simple interface

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

    /// Init RTSP server.
    bool init(RtspServerParams& params,
              cr::video::VCodec* codec = nullptr,
              cr::video::VOverlay* overlay = nullptr);

    /// Set param.
    bool setParam(RtspServerParam id, float value);

    /// Set param.
    bool setParam(RtspServerParam id, std::string value);

    /// Get RTSP server params.
    void getParams(RtspServerParams& params);

    /// Execute command.
    bool executeCommand(RtspServerCommand id);

    /// Send frame.
    bool sendFrame(cr::video::Frame& frame);

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

Simple example

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

// Link namespaces.
using namespace std;
using namespace cr::rtsp;
using namespace cr::video;

// Entry point.
int main(void)
{
    // Init RTSP server params for encoded frames by default params.
    RtspServerParams params;
    params.port = 7031;
    params.ip = "0.0.0.0";
    params.suffix = "live";
    params.user = ""; // No user name.
    params.password = ""; // No password.
    params.fps = 30;

    // RTSP server.
    RtspServerLive555 server;
    if(!server.init(params))
        return -1;
    cout << "RTSP init string: rtsp://127.0.0.1:7031/live" << endl;

    // Init file video source.
    VSourceFile fileSource;
    if(!fileSource.openVSource("out.264;1280;720;30"))
        return -1;

    // Main thread.
    Frame sourceFrame;
    while(1)
    {
        // Get new frame from video file.
        if(!fileSource.getFrame(sourceFrame, 1000))
            continue;
        
        // Send frame to RTSP server.
        if(!server.sendFrame(sourceFrame))
            cout << "Can not send frame to rtsp server" << endl;
    }
    return 1;
}
RtspServer C++ lib. Powerful RTSP server (H264 and HEVC) C++ library for Linux and Windows
€4,000.00