Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

docs: describe MP4 export cancellation and its manual check

EtienneLescoteecb7e1b35d5
diff --git a/technical-documentation/architecture/export-pipeline.md b/technical-documentation/architecture/export-pipeline.md
index c94a9c1c7..ad8bc0bb2 100644
--- a/technical-documentation/architecture/export-pipeline.md
+++ b/technical-documentation/architecture/export-pipeline.md
@@ -110,6 +110,19 @@ and **one** encoder + muxer pair:
table, asserted by `outputFrameCount.test.ts` and by
`speed_segments_match_the_exporter_frame_totals`.
+- **Cancel stops between frames, and only a finished file is published.**
+ The dialog's Cancel reaches the same `ExportControl` the GIF export uses
+ ([`export_control.rs`](../../crates/compositor/src/export_control.rs)),
+ which `run_composited_multi_cancellable` checks before every frame. The
+ MP4 is muxed into a staged file beside the destination, named with the
+ destination's extension because ffmpeg picks the container from it, and
+ renamed over the destination only once the trailer is written. A
+ cancelled or failed run deletes the staged file and leaves an existing
+ destination untouched. Guards close the muxer on every exit, which
+ Windows requires: it refuses to delete a file ffmpeg still holds open.
+ Audio jobs already in flight are joined, so a cancel settles once they
+ finish.
+
- **Imported audio tracks** (voiceover / BGM / SFX, issue #350) are mixed
on top of the assembled programme by `audio.rs::mix_external_tracks`,
between `assemble_concatenated_pcm` and `finish_audio`. Each track's
diff --git a/technical-documentation/testing/manual-e2e-checklist.md b/technical-documentation/testing/manual-e2e-checklist.md
index 60095b9e2..de6dfdeaf 100644
--- a/technical-documentation/testing/manual-e2e-checklist.md
+++ b/technical-documentation/testing/manual-e2e-checklist.md
@@ -551,6 +551,7 @@ The dialog is one settings panel: *Format* (MP4 / GIF), *Quality* (720p, 1080p o
- [ ] Select GIF and confirm GIF frame-rate (15, 20, 25, 30 FPS), size (Small, Medium, Large, Original), and *Loop GIF* controls appear.
- [ ] Change GIF frame rate and size, toggle looping, and confirm the summary reflects the choices.
- [ ] Start an MP4 export with *Export MP4* and confirm the native rendering progress reports advancing frames or percentage.
+- [ ] During MP4 rendering, press Cancel and confirm it waits for native cleanup, returns to the same export options, leaves no partial MP4 (no `.openscreen-mp4-*.partial.mp4` beside the destination), and preserves an existing destination; retry and confirm a complete MP4 is saved.
- [ ] Confirm the export dialog reports *Saved to* with the output path after MP4 completes, and that *Show in folder* opens it.
- [ ] **v2.0.0** — Confirm the one-time star prompt under *Saved to*, when it appears, goes away on either answer and does not come back on the next export.
- [ ] **v2.0.0** — Export a take with speech at the Audio facet's default output level and measure it (`ffmpeg -i <file> -af ebur128=peak=sample -f null -`): integrated loudness about -16 LUFS (a very quiet voice gets at most +12 dB), true peak at most -1 dBTP (`ebur128=peak=true`). The limiter caps samples at -1.5 dBFS before the AAC encoder, which overshoots a little, so a file reading -1.4 dBFS is in spec.