[vlc-devel] swscale painfully slow on slow machine: Workaround found

jboileau jboileau at gmail.com
Tue Oct 6 22:48:46 CEST 2009


I have found a workaround to my problem, so I thought I would share it
in case it helps someone else.

I have dramatically diminished the CPU usage by setting these two options:

Overlay Video Output = disable
Use video buffers in system memory = enable (this is under directx)

Of course there is a loss in quality, but for us it is usable. The CPU
usage went from 100% to about 40% with two QVGA (320x240) players
playing and resizing CIF (352×288) streams.

Jacques Boileau


------------------------------------------------

Hi,

I have come accross a problem with VLC when it needs to resize a video
to fit the window it needs to play in on some hardware. As a
comparaison, I have done the same test with MPlayer to see if it is a
limitation of the hardware we are using or if different players behave
differently.

If the window is the exact same size as the video, no resizing needed,
both players use around 5% of the cpu. But when the window is a bit
smaller than the video it needs to play, forcing resizing, MPLayer
still only uses 5% of the cpu but VLC uses 85% to 95% of the cpu. The
swscale plugin seems to be inneficient in this configuration.

I have tried playing with some of the preferences without any luck.
Does anyone have any ideas of what options I could play with that
might help get the cpu usage down? Is swscale known to be inneficient
with some hardware configurations? Is there an alternative to swscale?

The machine configuration: Celeron 1ghz using Windows XP embedded and
a basic graphics card, the kind that is part of the motherboard. I am
trying to play h264 video 320x240. My tests where done with 'overlay'
disabled in VLC since with overlay enabled I get even poorer results.

PCs with better CPUs and better graphic cards do not exhibit this
behaviour. For example, my dual core laptop with nVidia graphic cards
does not give me significant CPU usage difference as on the above
hardware.

Any help would be greatly appreciated.

Thanks,

Jacques Boileau



More information about the vlc-devel mailing list