RTP Video Streaming over HTTP

This feature is available only with ONVIF supported devices. ONVIF is supported for Sarix 1.8.2 and later.

This article discusses how to establish a RTP/RTSP session where the video data (RTP) and commands (RTSP) are transported as HTTP traffic using a technique called "HTTP Tunneling". HTTP tunneling is a client/server approach that wraps RTP and RTSP data in HTTP requests and responses. This allows the RTP/RTSP data to easily move through firewalls, since most sites do not block HTTP traffic. The client application (we will use VLC) starts the process by sending a GET request to open a "downlink" over which the server (a Pelco camera) sends image data. The client also opens an "uplink" to the server, over which it sends RTSP commands. A thorough description of the tunneling process is available at https://developer.apple.com/quicktime/icefloe/dispatch028.html.

The mechanism described here applies to Sarix cameras. It is similar to, but more advanced than, the HTTP PUSH mechanism found on earlier Pelco cameras such as the IP110 and Spectra IV IP.

The entire process starts with determining the URL to which the client should send a request to start the session. The camera knows the answer, and an ONVIF call to the camera will return the URL. ONVIF is a SOAP-based standard for managing video sessions between cameras, recorders, viewers, and so on.

Construct an ONVIF request specifying the GetStreamUri method, the desired protocol (HTTP), and the Stream type (RTP-Unicast):

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema">
The camera responds with the URL as a property of the MediaUri element:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:Media="http://www.onvif.org/ver10/media/wsdl" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:ter="http://www.onvif.org/ver10/error">

Here, the URL to start the stream is

To display the stream using VLC, we need to configure VLC to use HTTP tunneling.

Launch VLC and set the parameters as follows:

Preference > Input / Codecs > Demuxers > RTP/RTSP

Click to select "Tunnel RTSP and RTP over HTTP". Also set the HTTP tunnel port to 86.

RTP Settings.png

Next, in VLC select File > Open Network to open a stream using the URL returned by the camera. However, there are two important differences: specify RTSP instead of HTTP as the protocol, and do not include the port number in the URL string.

Network URL.png


Next, the camera responds to the POST with RTSP and RTP setup information, and then starts streaming video.

RTSP/1.0 200 OK
CSeq: 2
Date: Thu, Jan 08 1970 22:35:55 GMT

RTSP/1.0 200 OK
CSeq: 3
Date: Thu, Jan 08 1970 22:35:55 GMT
Content-Base: rtsp://
Content-Type: application/sdp
Content-Length: 596

o=- 108445472 1 IN IP4
s=Session streamed by "Pelco Streaming Server"
t=0 0
a=tool:LIVE555 Streaming Media v2007.07.09
a=x-qt-text-nam:Session streamed by "Pelco Streaming Server"
m=video 0 RTP/AVP 96
c=IN IP4
a=rtpmap:96 H264/90000
a=fmtp:96 packetization-mode=1;profile-level-id=640028;sprop-parameter-sets=Z2QAKK0AzlAUAW7ARAAALuAACvyBgAAARKoAAAtxsIvfjAAAAwIlUAAAW42EXvxo,aP48sA==
a=extmap:1 http://pelco.com/042010/ext.htm#lowLatency
RTSP/1.0 200 OK
CSeq: 4
Date: Thu, Jan 08 1970 22:35:55 GMT
Transport: RTP/AVP/TCP;unicast;destination=;source=;interleaved=0-1
Session: 138

RTSP/1.0 200 OK
CSeq: 5
Date: Thu, Jan 08 1970 22:35:55 GMT
Range: npt=0.000-
Session: 138
RTP-Info: url=rtsp://;seq=39615;rtptime=1666070395

. . .


Using the information presented here you can start a RTP/RTSP session that uses HTTP to transport the video traffic.