Using the new V4L2 support versus mjpeg-streamer
Posted: Sun Mar 15, 2009 12:56 pm
Some people have suggested that it is better to use mjpeg-streamer rather than the new V4L2 support, since mjpeg-streamer only uses 1-2% CPU, and using native support in ZM would probably use more.
Has anyone actually tried this and compared CPU usage?
I have hit a brick wall with mjpeg-streamer as far as quality. Here is the issue. By default, mjpeg-streamer uses MJPEG mode, at 80% image quality. If you change the quality settings to anything (even to the same value, as in -q 80), mjpeg-streamer forces the mode to switch from MJPEG to YUV mode, which uses a TON of CPU. How much CPU? Check this out. This is two instances of mjpeg-streamer. One is using the default settings, the other is using "-q 80" for the input_uvc plugin:
As you can see, using the same jpeg quality setting (80), but in YUV mode (which you cannot override), is using 40% CPU compared to 1.9%!
So I guess where I am going with this, is I am wondering if ZM 1.24.x using native V4L2 mode on a UVC camera would allow setting the quality to greater than 80% and not go crazy with CPU usage!
Of course I have a reason for all of this...I have an application using Logitech Quickcam Pro 9000 units, and due to the image quality white objects at a distance are being washed out and losing details. After much twiddling with white balance settings and resolutions, I discovered that simply increasing the jpeg resolution fixed the problem, but then I am smacked by the CPU issue. With 6 cameras on a machine, having each of them using 40% CPU, before ZM is even running, is simply not an option! I have posted on the mjpeg-streamer forum on sourceforge explaining this issue as well.
Has anyone actually tried this and compared CPU usage?
I have hit a brick wall with mjpeg-streamer as far as quality. Here is the issue. By default, mjpeg-streamer uses MJPEG mode, at 80% image quality. If you change the quality settings to anything (even to the same value, as in -q 80), mjpeg-streamer forces the mode to switch from MJPEG to YUV mode, which uses a TON of CPU. How much CPU? Check this out. This is two instances of mjpeg-streamer. One is using the default settings, the other is using "-q 80" for the input_uvc plugin:
Code: Select all
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
19070 root 20 0 26280 3932 3128 S 40.7 0.2 0:04.92 mjpg_streamer
14653 root 20 0 46852 1832 1536 S 1.9 0.1 21:17.89 mjpg_streamer
So I guess where I am going with this, is I am wondering if ZM 1.24.x using native V4L2 mode on a UVC camera would allow setting the quality to greater than 80% and not go crazy with CPU usage!
Of course I have a reason for all of this...I have an application using Logitech Quickcam Pro 9000 units, and due to the image quality white objects at a distance are being washed out and losing details. After much twiddling with white balance settings and resolutions, I discovered that simply increasing the jpeg resolution fixed the problem, but then I am smacked by the CPU issue. With 6 cameras on a machine, having each of them using 40% CPU, before ZM is even running, is simply not an option! I have posted on the mjpeg-streamer forum on sourceforge explaining this issue as well.