Association Service



Introduction

Collaborative media streaming is a means by which multiple users can participate in a single media stream concurrently, via the RTSP (Real-time Streaming Protocol). Users can themselves request permission to join a stream, or can be invited by a group administrator. The user can control his streaming session individually, moving to different parts of the stream whenever he chooses, or synchronize with the other users. Because both synchronization and flexibility are necessary in a collaborative media streaming system, the combination of media streaming and conferencing is quite a complex task.



Task

In order to achieve a both flexible and well-synchronized streaming system, an association service has to be designed which can set up and coordinate streaming sessions between a server and multiple clients. This project deals with the the synchronization of stream data between clients, given the relationships between them. The assocation service to be developed has to comply with IETF standards, in order to be compatible with all types of streaming servers. The association service is described by the figure below.


Fig 1. Association service



Synchronization Model

To ensure effective synchronization between multiple streaming clients in an unknown network environment (LAN or WAN), a virtual delay model with global clock synchronization is introduced. The virtual delay parameter defines the network's maximum round-trip delay, and, depending on whether LAN or WAN is used, it could vary from several milliseconds to a few seconds. Clients with a delay greater than the one defined by this parameter will fail to synchronize. The parameter's value can be statically or dynamically adjusted according to the current client's network state. With a value of zero, the streams are aligned by the range header, but playback is not synchronized. The synchronized clock ensures correct playback of the RTP payload.

There are two major use cases:

  • Without Synchronization (Group Administrator)

    In this case, the proxy only tracks the play position, because no synchronization is needed. This is done by adding a special header to the RTSP PLAY response, which informs the client software how long to buffer the media before playing.



    Fig 2. Tracking stream position


  • With Synchronization (Group Member)

    To synchronize the client with the current administrator's position, the proxy recalculates the value of the range header in the RTSP PLAY request. Then, the proxy inserts a special header to the RTSP PLAY response, which instructs the client software how long to buffer the media before playing.



    Fig 3. Synchronization by aligning streams and setting playback time




  • Links

    Collaborative Media Streaming
    RFC 2326 - Real Time Streaming Protocol (RTSP)
    RFC 1889 - RTP: A Transport Protocol for Real-Time Applications
    Real Time Streaming Protocol Information and Updates



    Kalin Velitchkov