[Libav-user] How to send RTMP / AMF data with libavformat

Andrey Utkin andrey.krieger.utkin at gmail.com
Fri Jan 31 12:07:52 CET 2014


2014-01-29 Bradley O'Hearne <brado at bighillsoftware.com>:
> Hello,
>
> I am presently successfully streaming video / audio (RTMP) using libavformat. Basically I now need to have the RTMP connection process configure the receiving server for appending video (by default, a new video is created). Per the RTMP spec, this is accomplished by adding AMF data to the body of the RTMP connection request.
>
> I have the structure of the AMF data ready to go, but I do not know the proper way to configure (presumably) the AVOutputFormat or the AVFormatContext for this data. I would assume this can be done, as I'm pretty sure based on the FFmpeg documentation that this can be done with the command line binary.
>
> Can anyone lend some guidance to how to accomplish this?

Maybe give us an idea how does it work for you with command line.
Reviewing rtmp, librtmp protocols descriptions, i don't see such
option documented.
If there is such option, then use it through AVDictionary parameter to
avio_open2(). If not, then patch the protocol driver you use do add
that option, and use through AVDictionary parameter, and, optionally,
post the patch in ffmpeg-devel if your feature is something documented
and/or conventional for RTMP protocol.

-- 
Andrey Utkin


More information about the Libav-user mailing list