[Libav-user] How to connect to an IP camera in libav

Alexander Wischnewski aw.wisch at googlemail.com
Mon Dec 10 03:43:52 CET 2012


Hello Don,

is the *avformat_open_input *function* *taking long or maybe the *
avformat_find_stream_info* ?

In the second case you have to reduce the maximal analyze duration of
the AVFormatContext, you can do it like this:

    pFormatCtx->max_analyze_duration = 1.0 * AV_TIME_BASE;

    // Retrieve stream information
    avformat_find_stream_info(pFormatCtx, NULL)

Seems that the default value is set to a very high value to make sure there
are all important informations gathered, but this is not necessary for a
simple mjpeg stream. I even use this setting for decoding h264 streams and
had no problems so far.


Best regards,
Alex


2012/12/10 Don Moir <donmoir at comcast.net>

> **
> > I’m trying to connect to a Foscam MJpeg IP camera (http) using libav on
> Windows and am getting an error code of -5 after
>
> For the foscam F18918W the default http string is: (dont forget &pwd=)
>
> http://x.x.x.x/videostream.asf?user=admin&pwd=
>
> For a list of possible strings for foscam cameras goto:
>
> http://www.ispyconnect.com/man.aspx?n=foscam
>
> I dont have any problem connecting but the time is way off like 6 seconds
> plus so large delay in animation.
>
> I am assuming there is a way to control this but after looking around
> still don't know.
>
> If I just ignore the timing its perfect. ffplay has the same problem.
>
> I dont care about ffplay and this for internal code.
>
> Alex, you got any info on this ?
>
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20121210/bf94e5d4/attachment.html>


More information about the Libav-user mailing list