andreymal / live555ProxyServerEx

Improved version of the "LIVE555 Proxy Server"
GNU Lesser General Public License v3.0
37 stars 12 forks source link
live555 rtsp

live555ProxyServerEx

This is improved version of LIVE555 Proxy Server that supports configuration files.

The "LIVE555 Proxy Server" is a unicast RTSP server - built from the "LIVE555 Streaming Media" software - that acts as a 'proxy' for one or more 'back-end' unicast or multicast RTSP/RTP streams (i.e., served by other server(s)).

The key feature of a proxy server is that it reads each 'back-end' stream only once, regardless of how many separate clients are streaming from the proxy server. This makes the proxy server ideal, for example, for streaming from a RTSP-enabled video camera (which might not be able to handle more than one connection at a time).

                                                      --> [RTSP client1]
[back-end RTSP/RTP stream] --> [LIVE555 Proxy Server] --> [RTSP client2]
                                                      ...
                                                      --> [RTSP clientN]

For more information see the official documentation.

Build instructions

(only linux-64bit is supported now)

Configuration file

While you can use command-line arguments as with vanilla live555ProxyServer, you also can create a configuration file and load it using -c config.cfg option. It has INI format.

[general] section describes global options:

[auth] section is a list of usernames and passwords. If this is not empty, then proxy server will require authentication. Example:

[auth]
username = admin
password = 123456

username = alice
password = 777bob777

[streams] section is a list of proxied streams. Every stream must have URL and stream name. Example:

[streams]
url = rtsp://192.168.69.100:554/onvif1
name = office

url = rtsp://10.0.2.66:38888/h264_ulaw.sdp
name = android_ipwebcam

These streams will be proxied as rtsp://[proxy_ip]:[proxy_port]/office and rtsp://[proxy_ip]:[proxy_port]/android_ipwebcam.

[streamparams] section has additional options for [streams] section. These options does not affect other config files or command-line arguments:

-u and -T command-line options affects only command-line streams.

[include] allows you to use multiple config files. They will be loaded in the specified order. Example:

[include]
path = proxyserver.d/auth.cfg
path = proxyserver.d/office.cfg
path = proxyserver.d/android_ipwebcam.cfg

Configuration in the files that were read later has higher priority. (Note that [auth] sections will be merged and [streamparams] section affects only current file.)

Command-line arguments have higher priority than any config files.