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):

                                        RTP-Unicast                                    HTTP                                        0            

The camera responds with the URL as a property of the MediaUri element:

                                        http://192.168.0.148:86/stream1                false                true                PT0S                        

Here, the URL to start the stream is http://192.168.0.148:86/stream1.

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

Playlist.png

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

RTSP/1.0 200 OKCSeq: 2Date: Thu, Jan 08 1970 22:35:55 GMTPublic: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETERRTSP/1.0 200 OKCSeq: 3Date: Thu, Jan 08 1970 22:35:55 GMTContent-Base: rtsp://192.168.0.148/stream1/Content-Type: application/sdpContent-Length: 596v=0o=- 108445472 1 IN IP4 192.168.0.148s=Session streamed by "Pelco Streaming Server"i=stream1t=0 0a=tool:LIVE555 Streaming Media v2007.07.09a=type:broadcasta=control:*a=range:npt=0-a=x-qt-text-nam:Session streamed by "Pelco Streaming Server"a=x-qt-text-inf:stream1m=video 0 RTP/AVP 96c=IN IP4 0.0.0.0a=rtpmap:96 H264/90000a=fmtp:96 packetization-mode=1;profile-level-id=640028;sprop-parameter-sets=Z2QAKK0AzlAUAW7ARAAALuAACvyBgAAARKoAAAtxsIvfjAAAAwIlUAAAW42EXvxo,aP48sA==a=label:pelco.1.1.1a=extmap:1 http://pelco.com/042010/ext.htm#lowLatencya=control:track1RTSP/1.0 200 OKCSeq: 4Date: Thu, Jan 08 1970 22:35:55 GMTTransport: RTP/AVP/TCP;unicast;destination=192.168.0.100;source=192.168.0.148;interleaved=0-1Session: 138RTSP/1.0 200 OKCSeq: 5Date: Thu, Jan 08 1970 22:35:55 GMTRange: npt=0.000-Session: 138RTP-Info: url=rtsp://192.168.0.148/stream1/track1;seq=39615;rtptime=1666070395$.......cN..z.]m\A.Hoj..9/..~..........EV\...}_)...#...."..*.7%.....~.'..$s.......f...5.....\x.v.'....j'n.....Y^.W.7.A.H.!...3.Q...a.8#I....,.../\?n...,7'...e.b.)%.Z+..wHc$%.0.....f.[.Ws..lTi.....x~r.J.P.....2..2...u....X..^5=5.....Y].M.............%.. . .

Outside.png

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