Make rendered mp4 video files playable even if the user aborted the render.
for MP4 format, you have to "finalize" the file when creating it to be able to read the video, so when a render fails or is aborted by the user, the video is unreadable. I wonder if it wouldn't be possible to finalize the file when the user stops the render mid way? Even if there is small drawbacks like the last frame glitchy, that would be sufficient for a rough check.
3 Comments
I don't think blender can do anything about this, as this is simply how video files work. You can expect the same result from any other software exporting video files. If you're suffering from small glitches etc, I HIGHLY suggest rendering in image sequences!! That's what they are for, and it's what they use when making movies, along with lots of other advantages!
Of course I render EXR sequence for the final render, but for quick previewing, a video output is often very useful. But Yeah, I suspect that there is a technical limitation preventing this kind of finalization on the fly....
Containers like Matroska (MKV) don’t have this problem because they’re designed to be streamable and tolerant of interruption, so partially written files remain readable. MP4/MOV, on the other hand, do require a finalization step that writes global metadata at the end of the file.
AFAICT these container metadata depends on finalized timestamps, sample tables, keyframe indexes, and encoder state. Maybe Blender could be able to guestimate some of these from the last frame number that was rendered, but i'm not sure, and that alone doesn't seem enough to safely finalize an MP4/MOV. And it wouldn't work at all in case of crashes.
TL;DR: use Matroska or no video formats at all.
Even for quick previewing, you can read it as a sequence in Blender's previewer or in many production tools like rv, or djv.