[Libav-user] Streaming RTMP
andrey.krieger.utkin at gmail.com
Thu Aug 16 08:20:32 CEST 2012
2012/8/10 Olivier Durécu <olivier.durecu at gmail.com>:
> Hi experts,
> I am trying to use FFMpeg from my app to stream a RTMP flow
> I have a piece a code working fine to generate a local FLV file. And I
> thought that it would be enough to replace my filename by the RTMP url when
> allocating the AVFormatContext to have RTMP streaming... but nothing
> happens. And even setting the debug log level doesn't say anything
> My code is very "standard"
> AVFormatContext *oc;
> avformat_alloc_output_context2(&oc, NULL, "FLV",
> then adding AVStream for audio and video
> And using av_interleaved_write_frame to write the encoded packets.
> Anyone has a clue ?
I assume you have RTMP server and you want to publish your stream to
it as a client. Are you sure you have correctly configured the server
to percept a stream on this URL?
Seems correct at first sight then, although usually you have to pass
some options in URL.
Sniff the TCP traffic on 1935 port to further investigate the situation.
Check libavformat debug messages (set loglevel to debug).
To check this issue without chance of having bug in your app, try it
with ffmpeg utility.
ffmpeg -i my.flv -c copy rtmp://127.0.0.1:1935/live/test.flv -loglevel debug
More information about the Libav-user