In first place, it seems framerate dependant: i tried a slightly newer logitech (046d:0991), and it worked at a much higher resolution (1600x1200), with a much lower cpu utilization (around 25%). The framerate was pretty low, tough.
Now back to my webcam:
If i remove the overhead from jpegenc, the cpu consumption goes to 50-60% (in a core 2 duo machine, sigh ). The only way to further reduce seems to be to use a lower frame rate right from the camera.
For example:
uses under 15%. (5 FPS is the lowest framerate my camera will negotiate).
Of course, this would reduce the framerate in the preview window also...
So, it seems that beyond the jpegenc issue, it's all about gstreamer performance. The only way to optimize beyond that is to look into the pipeline configuration carefully.
Just to leave the results of a bit more testing.
In first place, it seems framerate dependant: i tried a slightly newer logitech (046d:0991), and it worked at a much higher resolution (1600x1200), with a much lower cpu utilization (around 25%). The framerate was pretty low, tough.
Now back to my webcam:
If i remove the overhead from jpegenc, the cpu consumption goes to 50-60% (in a core 2 duo machine, sigh ). The only way to further reduce seems to be to use a lower frame rate right from the camera.
For example:
# gst-launch-0.10 v4l2src ! ffmpegcolorspace ! ximagesink
uses 70% cpu, while
# gst-launch-0.10 v4l2src ! video/x- raw-yuv, framerate= 5/1 ! ffmpegcolorspace ! ximagesink
uses under 15%. (5 FPS is the lowest framerate my camera will negotiate).
Of course, this would reduce the framerate in the preview window also...
So, it seems that beyond the jpegenc issue, it's all about gstreamer performance. The only way to optimize beyond that is to look into the pipeline configuration carefully.