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

Wim Taymans wim.taymans at gmail.com
Thu Dec 24 18:52:01 CET 2009


On Thu, 2009-12-24 at 19:13 +0200, Felipe Contreras wrote:
> 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. 

What do you mean with this? What do you define as a small buffer? How is
it not good? Anything in practice where this is a problem?

>From the improvements from switching from pulsesrc to alsasrc and then
some more when using a faster encoder, as stated above, your comment
needs some more explanation, IMO.

Wim


> 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.
> 






More information about the gstreamer-devel mailing list