Add protocol documentation on RTSP

Originally committed as revision 25330 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Martin Storsjö 2010-10-04 07:06:58 +00:00
parent 59ac1da26d
commit 92c5052db9
1 changed files with 70 additions and 0 deletions

View File

@ -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.