2x mjpeg 1600x1200@8fps performance tips
Posted: Sun Nov 08, 2009 3:31 pm
Hi,
I bought 2 vivotek fd7160 cameras. So far they are great, mjpeg is clean, with all the headers and bits and they are performing nicely. They are capable of 1600x1200 mjpeg stream at 15fps.
However my dual core AMD 4400+ server with 2GB RAM can't keep up. I thought this wouldn't be a problem, but I have just one camera connected now at 1600x1200 as "modect" and it's streaming 8fps live but only recording 3.7fps for the events. So far it seems the processor is the bottleneck
Network is 1gbit, between the camera and the server, there is a 1gbit switch. The network is not a problem, camera needs 10mbit at most to stream conveniently.
When I set the camera as monitor, the CPU usage drops noticeably, but the camera is useless to me then
When I set it as record the CPU usage drops slightly, but not that dramatically as I would expect (zma 40% CPU, zmc 30% CPU)
Modect is crazy (zma 70% CPU, zmc 30% CPU).
What is the problem? I know that decompressing a JPEG that big is a lot of work, but still, this is a pretty good CPU.
Any tips? I can live with one of the cameras working at 800x600 but one of them must be 1600x1200 because I want to be able to zoom it. Can I somehow use the motion detection the cameras offer? The cameras can do RTSP with MPEG, would that be noticeably faster (I can't get it to work as of now, but I know it's doable, I am using it with another Vivotek camera). What about the motion detection only checking half of the frames, skipping one frame in between?
I am using Debian Sid, amd64 so MMX, SSE2 and other optimizations should be turned on for libjpeg62 and other libs. I can't think of anything else.
Thanks a lot, I am a newbie in this area but I know Linux and C so if needed, I can hack a thing or two.
I bought 2 vivotek fd7160 cameras. So far they are great, mjpeg is clean, with all the headers and bits and they are performing nicely. They are capable of 1600x1200 mjpeg stream at 15fps.
However my dual core AMD 4400+ server with 2GB RAM can't keep up. I thought this wouldn't be a problem, but I have just one camera connected now at 1600x1200 as "modect" and it's streaming 8fps live but only recording 3.7fps for the events. So far it seems the processor is the bottleneck
Network is 1gbit, between the camera and the server, there is a 1gbit switch. The network is not a problem, camera needs 10mbit at most to stream conveniently.
When I set the camera as monitor, the CPU usage drops noticeably, but the camera is useless to me then
When I set it as record the CPU usage drops slightly, but not that dramatically as I would expect (zma 40% CPU, zmc 30% CPU)
Modect is crazy (zma 70% CPU, zmc 30% CPU).
What is the problem? I know that decompressing a JPEG that big is a lot of work, but still, this is a pretty good CPU.
Any tips? I can live with one of the cameras working at 800x600 but one of them must be 1600x1200 because I want to be able to zoom it. Can I somehow use the motion detection the cameras offer? The cameras can do RTSP with MPEG, would that be noticeably faster (I can't get it to work as of now, but I know it's doable, I am using it with another Vivotek camera). What about the motion detection only checking half of the frames, skipping one frame in between?
I am using Debian Sid, amd64 so MMX, SSE2 and other optimizations should be turned on for libjpeg62 and other libs. I can't think of anything else.
Thanks a lot, I am a newbie in this area but I know Linux and C so if needed, I can hack a thing or two.