[FFmpeg-devel] rtmp support and librtmp
Howard Chu
hyc
Tue Apr 27 00:19:13 CEST 2010
Pavel Pavlov wrote:
> Hello all,
> I'm using ffmpeg (libavformat) to read rtmp stream and I had lots of problems with it, so I decided to scrap that code. Then for rtmp I started to use original c++ librtmp from xbmc (xbox media center) and right away all my problems went away.
>
> Since librtmp (http://rtmpdump.mplayerhq.hu/) was based on that librtmp from xbmc I thought that if I compile in librtmp then I'd also get the same nice results.
>
> However, it appears that with librtmp compiled in I cannot even open file anymore and I get in log:
> "24: Received FLV packet before play()! Ignoring."
> and av_open_input_file returns -1
>
>
> I use this sequence to read files:
>
> av_open_input_file()
> av_find_stream_info()
>
> loop : av_read_frame()
>
>
> is there something special that I need to do in order to be able to use new librtmp and ffmpeg? In case if it matters, the file is regular flv (created with ffmpeg) served from wowza streaming server.
> Among problems with regular (without librtmp) build of ffmpeg were: quite unstable playback, freezing of playback, if the stream did not have sound then it would freeze on start up for quite a while (av_find_stream_info could take like 10 secs and usually when stream is video only it would take longer to return). With librtmp from xbmc it would work just as expected: no delays and freezing, so I guess that if I compile in librtmp support into ffmpeg I'd get the same nice results, but so far it breaks on the first step. Can you please tell me if there is anything wrong with what I'm doing? Thanks
Wowza server does quite a few things differently from genuine Adobe servers.
librtmp has been tested mainly against Adobe servers. Your best bet is to see
how your stream behaves using rtmpdump first, and ask about this on the
rtmpdump mailing list.
ffmpeg's use of librtmp involves only a few API calls; anything that might be
wrong in librtmp will have to be discussed and fixed on the rtmpdump list.
--
-- Howard Chu
CTO, Symas Corp. http://www.symas.com
Director, Highland Sun http://highlandsun.com/hyc/
Chief Architect, OpenLDAP http://www.openldap.org/project/
More information about the ffmpeg-devel
mailing list