Hello Don,<br><br>is the <i>avformat_open_input </i>function<i> </i>taking long or maybe the <i>avformat_find_stream_info</i> ?<div><br></div><div>In the second case you have to reduce the maximal analyze duration of the AVFormatContext, you can do it like this:</div>
<div><br></div><div>
    pFormatCtx->max_analyze_duration = 1.0 * AV_TIME_BASE;<br><br>    // Retrieve stream information<br>    avformat_find_stream_info(pFormatCtx, NULL)</div><div><br></div><div>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.</div>
<div><br></div><div><br></div><div>Best regards,</div><div>Alex</div><div><br></div><div><br><div class="gmail_quote">2012/12/10 Don Moir <span dir="ltr"><<a href="mailto:donmoir@comcast.net" target="_blank">donmoir@comcast.net</a>></span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><u></u>





<div bgcolor="#ffffff"><div>
<div>> 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 </div>
<div> </div>
</div><div><font face="Arial">For the foscam F18918W the default http string is: 
(dont forget &pwd=)</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"><a href="http://x.x.x.x/videostream.asf?user=admin&pwd" target="_blank">http://x.x.x.x/videostream.asf?user=admin&pwd</a>=</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">For a list of possible strings for foscam cameras 
goto:</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial"><a href="http://www.ispyconnect.com/man.aspx?n=foscam" target="_blank">http://www.ispyconnect.com/man.aspx?n=foscam</a></font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">I dont have any problem connecting but the time is 
way off like 6 seconds plus so large delay in animation.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">I am assuming there is a way to control this but 
after looking around still don't know.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">If I just ignore the timing its perfect. ffplay has 
the same problem.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">I dont care about ffplay and this for internal 
code.</font></div>
<div><font face="Arial"></font> </div>
<div><font face="Arial">Alex, you got any info on this ?</font></div>
<div><font face="Arial"></font> </div></div>
<br>_______________________________________________<br>
Libav-user mailing list<br>
<a href="mailto:Libav-user@ffmpeg.org" target="_blank">Libav-user@ffmpeg.org</a><br>
<a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br>
<br></blockquote></div><br>
</div>