https://bugs.kde.org/show_bug.cgi?id=526650
Jean-Baptiste Mardelle <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Latest Commit|https://invent.kde.org/mult |https://invent.kde.org/mult |imedia/kdenlive/-/commit/41 |imedia/kdenlive/-/commit/73 |24bf6f1614076b3bcf5f1bd3aeb |7712ffb75fd93a5019359e82df0 |aefe9c4b338 |4084afee6cc --- Comment #6 from Jean-Baptiste Mardelle <[email protected]> --- Git commit 737712ffb75fd93a5019359e82df04084afee6cc by Jean-Baptiste Mardelle, on behalf of Parth Kumar Singh. Committed on 12/11/2026 at 17:30. Pushed by mardelle into branch 'release/26.12'. Estimate the memory needed by a render for the low memory warning The low memory warning in the render dialog used thresholds based on a percentage of the total RAM (10% / 5%), so machines with a lot of RAM got the warning while several GB were still free. Free swap was ignored too (see bug 526650). As discussed with Eugen, this replaces the first version (an option to disable the warning) with a better calculation: - The memory needed is estimated from the render itself when it starts: width x height x 4 bytes x (25 + render threads), since MLT keeps its 25-frame consumer buffer plus about one frame per thread in memory. It uses the final output size, so rescale and preview resolution are taken into account. - The warning is shown below max(1000 MB, estimate), the "very low" error below max(500 MB, estimate / 2). No more percentage of total RAM. - Free swap is counted as available memory (KMemoryInfo never overestimates it, also on Windows and macOS). - The fallback that set both thresholds to 1000 MB is gone. Tests (render to MPEG-2, estimate compared with the measured peak RAM of an MLT render of the same footage): | Footage | Estimate | Measured | |---------|----------|----------| | 1080p, 1 thread | 205 MB | 208 MB | | 4K, 1 thread | 822 MB | 604 MB | | 4K, 4 threads | 917 MB | 897 MB | | 4K rescaled to 1080p, 4 t | 229 MB | 318 MB | All renders finished without a false warning, and all 41 unit tests pass. For 8K the estimate would be \~3.4 GB (I couldn't test that on my machine). Update: as suggested by Bernd, the minimum threshold is now a setting in Settings \> Environment ("Warn when free memory during rendering is below", 1000 MB by default), with a warning that a too low value can lead to aborted renders. The "very low" level is half of it, the render estimate still raises the thresholds when needed (e.g. 4K / 8K), and 0 disables the warning. Update: after the review, the threshold is now a setting in Settings \> Environment ("Warn when free memory during rendering is below"). The default is "Automatic", which uses the estimate above. If the user sets a manual value, it is used as is (the "very low" level is half of it) and a warning explains that a too low value can lead to renders being aborted without warning. Tested: with the setting at 100000 MB the warning appears during a render ("Less than 11893MB of available memory remaining", which also shows that swap is now counted). With the setting at 0 no warning is shown for the same render. Default 1000 MB behaves like before. M +25 -12 src/dialogs/renderwidget.cpp M +3 -0 src/dialogs/renderwidget.h M +3 -0 src/dialogs/settings/kdenlivesettingsdialog.cpp M +6 -0 src/kdenlivesettings.kcfg M +70 -1 src/ui/configenv_ui.ui https://invent.kde.org/multimedia/kdenlive/-/commit/737712ffb75fd93a5019359e82df04084afee6cc -- You are receiving this mail because: You are watching all bug changes.
