Repository navigation
Release v0.31.0: loudness to a delivery target, a dry-run-safe and resilient caption --cloud, three lint checks - #158
Merged
Merged
Conversation
- caption --cloud: the editor-API calls share one request-and-refusal path; an offline test now drives the whole recognition exchange. - caption: one rule set decides which options contradict --words and --cloud, used by the CLI and the caption module alike. - whisper: the binary-name-to-dialect rule lives beside the dialect names. - restore: choosing the .bak or a history step, and refusing a changed one, lives beside the integrity check it applies. - animations: one per-slot table replaces the repeated in/out/combo ternaries. No change to CLI output, help, the describe registry, library exports or the shipped type declarations.
capcut loudness <project> measures every audible clip with ffmpeg's ebur128 meter over the part of its media the timeline plays, and estimates the export's integrated loudness. --target <LUFS> adds the gain that reaches it, one gain for the whole mix (keeps the balance) or per clip with --per-clip, capped by --max-gain-db (default 20). --apply writes it as segment volume through the journaled save, so restore can undo it.
… effect - caption --cloud --dry-run used to upload the audio and only skip the save. It now sends nothing and reports what it would upload (file, size, length, destination), the way translate sends nothing in a dry run. The caption module also refuses to upload under --dry-run for any other caller. - --language with --cloud warns that CapCut's recognition detects the spoken language itself (the request carries no language), instead of being silently ignored.
…audio - Every request has a time limit (60 s; the audio upload gets one more second per 128 KiB), so a stalled connection no longer hangs the run. - Calls that are safe to repeat (signing, the upload-node lookup, status polls) are tried up to three times on a dropped connection, a time-out, 429 or 5xx, with a growing pause. The upload, its commit and the task creation are never repeated. - The wait for the recognition is 2 minutes plus half the audio's length (at most 30 minutes) instead of a fixed 120 seconds, so long recordings can finish.
… on JianYing 11.6+ - sound-separated-orphan (warning, --fix): a video clip marked has_sound_separated with no separated audio anywhere on the timeline plays silent; the mark comes along when a clip is copied from another draft. --fix clears it. A draft whose sound really was split in the app (an extract_music or video_original_sound clip on the timeline) is left alone. - keyframe-trimmed-clock (info): keyframes on a clip trimmed at its head or played at another speed. Keyframe times are written from the segment's start; Jianying Pro 11.6 has been reported to read them on the media's own clock, so the note says where to check the motion. - uniform-scale-keyframe (info, JianYing 11.6+ only): UNIFORM_SCALE zooms have been reported ignored there in favour of KFTypeScaleX with uniform scaling on.
…an see The sync-timelines guard test faked a running editor with a real process named CapCut. On a machine with many cores the other test files run at the same time, see that process and have their writes refused (editor-open), so npm test failed there. The test now puts a stand-in ps on the child's PATH that lists a CapCut process, which only that test's commands see.
…est the packed tarball compile-safety, compile-fractional-timing and asset-hash-cache now point CAPCUT_CLI_APP_VERSIONS at a per-file temp store like the other compile tests, so npm test no longer writes the developer's own ~/.config/capcut-cli/app-versions.json. CI gains a package job, and the release workflow a step before publish, that packs the tarball, installs it and runs smoke:package.
…silient caption --cloud, three lint checks
…path test measureLoudness refuses --per-clip without --target and a target when no clip could be measured, so the rules sit with the computation and are testable without the CLI; the media path check reuses isLocalPath from materials-register. Output is unchanged.
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.
What's in it
Added
loudness <project>measures every audible clip with ffmpeg's EBU R128 meter over the part of its media the timeline plays, and reports each clip's integrated loudness, true peak and loudness at its segment volume, plus an estimate for the whole draft.--target <LUFS>(for example-14for long-form,-11for shorts) computes the gain that reaches it: one gain for every clip, so the balance between voice and music holds, or with--per-clipeach clip on its own.--max-gain-dbcaps a boost (default 20 dB).--applywrites the gain as segment volume, journaled and undoable withrestore. Skipped clips (photos, muted, missing media, no audio stream, silent, sound separated to an audio track) carry the reason.lintgains three checks:sound-separated-orphan(warning, fixable), for a video material markedhas_sound_separatedwith no separated audio on the timeline, which plays the clip silent in the app (--fixclears the mark);keyframe-trimmed-clock(info), for keyframes on a clip trimmed at its head or played at another speed; anduniform-scale-keyframe(info), forUNIFORM_SCALEzooms on JianYing 11.6 and later.Changed
caption --cloud --dry-runuploads nothing. It makes the same option checks as a real run, reports what it would send (would_upload: file, size, duration, destination) and exits without contacting CapCut's servers.caption --cloudgives each request a time limit and retries the upload signature, upload registration and result polling up to three times on a network error, HTTP 429 or a 5xx answer. The wait for the result grows with the audio's length (2 minutes plus half the duration, at most 30 minutes) instead of a fixed 2 minutes.caption --cloud --language <code>warns that the language has no effect, since the service detects the spoken language itself.smoke:packageon every push, and the release workflow does the same before it publishes.Fixed
npm testpasses on hosts with many cores: the running-editor test no longer starts a process every concurrently running test file can see, and the compile tests keep recorded app versions in scratch files instead of the developer's~/.config/capcut-cli/app-versions.json.Also released here: the experimental
caption --cloud(#157), the asset-hash cache (#155/#156), portable skill scripts and the read-path fixes already listed under Unreleased.Verification
npm test(unsplit, as CI runs it): 1350 tests, 1348 pass, 2 skipped, 0 fail;npm run lint,npm run wasm:verify, the Python client's unittest suite,npm packplussmoke:packageon the tarball: all pass.docs/command-reference.jsonregenerated withnpm run docs:commands;describematches it. Help, per-command help, the library exports and the shipped type declarations are unchanged apart from the newloudnesscommand and the--languageoption text.loudnesschecked against ffmpeg's real meter on a generated tone; the cloud flow is tested offline with a stand-in for CapCut's endpoints (no live upload).Review notes
9e56073(master).whisper.ts, restore source picking inhistory-integrity.ts, an animation slot table). It reviews on its own.package.jsonand the lock file. Nothing is tagged or published.