[gst-devel] How to decrease CPU consumation for audio recording?

Felipe Contreras felipe.contreras at gmail.com
Thu Dec 24 18:13:30 CET 2009


2009/12/17 Zhao, Halley <halley.zhao at intel.com>:
> Finally, I found out pulseaudio play a lot in the audio pipeline, if I access alsasrc, hw:0 directly, it could make %cpu half.
>
> Then I tried flac instead of vorbis, %CPU is decreased another half.

GStreamer is not good at handling very small buffers. Try playing with
alsasrc (or better pulsesrc) properties to generate bigger buffers.
Also try removing the queue because it will make a thread boundary and
there will be a lot of thread contention.

Somebody suggested using OProfile, I also recommend that. You can
generate profiles like this:
http://people.freedesktop.org/~felipec/profile/mp3-1.png

Cheers.

-- 
Felipe Contreras




More information about the gstreamer-devel mailing list