From 92c5052db971a2a3dfb7c3fc4317b55f401d7811 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 4 Oct 2010 07:06:58 +0000 Subject: [PATCH] Add protocol documentation on RTSP Originally committed as revision 25330 to svn://svn.ffmpeg.org/ffmpeg/trunk --- doc/protocols.texi | 70 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/doc/protocols.texi b/doc/protocols.texi index 4f7b42e872..e6a71f8c8d 100644 --- a/doc/protocols.texi +++ b/doc/protocols.texi @@ -217,6 +217,76 @@ ffplay "rtmp://myserver/live/mystream live=1" Real-Time Protocol. +@section rtsp + +RTSP is not technically a protocol handler in libavformat, it is a demuxer +and muxer. The demuxer supports both normal RTSP (with data transferred +over RTP; this is used by e.g. Apple and Microsoft) and Real-RTSP (with +data transferred over RDT). + +The muxer can be used to send a stream using RTSP ANNOUNCE to a server +supporting it (currently Darwin Streaming Server and Mischa Spiegelmock's +RTSP server, @url{http://github.com/revmischa/rtsp-server}). + +The required syntax for a RTSP url is: +@example +rtsp://@var{hostname}[:@var{port}]/@var{path}[?@var{options}] +@end example + +@var{options} is a @code{&}-separated list. The following options +are supported: + +@table @option + +@item udp +Use UDP as lower transport protocol. + +@item tcp +Use TCP (interleaving within the RTSP control channel) as lower +transport protocol. + +@item multicast +Use UDP multicast as lower transport protocol. + +@item http +Use HTTP tunneling as lower transport protocol, which is useful for +passing proxies. +@end table + +Multiple lower transport protocols may be specified, in that case they are +tried one at a time (if the setup of one fails, the next one is tried). +For the muxer, only the @code{tcp} and @code{udp} options are supported. + +When receiving data over UDP, the demuxer tries to reorder received packets +(since they may arrive out of order, or packets may get lost totally). In +order for this to be enabled, a maximum delay must be specified in the +@code{max_delay} field of AVFormatContext. + +When watching multi-bitrate Real-RTSP streams with @file{ffplay}, the +streams to display can be chosen with @code{-vst} @var{n} and +@code{-ast} @var{n} for video and audio respectively, and can be switched +on the fly by pressing @code{v} and @code{a}. + +Example command lines: + +To watch a stream over UDP, with a max reordering delay of 0.5 seconds: + +@example +ffplay -max_delay 500000 rtsp://server/video.mp4?udp +@end example + +To watch a stream tunneled over HTTP: + +@example +ffplay rtsp://server/video.mp4?http +@end example + +To send a stream in realtime to a RTSP server, for others to watch: + +@example +ffmpeg -re -i @var{input} -f rtsp -muxdelay 0.1 rtsp://server/live.sdp +@end example + @section tcp Trasmission Control Protocol.