[gst-devel] This pipeline consume 100% CPU after resize x output window

Black Penguin gnomecn at gmail.com
Wed Aug 8 03:29:53 CEST 2007

Hi Andy

2007/8/8, Andy Wingo <wingo at pobox.com>:
> "Black Penguin" <gnomecn at gmail.com> writes:
> > gst-launch --gst-debug=2 v4lsrc copy-mode=false autoprobe=false
> > device=/dev/video1 ! video/x-raw-yuv,width=320,height=240 !
> > ffmpegcolorspace ! videobalance ! queue ! tee name=teexx teexx. !
> > queue ! timeoverlay ! videoscale ! ffmpegcolorspace ! ximagesink
> > teexx. ! queue ! ffmpegcolorspace ! fakesink silent=true
> >
> > It goes well when it start to run, But after resize the X output
> > window, it consume 100% CPU.
> This is because when it first starts, some of the filters can operate on
> the data in-place, without copying. For example, videoscale does nothing
> when it does not need to scale. After you resize, you effectively "turn
> videoscale on", hence the increase in CPU usage.
> Use xvimagesink if you can, or some other sink which supports scaling in
> hardware, without the need for software videoscale.

Thanks very much, I've tested xvimagesink on hardware which support
Xv, With out such issue even the videoscale still in the pipeline. and
I tried to remove the videoscale from the pipeline which use
ximagesink, It just consume 25~30% CPU resouce.

There is another issue: videoscale or ximagesink doesn't scale/show
the right image size. the image never be scaled to fit the resized
window's width and height, while it have consuming 100% CPU. There is
a black border around the image when window is lager than the image,
or image will be cliped while the window this samller then the image.

> Regards,
> Andy
> --
> http://wingolog.org/

More information about the gstreamer-devel mailing list