High CPU usage when cutting videos

What is your operating system?
Debian 10

What is your Shotcut version (see Help > About Shotcut)? Is it 32-bit?
20.09.27. 64 bit. Portable tar.

Can you repeat the problem? If so, what are the steps?
(Please be specific and use the names as seen in Shotcut, preferably English. Include a screenshot or screen recording if you can. Also, you can attach logs from either View > Application Log or right-click a job and choose View Log.)

When I load clip from playlist to preview, it first plays ok, but when I start to cut it (mark teh start of required piece by pressing ‘i’), and then continue to play, my CPU usage skyrockets and playback starts to hang. This behavior started about 4-5 days ago, never had such issues before.
I could probably do something with settings to cause it (I tweaked something in hardware encoder without really knowing what I do, or may be it was after I started to have problems, I am not 100% sure), but I have installed new version since then and would expect all setting to reset (perhaps I am wrong here) as I use portable tar.

Does that mean the clip is in the Source player or in the Timeline?

I am sorry I do not know what would cause this. Maybe it has a problem with this file, and you can try Properties > Convert to see if it works better on the converted file. Hardware encoder only applies to Export and not to this.
Maybe it is related to the Setting > Video Mode. What is that set to?
What is Settings > Display Method?

1 Like

Yes, the clip is in the source player.
I doubt any problems are with the file as I use this camera for couple years now, did not change video settings recently and never had issues working with them in shotcut. I will still try to convert to see if it helps.
Video Mode is set to Automatic. Display Method is OpenGL.

So I tried convertion, it did not change anything, same high CPU usage

Settings does not reset with a new version even on portable. You can reset them:
https://shotcut.org/notes/configuration/

I do not know what the problem is, and I do not reproduce it. Is settings > realtime turned on?

1 Like

No, Realtime is not turned on.
I found my Shotcut.conf, what do I need to do to reset it? Just delete it, and new one will be created automatically?

Try with it on.

I found my Shotcut.conf, what do I need to do to reset it?

You can remove it or simply move it to a different folder if you want to save it in case you restore it.

Removing config file helped. I don’t see such a high CPU usage anymore, and playback during editing is much better.
I’ve noticed that in default settings Realtime is activated, so I put old config file back and activated Realtime. It helped with CPU usage. So I thought that was the reason. Then I refreshed config file again, and removed Realtime in default config file. I did not see any difference compared with Realtime being on when using default (fresh) config.
So I compared old (bad) config file with new one. Apart from layout and interface settings, main differences are that “bad” config has following settings that new one doesn’t:

[encode]
useHardware=false

[player]
progressive=false
realtime=false
scrubAudio=false

[proxy]
useHardware=false

I don’t know if any of these could be the reason for high CPU usage and poor playback.

Thank you for your help!

I believe realtime is the only explanation for it because, in addition to turning off dropping video frames as needed, it turns on frame-threaded parallelism (same as Export > Video > Parallel processing). Without realtime, when you start playback it tries to read, decode, and process frames using up to 4 threads depending on your CPU count. That can have a net higher CPU usage for simple playback scenarios (not much processing) because more threads require context switching and synchronization.