Export fail (out of memory) - valid mp4 with progress so far?

Here’s the situation: I have a 55min project which exported fine for over 1h but failed at ~85% sadly due to filling out the entire ram (I think melt.exe reached a max of 25GB out of the 32GB I have).

I think it is fair to assume that the first 85% or so of the file has been properly encoded and written to disk into the 1.4GB .mp4 file I now have, but sadly the file fails to playback and ffprobe complains about “moov atom not found”. I also assume that if instead of exporting to .mp4 I’d have used .jpegs or some smarter container I’d still have the first ~85% of the export.

My suggestion: melt already checks to see what the available RAM is, can it somehow decide at 1% available RAM to send a finish command to the encoder and properly add whatever metadata is needed to the file to retain what has already been worked on? (of course, append some info to the file name to show it ended prematurely at frame #xyz)
This way not I can easily just export the rest of the video and merge it with ffmpeg or any of the many tools that do this losslessly.

PS: I’ve succesfully finished the encode by exporting it in 3 parts with range markers. It’s weird that it succeeds this way, it means there’s no “bad” file that suddenly spikes to infinity but it just slowly grows in time, I’d assume old video data is released from RAM after a few minutes as it’ll never be reused again but probably there’s more to this and I can’t provide a short project to reproduce it.

Found out randomly today that the partial playback is possible if I export to .mkv (matroska) or .webm files. They both allow playback at any point during the export and also if the export fails after 10% or 2 minutes you can just keep the 10% / 2 minutes as they are fully working by themselves.

So, if you need this, choose the .mkv container type (but make sure your devices can read it, it’s not as supported as .mp4).