Page 1 of 2

VLC 0.72 and subtitles = 100 % CPU usage

Posted: 23 May 2004 11:11
by mironicus
I am using Windows XP and installed VLC 0.72 today.

If I playback just an XVID or DIVX-avi the CPU usage is low as ever: 0-2%

But if I turn subtitles on (OGM/MKV) the cpu usage goes up to 100% every time a subtitle is displayed and the video begins to stutter. If no subtitle is displayed the cpu usage is back to normal (0-2%). In my experience I had this problem since I began to use VLC (0.70 was the first version I used).

A little tip: The subtitle routine in FFDSHOW is very fine und good looking - and it don't use any cpu power. Could the programmer include this routine in VLC? :wink:

Posted: 23 May 2004 11:38
by Sigmund
I've personally never seen this behaviour. I'm certain the subtitle code does not require that much cpu, so you must have triggered some obscure bug. Any furter info you may give will be welcome.

Same problem but random

Posted: 23 May 2004 15:28
by Guest
Hi all,

I have the same problem related to the CPU 100% but it is random.

The process that drives nuts is not vcl.exe but explorer.exe

I use a WinXP SP1.

Regards,
Irene

Posted: 23 May 2004 15:28
by Sigmund
hahaha

Is it that funny?

Posted: 23 May 2004 15:32
by Guest
Is it that funny?

Posted: 23 May 2004 20:25
by maxxxp
I've the same problem of mironicus, with mkv and ogm i've 100% cpu and video begins to stutter when the subtitles are displayed only, the process is vlc.exe (not explorer, to me).
I've a notebook with winxp sp1, 512 mb ram, geforce4 go and athlon xp 2000+ mobile.
I've tried the 0.7.1 and the 0.7.2 final with the same problem.

Posted: 23 May 2004 20:38
by markfm
Unfortunately, I have to agree with Sigmund, that XP is a joke. My work PC is an 800 MHz P4 laptop, 512 MB, Win2K Pro, no problems ever with VLC, even with a bunch of office apps running.

My home PC is a 2.6 GHz P4, WinXP home edition.

In both cases the machines are fully patched, latest drivers, but periodically the XP machine just plain goes bats&^t on CPU use. I've had several driver-related issues under XP, things I haven't seen with Win2K. If you hit an application problem once or twice under XP, it seems like all hope is gone, need to reboot -- there's residual garbage/corruption. This is totally unacceptable in an OS -- apps are NOT supposed to be able to mess with core services in ways that toast the machine.

I can't believe MS is dropping support for Win2K, with a piece of junk OS like XP the "better" replacement for it.

Enough of a rant -- I actually do like Win2K, just REALLY loathe XP.

Posted: 23 May 2004 22:04
by maxxxp
But for my/our problem?
I not think that is a problem of conflicts, it's only vlc.exe that use full cpu.
I reboot winxp also but nothing.
All the others players (i've a lot...) works great.

Posted: 23 May 2004 22:21
by markfm
Is there a sample file, one that pegs your CPU?

Posted: 23 May 2004 22:51
by maxxxp
I've cut the original mkv with vdub and removed the audio, the problem remains.

High CPU-usage when displaying subs (.srt) confirmed

Posted: 23 May 2004 23:32
by pernas
Hi !

I just wanted to confirm that i also noted high CPU-usage while text (.srt) is visible.
Measured this with both 0.71 and 0.72 but i don't have any stuttering problems during playback.

Using a Pentium M @ 1.4G wih XP SP 1.
CPU-usage raised from <5% to apprx. 40% for one line of text
Up to 80% for two lines of text.

Regards,
Per
Sweden

Posted: 24 May 2004 00:15
by markfm
Max --
I downloaded your sample onto my PC, WinXP.
Using perfmon to check CPU use.
Running the file, nothing on but video, is maximum 4.7% CPU, average < 1%.
Then I turned subtitles on.
Short subtitles (looks like under, say, 15 characters) don't seem to have much impact, if any. Middle subtitles, about 36 characters, use about 33% of CPU. A big subtitle, looks like 75 characters or so, is using about 78% of CPU, peak.

So, it looks like it's using up almost 1% of CPU on a 2.6GHz machine for each subtitle character being generated -- kind of hefty.

Posted: 24 May 2004 01:11
by The DJ
I second this behaviour.
It's weird and should be investigated......

Posted: 24 May 2004 04:54
by Paul Bludov
I bet you have a DirectX/Driver problem.

I can repro this bug, but only in overlay-less mode (add to vlcrc)

[vout_directx] # DirectX video output
overlay=0

In this mode, the CPU got 100%.

-Paul[/b]

Posted: 24 May 2004 19:05
by maxxxp
Thanks for the tests, to all.
I think i've some problems with the registry of window, the mkv without subtitle use the 60% of cpu!
I'll try to reinstall windows.
But the overlay is activated, without it the cpu is 100% for all the time of video, with and without subtitle.
Now the question is : why the subtitule use all that cpu?
It's not right.

Posted: 24 May 2004 19:57
by markfm
I agree, Max -- the numbers I posted yesterday were with overlay active. It looks like there is something which uses a lot of CPU, and is proportional to the length of the subtitle.

Posted: 02 Jun 2004 00:24
by Goner
what would be normal CPU usage for vlc, without subtitles ??

i'm using 0.7.2 and it averages 60 - 70% and regularly takes >90% on an Athlon XP 1700+ with 512Mb memory running Windows 2000 Pro SP4, DirectX 9.0b, streaming a DVD (wired & wireless).

just curious ...

Posted: 02 Jun 2004 18:19
by Gibalou
I optimised this a bit in the development version but subtitles rendering is still very CPU hungry because of how the black outlining is done.

Posted: 03 Jun 2004 01:28
by markfm
Perhaps a silly idea, but maybe put the subtitles into an independent text window, analogous to the way the main video window is/was separate from the control window?

That would remove the processing overhead of shoveling the subtitles into the individual display frames (I assume, probably incorrectly, that the CPU overhead is related to actually filling in the pixels in the video with the black background + text).

The subtitle window could have the bare minimum frame, not even a close box if that is possible (close it based on whatever event triggers closing the actual video display window)

If people wanted to drag the subtitle window on top of the video window, fine, else it could just be located below the main window (similar to the control window normally being above the video display frame)

Is it hard to generate a standard text window, selecting white font color with a black window background color?

Posted: 04 Jun 2004 01:53
by Guest
I can only repeat what others have noticed, using subtitles with this version is impossible, it's too heavy on the cpu so the video and sound doesn't play smoothly anymore. I had to downgrade to previous version (0.7.1) which plays subs without probs.

Posted: 04 Jun 2004 09:57
by Goner
just watched a DVD, "Return of the King" with english subtitles and it played very smooth ...

0.7.2 on Windows 2000 SP4 and Athlon XP1700+, 32Mb GeForce2 MX, 512 Mb memory.

Posted: 04 Jun 2004 10:48
by The DJ
DVD uses a diffent kind of subtitles.

Posted: 04 Jun 2004 11:12
by Guest
Yeah, I would presume that DVDs are different. The files I have major problems with are ogm and mkv files with embedded subs.

Posted: 21 Jun 2004 15:52
by Muele
Perhaps a silly idea, but maybe put the subtitles into an independent text window, analogous to the way the main video window is/was separate from the control window?
I strongly second that suggestion.

It would solve several of my problems in one go:
-Performance.

-Subs being hard to read on white background when displayed on my tv (even though there is that little black border around each letter).

-Sub-textsize. When viewed on my 21" tv from a distance of 4 metres, its really hard to read those small subs. In a pure text-window, I guess it would be quite easy to enable some scaling of the size.

BR Muele

Posted: 01 Jul 2004 17:35
by Frater Kork
Has there been any developers on this issue?
I am seeing the same probs with subs causing jerky video because the CPU goes smack in the roof...

Win2kPro-sp4 P4@2Ghz 512 Ram Dx9.0b and overlay enabled

Cheers!