vendredi 4 juin 2010

Panoramic Video Streaming with RTSP

The Real Time Streaming Protocol (RTSP) is a protocol developed by the Internet Engineering Task Force (IETF) and published as RFC 2326 in 1998. RTSP is a network protocol designed to control the streaming of a media server.
In a simple scenario, you would like to watch a video on a media server. Using your RTSP client (the famous VideoLAN VLC for example), you control the streaming session on your media server (Darwin Streaming Server for example). The client sends at first a DESCRIBE message to the server to get description of the video: codecs, parameters, ports... Once the client knows how to connect to the server it sends a SETUP message to reserve resources on the server for the streaming session. Then the client controls the session by PLAY/PAUSE messages. Finally when the client decides to end the session, it sends a TEARDOWN message to free allocated resources on the server.
Streamed videos are being revolutionized: High Definition Videos, 3D videos… Those new concepts are gaining more and more popularity and rapidly being deployed. RTSP as it is today is capable of supporting these technologies. For example in 3D videos, the 3D layer can be considered as an additional media to audio and basic video, and all medias will be controlled simultaneously by RTSP.
Recently I stopped on a new Concept: Panoramic videos. In these videos, the user can choose any direction in 360 degrees at any moment for his view. It’s an interactive video. Immersive Media Company is a leading provider for such solutions. I recommend checking this demo video at their website:



I was thinking about the feasibility of this kind of video using RTSP. First, the media server must be capable of receiving information about the desired direction of view, then project his video data into this direction and stream it to the client. The client will perceive it as a single stream.
Now we have to find a way to control the view direction of the video using RTSP. Fortunately there is a mechanism in RTSP that allows it: using the GET_PARAMETER and SET_PARAMETER messages.
The message flow starts as usual with OPTIONS, DESCRIBE, SETUP and PLAY. In the response to the OPTIONS message the server must allow GET_PARAMETER and SET_PARAMETER requests. After PLAY, the client would like to know the initial angle from which the server has started streaming. To do this, the client sends the following request:

            GET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0
            CSeq: 431
            Content-Type: text/parameters
            Session: 12345678
            Content-Length: 25

            inclination
            azimuth


where the azimuth and the inclination angles are the parameters received in the response that identifies the direction of the view:

            RTSP/1.0 200 OK
            CSeq: 431
            Content-Length: 46
            Content-Type: text/parameters

            inclination: 100
            azimuth: 150


Now the user decides to change the view direction. To do this, it sends the following request to the server:

            SET_PARAMETER rtsp://example.com/fizzle/foo RTSP/1.0
            CSeq: 441
            Content-length: 46
            Content-type: text/parameters

            inclination: 120
            azimuth: 160


if the operation is successful, the server sends a 200 OK, otherwise it sends a 451 Invalid Parameter response. In the successful case, the server must gradually change the orientation of the view for a good user experience.

The success of RTSP in supporting Panoramic videos depends on its reactivity to the user actions.

Aucun commentaire :

Enregistrer un commentaire