Limit CPU core/thread's used at export?

Hi! Love the program and got almost everything figured out and setup the way I need it to be. But I have a really ugly and frustrating problem with it still.

Fast version: I can’t find or figure out a way to make shotcut use a set amount of threads and run dual pass. Right now I can have it render at 100% cpu usage or like 70% usage. I like to have it run at maby 30-50% without having to babysit my damn computer and time it when dual pass hits.

Background:

When I start to export a video the CPU usage hits 100% and I have to fight my way to task manager and limit the CPU usage on the qmelt.exe to even browse the web like normal. Yea it’s good that it uses all my CPU but not when I like to do outher stuff at the same time. I got this CPU to render and do stuff at the same time.

Now ok I can deal with having to go into task manager and set it manually when I start exporting. But I run dual pass on most of my videos and the next pass is reset to use all threads! If I’m watching a movie or playing a game from nowhere the hole PC slows down into a grinding hault big time. And that’s not why I must have this fixt badly! My exported video get’s damaged most of the time due to the huge resource demand just ruining the whole point of rendering in the first place!

(English not my first language. Hard to explain what the damage is but ruins the hole video you workt on!)

I7 6700k with a Noctua NH-D15. It’s not overheating trust me… I can’t get my fans setup to go above 60% usage at full cpu load overclockt in a hot room. 47 celsius hottest core 7h render.

Instead of changing the priority of the qmelt.exe after it starts, you could try setting the priority of Shotcut.exe before you start rendering. My understanding is that any subprocesses should inherit the priority of the parent process.

??? Really? Holy shit it works! I was sure shotcut.exe had nothing to do with it due to the encoding program is like a new application starting up when you hit export.

Yea lauching Shotcut with a affinity set makes qmelt also lauch at the same affinity. Sounds to simpel to even try something like that but it works! Thanks a lot! I hope someone else find this helpful! Had no ide affinity work this way but yea.

I find this topic interesting because my old rig had a 4 core AMD APU (GPU/CPU on the same chip) and I never had a problem running other applications while Shotcut was Exporting. If I hadn’t checked the CPU utilization I never would have noticed application sharing effects.

-=Ken=-

If anyone have problems with CPU usage I have two things to say now that I know better.

  1. Dual pass was making my system unstable. Not blue screen or anything but laggy and horrible. Never going to touch it again. My main problem was due to this thing. Even launching with affinity set it was laggy and unstable.

  2. Setting Shotcut affinity did the job perfect! But I warn you that it makes Shotcut less responsive in editing. (kinda obvius) But to export a big thums up if you like to game and render!

The next Shotcut release will automatically set the priority of Job processes to “low”.

That’s a great change but will we be able to stop that behavior on systems that are more dedicated in their usage?

I can’t think of a reason that you would want to. It will still use as many resources as are available. It will just take lower priority than other processes. If you have a dedicated machine, then there won’t be any other processes and so the process will get all the resources.

I think it would be good if the user could control the priority of the job process like with Avidemux.
You can set the encoding process priority in preferences.

image

Also you can change it during the encoding process.

image

IMHO this would be a good addition to Shotcut’s capabilities.

Though this is an old topic I would like to say that I also would like to see some option to reduce CPU load built-in into Shotcut. Even if it is faster I still hate to see temperatures getting above 60C of my not so new processor…

But to all Linux users, there is a way to limit this via cputool. For instance:

cputool --cpu-limit 50 -p 4540

will limit Shotcut to 50% CPU load per core. That is slower, no doubt, but at the same time, way cooler.

1 Like

Shotcut already uses low process/task priority for the export, which should make using other programs nicer while export runs. This applies to all operating systems as of v18.05 or later.

If you want to reduce CPU usage to prevent over-heating or loud fans, here are the easy (in Shotcut UI) ways to reduce CPU usage today that works on any operating system:

  1. In Export, turn ON Use hardware encoder
  2. In Export > Advanced > Video, turn OFF Parallel processing (already off on 32-bit build or < 3 CPU threads/cores)
  3. In Export > Advanced > Codec, set Codec threads to something low (0 is typically = #CPU threads). This does not apply when using hardware encoder.

Thanks, but maybe hw acceleration is not working in Linux version or not with open-sourced Nouveau. E.g.

…And in 19.01.27 I don’t even see anything resembling Parallel processing option in Advanced > Video tab:

Sorry, as I’m a new user I had to split the message to show to 2 screenshots.

It works with NVENC or VA-API depending on your hardware and driver. Nouveau is not supported.

And in 19.01.27 I don’t even see anything resembling Parallel processing

You have less than 3 CPU threads/cores (as mentioned). At the very least, export is going to occupy one CPU with decoding & processing and the other with encoding. All you can do in the UI to reduce is set the codec threads to 1.

Although this is an Old Thread, I Have made a Spot on Video for this topic-