Page 1 of 1

MJPEG playback high CPU usage

Posted: 22 Nov 2011 22:38
by xerces8
Hi!

Using VLC 1.1.11 on Windows 7 SP1 64 bit, I noticed it uses much more CPU than Windows Media Player when playing MJPEG movies (in AVI container).

VLC uses about 66%, while WMP 20% for the same file.

This is similar on two PCs.
One netbook with Atom N270 (1.6 GHz one core, two threads) and one HP Microserver (AMD N36L dual core at 1.30 GHz), both having Windows 7 (netbook 32 bit, server 64 bit).

On another older PC, it is the opposite. The VLC is using 2x less CPU than WMP (WMP 11 on Windows XP in this case. On Win7 it is WMP 12).

This all with the same test file: 640x480 30 FPS AVI file, made by a Sony DSC-W530 photo camera .

Re: MJPEG playback high CPU usage

Posted: 23 Nov 2011 00:00
by xerces8
I tried another file (from another camera, this time 720p, again in MJPEG).

Now WMP 12 uses 30-35% CPU, while VLC is at 100% and is skipping frames.

On the third PC, both players are at 100% and skipping frames. (this one has an Athlon XP2200+ CPU)

Re: MJPEG playback high CPU usage

Posted: 23 Nov 2011 16:20
by VLC_help
Is there some sample file you could share to us?

Re: MJPEG playback high CPU usage

Posted: 23 Nov 2011 22:28
by xerces8
I put one 7 MB sample here: http://www.sendspace.com/file/iqoj84

Re: MJPEG playback high CPU usage

Posted: 24 Nov 2011 18:50
by VLC_help
Thanks. I will check that during weekend.

Re: MJPEG playback high CPU usage

Posted: 25 Nov 2011 20:41
by xerces8
I checked the test file on an HP nw8440 laptop (Core2 Duo T7200, Windows XP):
- VLC 1.1.11 : 13 % CPU
- WMP 11: 17 % CPU

And on a desktop PC with Pentium 4 530 CPU and Windows XP:
- VLC 1.1.11 : 15 % CPU
- WMP 9: 20 % CPU

Re: MJPEG playback high CPU usage

Posted: 25 Nov 2011 21:27
by xerces8
And on another laptop with T6500 and Vista:
- VLC 1.1.11 : 27 %
- WMP 11 : 27 %

Re: MJPEG playback high CPU usage

Posted: 26 Nov 2011 18:00
by Jean-Baptiste Kempf
Which are normal, no?

Re: MJPEG playback high CPU usage

Posted: 26 Nov 2011 19:12
by xerces8
Yes, the problem are the cases with a factor 3 difference.

Re: MJPEG playback high CPU usage

Posted: 26 Nov 2011 19:53
by xerces8
It is already low when using WMP. This thread is not about that.

---

I tried under Ubuntu 11.10 64 bit "live boot" and VLC 1.1.12 on the HP server. The output of top is:

Code: Select all

top - 18:51:07 up 18 min, 9 users, load average: 0.21, 0.47, 0.41 Tasks: 153 total, 2 running, 151 sleeping, 0 stopped, 0 zombie Cpu(s): 47.2%us, 10.0%sy, 0.0%ni, 42.4%id, 0.0%wa, 0.3%hi, 0.0%si, 0.0%st Mem: 4962040k total, 1284960k used, 3677080k free, 63524k buffers Swap: 0k total, 0k used, 0k free, 432720k cached PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND 7180 ubuntu 20 0 828m 56m 26m S 49 1.2 0:25.40 vlc 3500 ubuntu 9 -11 286m 4824 3008 S 29 0.1 0:12.77 pulseaudio 5199 ubuntu 20 0 566m 83m 21m S 15 1.7 0:54.00 compiz 5097 root 20 0 227m 51m 9.9m S 15 1.1 0:46.46 Xorg 6866 ubuntu 20 0 311m 20m 10m R 11 0.4 0:11.22 gnome-terminal 7091 root 20 0 0 0 0 S 1 0.0 0:00.74 kworker/1:0