Bug 500588

Summary: Implement multithreading for rendering
Product: [Applications] kdenlive Reporter: Timwi <bugs.kde.org>
Component: Rendering & ExportAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED UPSTREAM    
Severity: normal CC: berndmj
Priority: NOR Keywords: triaged
Version First Reported In: 24.12.2   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Timwi 2025-02-22 18:28:10 UTC
SUMMARY

Rendering a video currently appears to be single-threaded.

OBSERVED RESULT

On my 8-core CPU (and no GPU), the rendering process uses about 10–12% CPU (i.e. close to 1/8th) according to both Task Manager and Process Hacker.

EXPECTED RESULT

I understand that encoding the video itself (handled by ffmpeg) is not easily multithreadable. However, the rendering of frames which employ graphics effects/filters can be multithreaded by rendering frames in advance before sending them off to ffmpeg.
Comment 1 Timwi 2025-03-20 22:48:35 UTC
I have now learned that there’s actually an option in the Rendering dialog that allows me to use multiple threads. I set it to 8 and that does appear to considerably speed up the rendering (though only by a factor of 3, not 8). Perhaps that option should be set to the maximum by default?
Comment 2 Timwi 2025-03-20 23:16:38 UTC
Scratch that — I trusted the option, but it turns out it doesn’t actually speed anything up, it’s still using only one CPU core, and the reason I thought it sped up by a factor of 3 is just because the beginning of my video renders faster than the rest.
Comment 3 Timwi 2025-03-21 14:16:59 UTC
I have now learned that this is entirely up to melt, not kdenlive, so I reported the same thing to the melt team.
https://github.com/mltframework/mlt/issues/1077