Repository navigation
fix(export): return the .mp4 path an MP4 export writes - #3416
Open
patrickballard wants to merge 1 commit into
Open
patrickballard wants to merge 1 commit into
patrickballard wants to merge 1 commit into
Conversation
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.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3415.
The MP4 exporter now sets the
.mp4extension 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 ...-o out.gifout.gif, writesout.mp4out.mp4-o out.webmout.webm, writesout.mp4out.mp4-o outout, writesout.mp4out.mp4-o out.mp4out.mp4out.mp4Tests
crates/export/tests/mp4_output_path.rs, ignored like the other export integration tests (it needs ffmpeg and a wgpu adapter): it exports toexport.gif,export.webmandexportand checks the returned path is the.mp4file 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 backexport.gif.cargo test -p cap-export --lib: 47 passed. Clippy: nothing in the changed files.rustfmtclean.--format gifand--format mov, which are unchanged.

Confidence 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
.mp4path they actually write..mp4file they write.Reviews (1) · Last reviewed commit: "fix(export): return the .mp4 path an MP4..." · Reviewed by Greptile