Conversation
Exports can now remux the video/audio streams without re-encoding via a Mode (Re-encode / Copy) choice in the save dialog, preselectable with Ctrl+Shift+S for a near-instant cut that snaps to the nearest keyframe. Force original size for stream-copy exports A copy cut never decodes the streams, so a scaleHeight passed alongside copy would silently be ignored. Zero it in exportClip to make the no-scaling contract self-enforcing, and cover it with a test that asks for a downscale in copy mode.
|
Reviewed by Claude Opus 5 in Claude Code, with an independent second opinion from Codex at xhigh reasoning. The declared suite ran on a disposable Omarchy VM ( The copy export keeps the footage it trimmed away, and it is recoverable
That produced a 2.03s playable file whose first frame is the source at t=5.000 — the two seconds the user cut off. For a trimmer that is the finding that matters: someone who trims the head off a screen recording because of what is in it still ships it. The same material is what any reader that does not apply edit lists shows, and such a reader reports the clip as 7.012s rather than 5.000s. The size cost is bounded by the source's keyframe interval, which omacut never looks at. A 60s source with a single keyframe, trimmed 45.000 → 48.000, produced a 12,087,123-byte file containing 1440 video packets (48s of content, first packet at pts -45.000), where re-encoding the same 3 seconds is 458,921 bytes. A more ordinary 1080p60 source with a 2s keyframe interval, trimmed 12.4 → 16.4, gave 15.3 MB copied against 6.1 MB re-encoded. "Near-instant, always original size" is accurate; it is the third number that is missing. So README.md:33 and the comments at src/ffmpeg.cpp:140-145 and src/ffmpeg.h:34-36 describe the wrong failure. The cut does not snap to the nearest keyframe — the playback start is exact, and the file carries up to a full keyframe interval of hidden pre-roll. Which way to resolve that is a design call rather than something to patch in review: snapping The end is not exact eitherCodex raised this and it reproduces. Copy mode is offered for inputs that cannot be remuxed into MP4The open filter advertises
A codec check before offering Copy, or a fallback to re-encode when the muxer refuses, would turn both into something other than a surprise. Checked and clean
The new tests cannot catch any of the aboveThe fixture is Overlap with #4PR #4 extends exactly the same signatures with a different extra parameter — Nothing was pushed to this branch: each finding above needs a product decision rather than a patch. Waiting on you and the maintainer. |
|
Speaking to the overlap with number four, I did try merging that code into a later test branch and got it rebased, a decision I made to keep both functionalities is, if cropping, to disallow the fast copy. If a user crops and hits the fast copy shortcut it just continues to the normal export and re-encodes like normal |
|
This is the rebase of my fast-copy and #4 as well as with added multifile/drag video. i didn't want to iterate to much on it until something was merged into main though https://github.com/JDay-IT/omacut/tree/multifile-cropping-fastcopy |
When cutting video, i'm usually just looking to trim to the right spots of a video not re-encode. This option allows for instant cutting without waiting for encoding
--- AI Summary
Exports can now remux the video/audio streams without re-encoding via a Mode (Re-encode / Copy) choice in the save dialog, preselectable with Ctrl+Shift+S for a near-instant cut that snaps to the nearest keyframe.
Force original size for stream-copy exports
A copy cut never decodes the streams, so a scaleHeight passed alongside copy would silently be ignored. Zero it in exportClip to make the no-scaling contract self-enforcing, and cover it with a test that asks for a downscale in copy mode.