[FFmpeg-devel] [PATCH] Add protocol documentation on RTSP
Michael Niedermayer
michaelni
Sun Oct 3 22:56:53 CEST 2010
On Sun, Oct 03, 2010 at 10:45:13PM +0200, Stefano Sabatini wrote:
> On date Sunday 2010-10-03 13:18:09 +0300, Martin Storsj? encoded:
> > On Sun, 3 Oct 2010, Stefano Sabatini wrote:
> [...]
> > > > +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 @var{tcp} and @var{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
> > > > + at var{max_delay} field of AVFormatContext.
> > > > +
> > >
> > > > +With multi-bitrate streams in Real-RTSP, the streams to receive are chosen
> > > > +according to the @var{discard} field in AVStream. When watching such streams
> > >
> > > This needs more explanation. How it is possible to see which streams
> > > are received? What @var{discard} does represent? How can it be set
> > > via-commandline?
> >
> > Umm, I'm not sure what you want here. (In my defense: I've never used this
> > with Real-RTSP myself, but Ronald has described how it works, roughly, and
> > the applehttp demuxer works similarly.) The list of streams is shown on
> > startup both in ffplay and ffmpeg, so from that, you can choose video
> > stream 0, 1, 2 etc. If you didn't launch it with either one before, it's
> > of course hard to guess what values to use :-)
> >
> > I'm not sure it's necessary to describe how the discard field in AVStream
> > works here, it's mostly as a reference for developers so they know what to
> > look for. You can control it on commandline via -ast and -vst with ffplay
> > at least, as I describe in the next sentence.
> >
> > So, which part of this do you want in the docs?
>
> I double checked the doxy, and still can't understand what's the
> meaning of AVStream.discard.
>
> From AVStream.discard doxy:
> enum AVDiscard discard; ///< Selects which packets can be discarded at will and do not need to be demuxed.
>
> From avcodec.h doxy:
> enum AVDiscard{
> /* We leave some space between them for extensions (drop some
> * keyframes for intra-only or drop just some bidir frames). */
> AVDISCARD_NONE =-16, ///< discard nothing
> AVDISCARD_DEFAULT= 0, ///< discard useless packets like 0 size packets in avi
> AVDISCARD_NONREF = 8, ///< discard all non reference
> AVDISCARD_BIDIR = 16, ///< discard all bidirectional frames
> AVDISCARD_NONKEY = 32, ///< discard all frames except keyframes
> AVDISCARD_ALL = 48, ///< discard all
> };
>
> So AVStream.discard seems to control which packets should be
> discarded, rather than to select the stream to playback, and still I
> have no idea how/if it is possible to set it via commandline.
>
> So maybe, the sentence:
> the streams to receive are chosen according to the @var{discard} field in AVStream
>
> should be replaced by
> the packets to discard are chosen according to the @var{discard} field in AVStream
>
> That is, I can understand that it is possible to select one stream
> with a particular bitrate from a multi-bitrate streams set, but I
> still cannot understand what's the role of "discard" in this game.
you set all streams to AVDISCARD_ALL and one to AVDISCARD_NONE
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The bravest are surely those who have the clearest vision
of what is before them, glory and danger alike, and yet
notwithstanding go out to meet it. -- Thucydides
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101003/c4f99f6e/attachment.pgp>
More information about the ffmpeg-devel
mailing list