Currently, Kdenlive's rendering dialog allows users to control the number of "processing threads". This setting is related to MLT's "threads" parameter. On fast multicore systems controlling only MLT's thread parameter leads to less than stellar MLT performance; this is because only encoding and decoding is parallized, but MLT's own multi-threading is not utilized. For instance, on a core i7 with H.264 footage this may use only 25% CPU, peaking sometimes at 30% (threads=8 real_time=-3). Dan Dennedy already pointed out in 2014 in this post here that MLT is correctly working multithreaded, albeit not optimized: https://forum.kde.org/viewtopic.php?f=265&t=122140#p317318 Now, when adding in the additionally MLT's real_time parameter, I can see a significantly better CPU utalization: around 50%, peaking in at 75% (threads=8 real_time=-3). So I would ask to add a further setting to the rendering dialog that allows to set the number of threads for MLT itself. In a first step, that may be simply a check box labelled "Enable MLT multi-threading". Alternatively, this could be a drop-down box allowing only for 1 and 3, corresponding with real_time=-1 and -3 respectively. Reproducible: Always
Using threads=8 and real_time=-3 I've rendered successfully a 12-minute project, with H.264 source footage, and rendering to H.264. The resulting .mp4 file plays fine, no corruptions or other issues to be found. My project uses several tracks simultaneously, combined using affine, composite, wipe at the same time.
It would be neat-o if this was disabled when a project has non-thread safe filters enabled in the project.