[Live-devel] [Live_devel] mpg file does not finish immediately at EOF

Ross Finlayson finlayson at live555.com
Sun Jun 29 21:28:57 PDT 2014


But anyway - because your question applies to *any* ".mpg" file, I can answer it without seeing your file.

Because ".mpg" files (i.e., MPEG-1 or 2 audio+video Program Stream files) have a known duration, and can be seeked within, our RTSP server does not send a RTCP "BYE" packet when it reaches the end of the file.  This allows the RTSP client - if it wishes - to seek backwards within the file, and replay it.  I.e., for this type of file, the RTSP session is kept open when the server reaches the end of the file.  The RTSP client knows - from the stream's SDP description - the duration of the stream, and therefore may, if it wishes, explicitly close the session itself (by sending a RTSP "TEARDOWN") when it knows that this duration has elapsed.

Other types of file for which our server knows the duration (and therefore behaves the same way) are ".mp3" files, ".wav" files, ".dv" files, and ".mkv"/".webm" files.

For some other types of file - including ".264" video files - the server does not know the file duration (and does not support 'seeking' within the stream).  For these types of files, the server will send a RTCP "BYE" when it reaches the stream.  This will tell the RTSP client that the stream has ended.  (The RTSP client has no other way of knowing this, because it doesn't know the stream's duration in this case.)


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/20140629/d2f5b039/attachment.html>


More information about the live-devel mailing list