Bug 500588 - Implement multithreading for rendering
Summary: Implement multithreading for rendering
Status: RESOLVED UPSTREAM
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: 24.12.2
Platform: Microsoft Windows Microsoft Windows
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2025-02-22 18:28 UTC by Timwi
Modified: 2025-03-26 17:06 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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