The LIVE555TM HLS Proxy
The "LIVE555 HLS Proxy" is an application
- built from the
"LIVE555 Streaming Media" software -
that allows a web browser to view a 'back-end' (unicast or multicast) RTSP/RTP stream
(e.g., from a network camera).
An arbitrary number of web browser clients can view the stream, but the back-end RTSP stream
is accessed only once.
--> [HTTP (web browser) client1]
[back-end RTSP/RTP stream] --> [LIVE555 HLS Proxy] [Web Server] --> [HTTP (web browser) client2]
--> [HTTP (web browser) clientN]
Specifically, the "LIVE555 HLS Proxy" converts a live RTSP stream (e.g., from a network camera) into a set of HLS
("HTTP Live Streaming")
segments that can be viewed in a HLS-compliant browser
(e.g., "Safari" on Macs or iPhones).
(Note the difference between the
"LIVE555 HLS Proxy"
"LIVE555 Proxy Server",
where all access to the stream is via RTSP.
In contrast, the
"LIVE555 HLS Proxy" allows client to access the stream using a web browser.)
To use the "LIVE555 HLS Proxy", you must have a web server
running on the same computer.
The "LIVE555 HLS Proxy" is a command-line (i.e., 'console') application.
To run it:
Note that the RTSP stream must contain H.264 or H.265 video, optionally with an AAC audio track.
For now, no other codecs are supported.
- "cd" to a directory that's accessible by your web server (e.g., /usr/local/www/apache24/data )
<path-to-live555-software>/live/hlsProxy/live555HLSProxy <rtsp://-url-of-your-RTSP-stream> <HLS-prefix>
where <HLS-prefix> is a name to give to your stream (as seen by web browser users).
- If your RTSP stream is password protected, you can add the
"-u <username> <password>"
(To specify an empty password, use
"" for <password>.)
Alternatively, you could try including the user name and password inside
the "rtsp://" URL, as:
(This is not recommended, however, because - in this case - the password will be sent in the clear
over the Internet. Also, not all RTSP servers will accept this type of URL.)
- If you wish to receive the RTP/RTCP data over TCP (the RTSP control connection), you can do so by adding the
option. (As always, you should use this only if there is a firewall - between you and the RTSP server - that blocks UDP packets.)
- Note that you can run the "live555HLSProxy" application several times concurrently - for different input RTSP streams - with different <HLS-prefix>es.
- Once the application has read its first segment of data (about 6 seconds worth), it will 'beep' to let you know that the stream is now available for viewing by web browsers.
- HLS-compatible web browsers will then be able to view the stream via the HTTP (or HTTPS) URL:
Proxying an 'advertised' RTSP streams
This server application can also set up proxying for a back-end RTSP
stream that's advertised using a "REGISTER"
(This advertisement - which specifies the "rtsp://" URL of the back-end stream - can be sent either by the back-end server itself,
or by some third-party application.)
To give the server application this functionality, start it with the
command-line option, instead of a "rtsp://" URL.
- <port-number> specifies the port number on which the proxy
will receive the RTSP "REGISTER" command.
If this is omitted, then the proxy will choose its own port number.
- As a special feature - if the "reuse_connection" parameter was set in the "REGISTER" command's "Transport:" header -
the HLS proxy gets to reuse the TCP connection on which it received the "REGISTER" command.
This can be useful if the RTSP server is behind a firewall or NAT, but the HLS proxy is run on the public Internet.
(In this case, you may also wish to use the -t option, to request that the back-end RTSP
server also send its RTP/RTCP packets on this same TCP connection.)
- "REGISTER" is a custom RTSP command, developed by Live Networks, Inc.
It is currently non-standard, but is described in an
- If you use the "-R" option, then you should also use the
"-U <username> <password>" option,
which specifies a username and password that should be used to authenticate the incoming "REGISTER" command.
(Note the difference between the '-u' command, which specifies a username and password to be used for accessing the back-end RTSP stream,
and the '-U" command, which specifies a username and password to be used to authenticate incoming "REGISTER" commands.)
- The application "registerRTSPStream" - included in the "testProgs" directory - can be used to 'register' a back-end RTSP stream with a HLS proxy.
Source code, and support
Because this application is intended
for computer networking professionals rather than casual end users,
we do not make it available as a pre-built binary.
Instead, you must build it yourself, from source code.
To do so, you must download and build the
"LIVE555 Streaming Media" software.
Note that the "LIVE555 HLS Proxy" application is included in the
Support for the "LIVE555 HLS Proxy"
(and the rest of the "LIVE555 Streaming Media" code)
is provided via our developers' mailing list:
Note that you must first subscribe to the mailing list before you can post to it;
please also read the
before posting to the mailing list.
and the Live Networks logo are trademarks of
Live Networks, Inc.