How to Limit CPU Usage

macOS specific usage questions
Haravikk
Blank Cone
Blank Cone
Posts: 11
Joined: 23 Jun 2011 19:37

How to Limit CPU Usage

Postby Haravikk » 10 Jan 2013 15:23

Okay, so I mostly use VLC for transcoding files, and it will normally use all cores of my machine. Now this is fine most of the time, but it interferes with running some programs while VLC transcodes in the background.

Since I don't normally need VLC to work as fast as possible, I'm happy for it to just run in the background with whatever free CPU load is left, but I'm not sure how best to restrict it. Is there an easy way to limit VLC to a smaller number of cores, or to lower its priority so other tasks will get the CPU time that they need?

Ideally without running VLC from command line, as I prefer to just open it as a regular app.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: How to Limit CPU Usage

Postby Jean-Baptiste Kempf » 10 Jan 2013 16:39

Yes, you can limit encoding threads, in x264 preferences.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

luxigo
New Cone
New Cone
Posts: 5
Joined: 19 Mar 2015 14:07

Re: How to Limit CPU Usage

Postby luxigo » 08 Sep 2016 18:37

For linux theres a package name "cpulimit", that allowed me cool my CPU down to 70°C (instead of 95°C) while loading a huge m3u playlist with remote files... (!)

fkuehne
Developer
Developer
Posts: 7241
Joined: 16 Mar 2004 19:37
VLC version: 0.4.6 - present
Operating System: Darwin
Location: Germany
Contact:

Re: How to Limit CPU Usage

Postby fkuehne » 12 Sep 2016 16:35

There are similar tools for the Mac.

Alternatively, as JB suggested, you can dive deep inside VLC's advanced preferences (VLC -> Preferences -> Show All) to the transcoding settings to limit the number of threads. You find the option "Number of Threads" in "Stream output" -> "Sout stream" -> "transcode" at the very bottom. "0" is the default value which means an "optimal" number of threads aka logical number of CPU cores * 1.5. Entering any integer will limit the number of used cores to that value.

Note that setting this option requires a restart of VLC.
VideoLAN
Felix Paul Kühne
Medic. VLC developer for appleOS since before you were born.
Blog: https://www.feepk.net


Return to “VLC media player for macOS Troubleshooting”

Who is online

Users browsing this forum: No registered users and 6 guests