[Libav-user] IP cam accessing directly and from dshow speeddifferences.
donmoir at comcast.net
Sat Jun 15 21:50:08 CEST 2013
> 2013/6/14 Matthew Einhorn <moiein2000 at gmail.com>:
>> I have a WANSCAM IP camare (AJ-C2WA-C198) which I'm testing in
>> ffplay/ffmpeg. I noticed that playing it through its http address is much
>> slower than when playing it with direct show. I'm linking to logs for both
>> as run in ffplay.
>> ffplay displayed the video through direct http access very slow and choppy
>> using this command :ffplay -report -loglevel debug -i
>> http://user:pwd@IP:99/videostream.asf -an (see
>> To use direct show, I installed a driver from http://alax.info/blog/1223
>> which converts a IP cam to direct show and the ffplay speed was faster
>> although still choppy, even with a large realy time buffer. The command line
>> was "ffplay -loglevel debug -report -f dshow -i "video=wanscam" -an
>> -rtbufsize 1000000" (see http://paste.ubuntu.com/5765952/)
>> Finally, viewing the camera directly from Firefox was much faster than
>> either method and it wasn't choppy at all. I am looking for recommendations
>> as to what I can do in ffmpeg to speed it up so that it's as fast as
>> Firefox. In the end I'd be using the API not ffplay.
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
Some of this might have changed since last time I checked which has been awhile.
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.
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.
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.
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.
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.
More information about the Libav-user