how to make full use of dual core CPU for camera recording?

Zhao, Halley halley.zhao at intel.com
Wed Dec 14 16:53:08 PST 2011


Thanks Stefan.
I made mistake to past the command line, here is the one I use.
gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=15/1 ! tee name=t ! ffmpegcolorspace ! queue ! ximagesink t. ! ffmpegcolorspace ! queue ! theoraenc ! oggmux name=mux ! filesink location=test.ogg alsasrc device="hw:0" ! queue ! audiorate ! audio/x-raw-int,rate=44100 ! audioconvert ! flacenc ! queue ! mux.


'top' shows one CPU is pretty busy in majority time (up to 97%); in the rest time, 2 CPU usage is balanced. (since my platform is 2 core 4 thread, I'm not sure the load is balanced on 2 core or 1core/2threads).
Maybe it is caused by theoraenc is not multi-threaded, I'll dig more.



From: gstreamer-devel-bounces+halley.zhao=intel.com at lists.freedesktop.org [mailto:gstreamer-devel-bounces+halley.zhao=intel.com at lists.freedesktop.org] On Behalf Of Stefan Sauer
Sent: Wednesday, December 14, 2011 7:00 PM
To: gstreamer-devel at lists.freedesktop.org
Subject: Re: how to make full use of dual core CPU for camera recording?

On 12/14/2011 10:29 AM, Zhao, Halley wrote:
Hi Experts:

On a dual core platform, my gst command line only use half CPU. How could I improve recording performance by using more CPU?
Here is my command line:
gst-launch-0.10 v4l2src ! video/x-raw-yuv,width=640,height=480,framerate=15/1 !ffmpegcolorspace ! tee name=t t. ! queue ! oggmux name=mux ! queue ! filesink location=test.ogv alsasrc device="hw:0" ! queue ! audiorate ! audio/x-raw-int,rate=44100 ! audioconvert ! flacenc ! queue ! mux.

This already uses several threads to encode audio and video and write the muxed stream. Imho the "tee name=t t. ! queue" in front of oggmux is unused. Also I don't see any video encoder in your pipeline. Using a multithreaded encoder coudl help to better utilize the available copu cores (especially if the encoder is heavy).

Stefan



While latest cheese(use camerabin) can utilize more CPU to achieve better performance? What's the difference?
Thanks.






_______________________________________________

gstreamer-devel mailing list

gstreamer-devel at lists.freedesktop.org<mailto:gstreamer-devel at lists.freedesktop.org>

http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20111215/da709fb6/attachment.html>


More information about the gstreamer-devel mailing list