[Live-devel] RTCP BYE from the RTSP Server

Ross Finlayson finlayson at live555.com
Thu Mar 15 13:23:05 PDT 2012


> How to invoke a RTCP BYE message to the client from the RTSP Server application (e.g testOnDemandRTSPServer) ?

This will happen automatically when the stream ends - i.e., when the server reaches the end of the file that's being streamed.  There is nothing that you need to do to get this; the server will send this automatically.

There are exceptions to this, however.  If the file being streamed has a known 'range' - as reported in the SDP description that the server sends in response to the RTSP "DESCRIBE" - then the server will not send a RTCP "BYE" when it reaches the end of the file.  The reason for this is that files with a known range are typically also 'seekable'.  By not sending a RTCP "BYE" when the server reaches the end of this kind of file, the stream will be kept alive, which allows the client - if desired - to seek backwards in the stream, to replay part or all of it.

In our current implementation, the following file types are 'seekable', have a known 'range', and thus our server will *not* send a RTCP "BYE" when it reaches the end of a file:
- DV video files
- MP3 audio files
- MPEG Transport Stream files (with corresponding 'index' files)
- WAV audio files

A client that is receiving this kind of file therefore can't expect to receive a RTCP "BYE" to signal 'end of stream'.  Instead, it should call "MediaSession::playEndTime()" (and "MediaSession::playStartTime()") to figure out the duration of the stream, and set a timer for this duration.  (See, for example, the code for "testRTSPClient".)

Other kinds of files - e.g., AC-3, AAC, AMR, H.264, MPEG-4 - do not have a known 'range', are not 'seekable', and thus - for such files - the server *will* send a RTCP "BYE" when it reaches the end of the file.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120315/782b82ef/attachment.html>


More information about the live-devel mailing list