Skip to content

fix(export): return the .mp4 path an MP4 export writes - #3416

Open
patrickballard wants to merge 1 commit into
CapSoftware:mainfrom
patrickballard:fix/cli-mp4-output-path
Open

patrickballard wants to merge 1 commit into
CapSoftware:mainfrom
patrickballard:fix/cli-mp4-output-path

Conversation

@patrickballard

@patrickballard patrickballard commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Closes #3415.

The MP4 exporter now sets the .mp4 extension on its output path before exporting, the same way the GIF exporter sets .gif, so the path it returns is the file it wrote. A path that already ends in .mp4, which every desktop export does, is unchanged.

cap export rec.cap ... before after
-o out.gif reports out.gif, writes out.mp4 reports and writes out.mp4
-o out.webm reports out.webm, writes out.mp4 reports and writes out.mp4
-o out reports out, writes out.mp4 reports and writes out.mp4
-o out.mp4 out.mp4 out.mp4

Tests

  • New crates/export/tests/mp4_output_path.rs, ignored like the other export integration tests (it needs ffmpeg and a wgpu adapter): it exports to export.gif, export.webm and export and checks the returned path is the .mp4 file written. Run locally (with a stand-in for the ffmpeg CLI that writes a 1-second test video), it passes, and fails without the change: it gets back export.gif.
  • cargo test -p cap-export --lib: 47 passed. Clippy: nothing in the changed files. rustfmt clean.
  • Checked end to end with a release build of the CLI: the cases above, plus --format gif and --format mov, which are unchanged.

RetriggerView in GreptileConfidence Score: 5/5

The PR appears safe to merge; it makes the returned MP4 path match the file already being written.

Summary

MP4 exports now return the .mp4 path they actually write.

  • MP4 exports return the path of the .mp4 file they write.

Reviews (1) · Last reviewed commit: "fix(export): return the .mp4 path an MP4..." · Reviewed by Greptile

MP4File always writes to an .mp4 path, but the MP4 exporter returned the
path it was given, so `cap export -o out.gif` reported out.gif while
writing out.mp4. Give the output path the .mp4 extension up front, as
the GIF exporter does for .gif.
@vercel

vercel Bot commented Oct 26, 2026

Copy link
Copy Markdown
Contributor

@patrickballard is attempting to deploy a commit to the Cap Software Inc Team on Vercel.

A member of the Team first needs to authorize it.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cap export reports a path it didn't write when -o doesn't end in .mp4

1 participant