You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
compile (0.26.0): ratio is ignored, and video material duration is set to the item duration (in-point clamped to 0) #133
The written draft has canvas_config = {"width":1920,"height":1080,"ratio":"16:9"}.
quickstart --ratio 9:16 gets it right (1080x1920, 9:16).
Workaround: "width": 1080, "height": 1920. The dimensions are then correct, but canvas_config.ratio stays "16:9", inherited from the seed draft. We patched it to "9:16" in every timeline copy.
Bug 2: the video material duration is the item duration, not the file duration.
Both video materials are written with duration: 6000000, while the file is 89 280 000 µs long.
With sourceStart = 20 s and 40 s, every segment reads past the end of its material. capcut-cli's own lint flags it:
INFO source-range-exceeds-material … reads 40000000us+6000000us of material …, which is only 6000000us long — CapCut clamps an out-of-range in-point to 0
So the cuts silently collapse to the start of the file.
Expected: material duration = the probed file duration (ffprobe is available, and quickstart probes it correctly: 89.28 s).
Workaround: we rewrite each video material's duration with the ffprobe value in every timeline copy, and lint is clean afterwards.
What works well:sourceStart / start / duration produce the right source_timerange and target_timerange; scale, x and y land verbatim in clip.scale and clip.transform; the same media used twice is copied into assets/ only once; the draft is registered in the store index.
Thanks @fpisasale — the reproduction is enough to trace both core defects in the code. A ratio-only spec skips the canvas update, and the segment duration is passed through as the material’s full duration.
I’m fixing canvas resolution in both --check and compilation, separating full media duration from segment duration (including material registration metadata), and adding coverage for the two six-second cuts at 20 and 40 seconds. Source-range validation will also account for speed before a draft is created. I’ll link the draft PR here when the checks pass.
Ratio-only specs now resolve the canvas for both --check and the written draft. Video/audio material and sidecar durations use the full probed file duration, while your six-second segments retain their 20-second and 40-second in-points. Speed-adjusted source ranges are checked before creating the draft.
The full local suite passes (1,017 tests), including a probed 89.28-second source and the two reported cuts. Please try your original spec against the PR and confirm the portrait canvas and the intended source moments in the app. The review guide also covers the separate first-open behavior of newly created root-only projects.
The fresh packaged install was checked with ratio: "9:16" and an 89.28-second source: canvas 1080×1920, full source duration in materials and sidecar registrations, and six-second cuts retaining their 20s/40s in-points. Out-of-bounds speed-adjusted source ranges fail before creating a draft. All 1,017 tests and platform CI passed.
The verification guide includes the desktop canvas/source-moment check. Please reopen with the spec and output if the released version still reproduces the reported problem.
Activity
renezander030 commentedon Oct 3, 2026
Thanks @fpisasale — the reproduction is enough to trace both core defects in the code. A ratio-only spec skips the canvas update, and the segment duration is passed through as the material’s full duration.
I’m fixing canvas resolution in both
--checkand compilation, separating full media duration from segment duration (including material registration metadata), and adding coverage for the two six-second cuts at 20 and 40 seconds. Source-range validation will also account for speed before a draft is created. I’ll link the draft PR here when the checks pass.renezander030 commentedon Oct 3, 2026
Both compile fixes are in draft PR #135: #135
Ratio-only specs now resolve the canvas for both
--checkand the written draft. Video/audio material and sidecar durations use the full probed file duration, while your six-second segments retain their 20-second and 40-second in-points. Speed-adjusted source ranges are checked before creating the draft.The full local suite passes (1,017 tests), including a probed 89.28-second source and the two reported cuts. Please try your original spec against the PR and confirm the portrait canvas and the intended source moments in the app. The review guide also covers the separate first-open behavior of newly created root-only projects.
renezander030 commentedon Oct 3, 2026
Released in v0.26.1, available on npm:
The fresh packaged install was checked with
ratio: "9:16"and an 89.28-second source: canvas 1080×1920, full source duration in materials and sidecar registrations, and six-second cuts retaining their 20s/40s in-points. Out-of-bounds speed-adjusted source ranges fail before creating a draft. All 1,017 tests and platform CI passed.The verification guide includes the desktop canvas/source-moment check. Please reopen with the spec and output if the released version still reproduces the reported problem.