View unanswered posts | View active topics It is currently Tue Dec 23, 2014 6:05 am



Reply to topic  [ 6 posts ] 
Any way to control/limit MJPEG fps ? 
Author Message

Joined: Sun Jan 16, 2011 8:18 am
Posts: 11
Post Any way to control/limit MJPEG fps ?
Hi,

Got a few of those Foscam knockoffs for my home. These IP cams provide 3 ways to get audio/video feed from the cameras:-

1) Snapshot cgi (client pull -- single Image only)
2) MJPEG cgi (server push -- Video only)
3) ASF cgi (server push -- Audio-ADPCM, Video-MJPEG)

Now my need is to capture both audio and video, but at very low video frame-rates. However, from what I've understood about MJPEG, there is no way to set the MJPEG source fps. Is this correct ?

Apparently, the camera has a Internet-Explorer only OCX, that (I think) reduces the display-fps, while the server-fps (rate of push) is high.

Initially I thought of doing snapshot.cgi (client pull) for say something like 1fps video, and pick the audio stream from the .asf, however the .asf will also contain MJPEG video at full fps, i.e. how fast the camera's encoding processor can spew out frames! Any alternatives ?

thanks,
bdm


Fri Feb 18, 2011 8:30 pm
Profile

Joined: Wed Jan 11, 2006 1:19 pm
Posts: 442
Post 
If you're doing low fps, use the jpg.

Some cameras (Axis) allow you to set the mjpeg fps by default or by url (&req_fps=5) but most of the cheaper bracket just throw as much as they can at you. That fps varies depending on the number of simultaneous viewers so isn't even slightly predictable. zm just discards frames it doesn't want if it gets too many, but that does use some cpu.

If you're unsure, watch the system load AND fps on each method at the fps you desire. At low, fps, jpg will be better. At high, mjpeg. Also less chance of going out of sequence at higher fps with mjpeg.

But... no idea how you're going to achieve the audio bit you want. zm doesn't do that.


Sat Feb 19, 2011 8:58 am
Profile
User avatar

Joined: Mon Mar 26, 2007 7:07 am
Posts: 1106
Location: Las Vegas, Nevada
Post 
ABout 2/3 of the way down http://howto-pages.org/ffmpeg/

ffmpeg -i mandelbrot.flv -vn -acodec copy mandelbrot.mp3

will strip the audio off the file.

_________________
GOOGLE TUTORIAL


Sat Feb 19, 2011 9:34 pm
Profile YIM

Joined: Sun Jan 16, 2011 8:18 am
Posts: 11
Post 
Thanks @Flash_.

Flash_ wrote:
If you're doing low fps, use the jpg.

I guess, for low fps the repeated http requests don't add significant overhead, so it might just be fine.

Flash_ wrote:
Some cameras (Axis) allow you to set the mjpeg fps by default or by url (&req_fps=5) but most of the cheaper bracket just throw as much as they can at you. That fps varies depending on the number of simultaneous viewers so isn't even slightly predictable. zm just discards frames it doesn't want if it gets too many, but that does use some cpu.

Ok, great. Clearly you get what you pay for. In my case max. no. of viewers would be 2 at the most, however I just can't seem to get over 7-8fps in all my tests so far. This is with just 1 user connected to cam. My test setup however is somewhat crude. I just use mplayer to play first 500 frames and measure time taken to do so using unix 'time'.

Flash_ wrote:
If you're unsure, watch the system load AND fps on each method at the fps you desire. At low, fps, jpg will be better. At high, mjpeg. Also less chance of going out of sequence at higher fps with mjpeg.

Ok, good idea of watching the system load and fps. BTW, by watching fps, do you mean the one shown by ZM ? I'm yet to get a good hang of ZM's fps reporting. I am guessing it's the fps which ZM restreams, not the incoming fps.

Flash_ wrote:
But... no idea how you're going to achieve the audio bit you want. zm doesn't do that.

Found some old posts with another FOSS tool called "listener" to do this task, but then it doesn't do streamed audio/video capture, but only from local /dev/audio on linux box.


Sun Feb 20, 2011 5:12 am
Profile

Joined: Sun Jan 16, 2011 8:18 am
Posts: 11
Post 
Thanks kingofkya.

kingofkya wrote:
ABout 2/3 of the way down http://howto-pages.org/ffmpeg/

ffmpeg -i mandelbrot.flv -vn -acodec copy mandelbrot.mp3

will strip the audio off the file.


Right, but that command is extracting audio from a local .flv file. What I need to do is extract audio, on the fly, from streaming ASF file (audio+video stream).

After a bit of searching found about mplayer and mencoder, which may be able to do similar thing, but then I am really missing the nice features of another FOSS project "listener" which is Vox, voice activated recording.
[/u]


Sun Feb 20, 2011 5:17 am
Profile

Joined: Tue Mar 29, 2011 12:53 pm
Posts: 1
Post Re: Any way to control/limit MJPEG fps ?
You can only run this OOB becuase of the crossdomain.xml policy goodness in Silverlight. The cameras don't have this file on their internal webserver, so browser-based Silverlight won't work at all. That said, even OOB apps can't modify the User-Agent header either via the Headers collection or the UserAgent property.

_________________
textile exporters like dyed fabric, bed sheets, curtains, fabric, duvet and printed fabric only at The Textile Icon (thetextileicon)


Tue Mar 29, 2011 12:57 pm
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 6 posts ] 

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group