Page 1 of 1
vlc CPU usage?
Posted: 06 Jan 2011 14:02
by xezoyu
Hello everybody,
I have a question about cpu usage. Namely, when I transcode stream from tv card using h264(x264) encoding cpu is almost all the time on 100% usage. Machine is DualCore on 3GHz with 2GB memory, OS is winXP. I tried to change "threads" parameter but it doesn't change anything.
One of transcode attempts is like this: "venc=x264{keyint=128,idrint=2,cabac=0,bframes=0},vcodec=h264,vb=1000,fps=30,width=640,height=480,threads=2,acodec=mp4a,ab=32,channels= 1,samplerate=44100}"
Is there a way to reduce that cpu usage?
What level of cpu usage is "normal" for h264 encoding using vlc?
Is there a difference using vlc and h264 encoding on windows vs. linux?
Thanks in advance.
Re: vlc CPU usage?
Posted: 06 Jan 2011 14:07
by Rémi Denis-Courmont
Transcoding should always take 100% CPU since VLC tries to convert as fast as possible.
Re: vlc CPU usage?
Posted: 06 Jan 2011 14:22
by xezoyu
Is there any parameter which can define encoding performance? Something like 'convert slow/medium/fast'?
I mean, it's not possible to have machine running 24x7 with 100% cpu usage ...
Re: vlc CPU usage?
Posted: 06 Jan 2011 14:43
by Sébastien Escudier
when transoding from a file, it should be 100% of CPU
But when transcoding from your tv card, you can reduce your cpu usage by reducing the fps.
Re: vlc CPU usage?
Posted: 06 Jan 2011 16:37
by xezoyu
As I said, I'm transcoding from tv card and I tried with some standard fps values(30, 25, 24) but cpu usage is always 100%. Right now, I tried with fps=15 but still cpu is lock on 100%.
Is there anything else I can try?
Re: vlc CPU usage?
Posted: 06 Jan 2011 16:52
by ammoun
Could you plz report CPU usage with MP4 codec?
Re: vlc CPU usage?
Posted: 07 Jan 2011 08:16
by Sébastien Escudier
ammoun, you meant MPEG4 I think...
Re: vlc CPU usage?
Posted: 08 Jan 2011 00:22
by ammoun
ammoun, you meant MPEG4 I think...
Right! Thanks Sébastien Escudier.
Re: vlc CPU usage?
Posted: 10 Jan 2011 12:47
by xezoyu
With these transcode settings "transcode{vcodec=mpeg4,vb=800,scale=1,acodec=mp4a,ab=128,channels=2,samplerate=44100}" CPU usage is between 75% and 95%. Rarely it goes below 75%, also rarely it goes up(above 95%).
Re: vlc CPU usage?
Posted: 10 Jan 2011 14:14
by Sébastien Escudier
That's very high...
Maybe your input access reads frame from the tv card too fast, and don't limit the fps ?
Re: vlc CPU usage?
Posted: 10 Jan 2011 14:46
by xezoyu
Sébastien Escudier said:
Maybe your input access reads frame from the tv card too fast
I'm not sure what that means and how I can check or change that?
Also, I tried to define fps using values 24, 25, 30 but that doesn't change anything.
Do you have any idea?
Re: vlc CPU usage?
Posted: 10 Jan 2011 15:00
by Sébastien Escudier
I just tested on linux and it takes 65% of my 2.4Ghz CPU, with mpeg4
But I don't know how the capture of the tv card works on windows...
Re: vlc CPU usage?
Posted: 10 Jan 2011 15:21
by xezoyu
Thanks, these days I'll try on linux and see if there is any difference.
Re: vlc CPU usage?
Posted: 22 Jan 2011 01:24
by viulian
I am streaming from a TV Card on Ubuntu 10.04 running on Intel Core 2 Duo E8500 3.16Ghz / 6Mb L2 Cache / 2Gb of RAM.
My CPU usage was 165% on average (and load at 2.00). It was so strange, that I had to look up online why the CPU would ever be shown more than 100% load. Seems standard on Linux, if you have more than one CPU or more cores.
I was transcoding with:
Code: Select all
setup vlc42 output #transcode{venc=x264,vcodec=h264,vb=512,scale=1,fps=25,threads=2,acodec=mpga,ab=96,channels=1,samplerate=22050}:std{access=http,mux=ts,dst=0.0.0.0:1234}
It seems that switching from threads=2 to threads=1 lowered the CPU usage in half to ~80%. It still encodes properly and I have no loss of quality.