[FFmpeg-devel] avformat_find_stream_info() fails while reading rtsp stream

Michael Niedermayer michaelni at gmx.at
Sat Oct 6 19:33:29 CEST 2012


On Fri, Oct 05, 2012 at 11:45:09AM +0200, Audric Ackermann wrote:
> Hi,
> 
> I am currently developping an application for Android to read Mjpeg streams
> from a server which uses live555 to stream webcam.
> 
> Firstly I try this :
> 
>  if (avformat_open_input(&fmt_ctx, url, NULL, NULL) < 0) {
> LOGE("Could not open source file");
>         return 1;
>     }
>     else
> LOGI("File/url opened - OK");
> */
>     /* retrieve stream information */
>     if (avformat_find_stream_info(fmt_ctx, NULL) < 0) {
>         LOGE("Find streams informations - Fail");
>         return 1;
>     }
>     else
> LOGI("Find streams informations - OK");
> 
> 
> It works with url like
> rtsp://184.72.239.149/vod/mp4:BigBuckBunny_115k.mov(rtsp + h264), I
> can print image on the Android Application, but it fails
> in the opening with the server I use.
> I think it is because the server stream to multicast, so I had (found on
> Internet)
> 
>        AVDictionary* options = NULL;
> av_dict_set(&options, "rtsp_transport", "udp_multicast", 0);
> ret = avformat_open_input(&fmt_ctx, url, 0, &options);
> 
> if (ret!=0 || !fmt_ctx){
> LOGE("Source open - Fail");
> return 1;
> }
> else {
> LOGI("Source open - OK");
> }
>         if (avformat_find_stream_info(fmt_ctx, NULL) < 0) {
>                LOGE("Find streams informations - Fail");
> 
> I can open the stream, but now it fails while finding streams information,
> and I don't understand why.
> Have I missed something ?

does it work with ffmpeg itself ?
where exactly does it fail in avformat_find_stream_info() ?

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

What does censorship reveal? It reveals fear. -- Julian Assange
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121006/eb8bc816/attachment.asc>


More information about the ffmpeg-devel mailing list