[FFmpeg-devel] [PATCH] Add protocol documentation on RTSP

Ronald S. Bultje rsbultje
Sun Oct 3 22:58:47 CEST 2010


Hi,

On Sun, Oct 3, 2010 at 4:45 PM, Stefano Sabatini
<stefano.sabatini-lala at poste.it> wrote:
> 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.

You don't select streams. That would be highly limiting. Imagine I
have an input stream using 3 inputs (french, english and german), but
since I'm dutch I hate germans and so I want only french and english.
I set AVStream.discard for german to DISCARD_ALL and for the others to
_NONE.

By using appropriate values for all streams in a file/.., I can select
a stream or a set of streams etc. For ffplay all this is pointless
because my brain can't parse french and english together, hence the
-ast/-vst convenience commandline options.

Ronald



More information about the ffmpeg-devel mailing list