73b9d30704
The writer removed its video, raw sound and log only when a take was cancelled, so an encoder error or a non-zero ffmpeg exit left them in the films folder. A failed take now removes exactly the files it wrote; the log's last lines move into the error, since the log itself goes. The encoder always writes <name>.video.mp4, and <name>.mp4 appears only after a successful mux or rename. A failed, cancelled or no-audio take therefore cannot overwrite or delete a film of an earlier export with the same name. The writer's entry point takes the ffmpeg and its arguments so a test can drive a failing encoder. Co-Authored-By: Kimi Code <noreply@moonshot.ai>