[Libav-user] [libav-user] demuxing of incoming rtp stream by means of libavformat and custom IO

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Feb 24 11:56:01 CET 2012

2012/2/24 Dmitry Volyntsev <xeioexception at gmail.com>:
> I found out the answer by myself. May be it could be useful for other
> ffmpeg newbies.
> It is impossible to feed only rtp stream to libav for just depacketising
> purpose without establishing rtsp input by means of libav

It is possible, although inconvenient. libavformat has good RTSP
protocol client, so usially there's no need to take another one.

> //! Demuxer will use avio_open, no opened file should be provided by the
> caller.
> #define AVFMT_NOFILE        0x0001
> [rtp @ 0x8d2500] Custom AVIOContext makes no sense and will be ignored with
> AVFMT_NOFILE format.
> ./libavformat/rtspenc.c:    .flags = AVFMT_NOFILE | AVFMT_GLOBALHEADER,
> ./libavformat/rtsp.c:    .flags = AVFMT_NOFILE,
> ./libavformat/rtspdec.c:    .flags = AVFMT_NOFILE,
>     /*
>      * I/O context.
>      *
>      * decoding: either set by the user before avformat_open_input() (then
>      * the user must close it manually) or set by avformat_open_input().
>      * encoding: set by the user.
>      *
>      * Do NOT set this field if AVFMT_NOFILE flag is set in
>      * iformat/oformat.flags. In such a case, the (de)muxer will handle
>      * I/O in some other way and this field will be NULL.
>      */
>     AVIOContext *pb;

In both of your letters, you wrote lots of low-level stuff that is not
so closely relevant to question you ask.
Next time, be more concise. We're glad to help anyone who asks, but
it's hard to comprehend long and confused letters.

Without meaning to be rude,
Andrey Utkin

More information about the Libav-user mailing list