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.
(only linux-64bit is supported now)
-
Install latest version of vanilla LIVE555:
- Debian/Ubuntu:
sudo apt-get install livemedia-utils liblivemedia-dev - Arch Linux:
sudo pacman -S live-media - from source (
2018.09.10was tested):- build using the official documentation: http://www.live555.com/liveMedia/#config-unix
- install
*.alibraries usingsudo make install(you can put customDESTDIRin your live555 config file (not proxy config file!) or use something likecheckinstall) - put
LIBRARIES_DIR = /usr/local/libto your config file - use
LIB_SUFFIX = ain your config file
Make sure the development files (e.g.
/usr/include/liveMediaor/usr/local/include/liveMedia) are available - Debian/Ubuntu:
-
Copy
config-example.linux-64bittoconfig.linux-64bitand edit it. You may want to replaceLIBRARIES_DIRandINCLUDES_PREFIXor change the compiler (see also example for Ubuntu 18.04 with gcc:config-example-ubuntu.linux-64bit)- Use
LIB_SUFFIX = afor static linking - Use
LIB_SUFFIX = sofor dynamic linking
- Use
-
Generate Makefile using
./genMakefiles linux-64bit -
make -
Then
live555ProxyServerExexecutable file will be available
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:
-
verbosity:0is default,1is equivalent to-v,2is equivalent to-V; -
stream_rtp_over_tcp(boolean) is equivalent to-t; -
try_standard_port_numbers(boolean): if1(default), then proxy server tries to use port 554 or 8554 ifrtsp_server_portfailed; -
server_tunneling_over_http(boolean): if1(default), then proxy creates a HTTP server for RTSP-over-HTTP tunneling; -
server_tunneling_over_http_port(0..65535): if0(default), then proxy tries to use port 80, 8000 or 8080 for RTSP-over-HTTP tunneling; a non-zero value means the use of a specific port; -
rtsp_server_port(1..65535, default 554) is equivalent to-p; -
register_requests(boolean) is equivalent to-R; -
username_for_registerandpassword_for_registerare equivalent to-U username password; -
single_stream_name: name of the stream if there is only one proxied URL (defaultproxyStream); -
multiple_stream_name: names of the streams if there are multiple proxied URLs, must have%dfor stream number (defaultproxyStream-%d); -
out_packet_max_size(unsigned integer): changesOutPacketBuffer::maxSizevalue. If you see something likeThe total received frame size exceeds the client's buffer sizeorThe input frame data was too large for our buffer size, you can try to increase this value (default is 2000000 — 2 megabytes).
[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:
-
usernameandpasswordare used for connection to proxied streams; -
tunnel_over_http_portis equivalent to-T.
-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.