<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sat, Jun 15, 2013 at 3:50 PM, Don Moir <span dir="ltr"><<a href="mailto:donmoir@comcast.net" target="_blank">donmoir@comcast.net</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">


2013/6/14 Matthew Einhorn <<a href="mailto:moiein2000@gmail.com" target="_blank">moiein2000@gmail.com</a>>:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Hi,<br>
<br>
I have a WANSCAM IP camare (AJ-C2WA-C198) which I'm testing in<br>
ffplay/ffmpeg. I noticed that playing it through its http address is much<br>
slower than when playing it with direct show. I'm linking to logs for both<br>
as run in ffplay.<br>
<br>
ffplay displayed the video through direct http access very slow and choppy<br>
using this command :ffplay -report -loglevel debug -i<br>
http://user:pwd@IP:99/<u></u>videostream.asf -an (see<br>
<a href="http://paste.ubuntu.com/5765942/" target="_blank">http://paste.ubuntu.com/<u></u>5765942/</a>).<br>
<br>
To use direct show, I installed a driver from <a href="http://alax.info/blog/1223" target="_blank">http://alax.info/blog/1223</a><br>
which converts a IP cam to direct show and the ffplay speed was faster<br>
although still choppy, even with a large realy time buffer. The command line<br>
was "ffplay -loglevel debug -report -f dshow -i "video=wanscam" -an<br>
-rtbufsize 1000000" (see <a href="http://paste.ubuntu.com/5765952/" target="_blank">http://paste.ubuntu.com/<u></u>5765952/</a>)<br>
<br>
Finally, viewing the camera directly from Firefox was much faster than<br>
either method and it wasn't choppy at all. I am looking for recommendations<br>
as to what I can do in ffmpeg to speed it up so that it's as fast as<br>
Firefox. In the end I'd be using the API not ffplay.<br>
</blockquote></blockquote>
<br></div>
It appears a filter is being used when using ffplay and could be a problem, but here's a few things I found when connecting to IP cam.<br>
<br>
Some of this might have changed since last time I checked which has been awhile.<br>
<br>
1) the probe time may effect the timestamps of the video packets. In other words, if it takes 5 seconds to do the probe, packet times can be 5 seconds late.<br>
<br>
2) audio can effect things quite a bit. For my IP camera its way out of sync and slowed things and so just did not bother with audio for the time being. It was way of sync with the installed software as well and not just ffmpeg.<br>


<br>
3) When I got down and dirty with the camera IP API things got better. I still believe that to get the best possible performance you need to 'know' the camera, meaning some database would be useful.<br>
<br>
4) I have a special interface for IP and USB cameras and not a generic interface. This is for a few reasons, but for one it is flagged to ignore timestamps. The timestamps are way off and I want to see the video in real time, not 5 to 10 seconds later.<br>


<br>
I have found there is a lot to check for IP cameras and various ways to interface. Normally there is going to be an optimal interface and you just need to play with it.<div class=""><div class="h5"><br>
<br></div></div></blockquote><div><br></div><div>Thanks for the replies. I believe I partially figured out how to get a nice fps, at least in vlc, now the question is how to achieve it in ffmpeg. I know very little about network protocols so I'm partially walking in the dark here. But this time I'm using the cam directly without any middleware.<br>

<br>Anyway, before,I streamed with <a href="http://xxx/videostream">http://xxx/videostream</a>.<b>asf</b> which resulted in slow speeds, even in VLC. Using <a href="http://xxx/videostream">http://xxx/videostream</a>.<b>cgi</b> instead (which is what firefox uses) with :network-caching=0 resulted in speeds as fast as firefox.<br>

<br></div><div>The problem is that when trying "ffplay -loglevel debug -analyzeduration 999999999 -probesize 999999999 <a href="http://CPL:lab@169.254.5.105:99/videostream.cgi">http://CPL:lab@169.254.5.105:99/videostream.cgi</a>" I get <br>

<br>Format ingenient probed with size=2048 and score=50q=    0B f=0/0<br>[ingenient @ 000000000277a2c0] File position before avformat_find_stream_info() is 0<br>[ingenient @ 000000000277a2c0] Could not find codec parameters for stream 0 (Video: mjpeg): unspecified size<br>

Consider increasing the value for the 'analyzeduration' and 'probesize' options<br>[ingenient @ 000000000277a2c0] File position after avformat_find_stream_info() is 4<br><a href="http://CPL:lab@169.254.5.105:99/videostream.cgi">http://CPL:lab@169.254.5.105:99/videostream.cgi</a>: could not find codec parameters<br>

[AVIOContext @ 0000000002779dc0] Statistics: 27 bytes read, 0 seeks<br></div><div><br></div><div>When I tried wgets on the link I get a 27 byte file (attached). I guess something is wrong with the stream, but vlc is able to read it so I'm wondering how I can get ffmpeg to read it as well? increasing probesize and analyzeduration has no effect.<br>

<br></div><div>Thanks,<br></div><div>Matt<br></div></div></div></div>