MLV-App icon indicating copy to clipboard operation
MLV-App copied to clipboard

Multithreaded CinemaDNG export

Open BenjaminNavarro opened this issue 1 year ago • 4 comments

I just started using MLV-App and I have an hour long video to export in CinemaDNG which takes forever. So I looked at the CPU usage and saw that only one core was used. The disk usage seems to be around 50MB/s so I'm pretty confident that parallelizing the export would bring a significant speedup, probably around 8x for my hardware. And since it's converting still frames to individual files it should be pretty easy to do.

Is there any reason why the export is single threaded? I haven't looked at the code yet but I'm willing to try to make a PR for this

BenjaminNavarro avatar Jun 22 '23 06:06 BenjaminNavarro

Yes, there is a reason: the lossless de-/compression works just single threaded. If you find another solution, feel free to make a PR. If you use MLVFS, you already have that multithreaded, because this app can handle multiple clips at once, which is not possible in MLVApp.

masc4ii avatar Jun 22 '23 06:06 masc4ii

Yes, there is a reason: the lossless de-/compression works just single threaded.

On a MacBook Pro 14-inch, nov. 2023 M3 Pro 18 GB I see MLV App is able to utilize all available CPU resources when exporting CinemaDNG (Lossless).

IMG_9290 IMG_9291 IMG_9292

I've used the M04-1815.MLV sample from https://drive.google.com/drive/folders/1rE6AHE-up7u_5mnWnLjW7h8g3dLopiUG for reference.

So I looked at the CPU usage and saw that only one core was used.

Is there an explanation why my test seems to show more than 1 core being used during export?

Jip-Hop avatar Apr 17 '24 09:04 Jip-Hop

The DNG export itself is still single threaded. But for being able to export, a MLV must be loaded, RAW Corrections have to be done, (etc. etc.). And this is multithreaded.

masc4ii avatar Apr 17 '24 15:04 masc4ii

The DNG export itself is still single threaded

In my case it appears not to be a bottleneck since the export process can max out the CPU resources of the MacBook regardless...

Jip-Hop avatar Apr 18 '24 19:04 Jip-Hop