Exports with clip transitions can end early without an error
维护者通常 1 天内回复
评估
调研方向
Start in crates/rendering/src/lib.rs at both render_video_to_channel variants, then trace frame mapping to TimelineConfiguration::get_frame_mapping_unheld and the segment mapping tests. Reproduce the reported gap at frame 105 for the three-clip timeline at 30 fps, then verify every frame in 0..duration maps and the export no longer stops early.
由索引模型根据 Issue 内容生成。
描述
Description
When a timeline has clip transitions, some frame times map to no source frame. The export render loop (crates/rendering/src/lib.rs, both render_video_to_channel variants) treats an unmapped frame as the end of the timeline. It breaks out and returns Ok(()), so the export finishes without an error and the video is missing everything after that frame. The editor's preview renderer stops at the same point (editor_instance.rs, "no segment found for frame").
The cause is in TimelineConfiguration::get_frame_mapping_unheld. A clip's solo range ends at segment_start + segment.duration() - next_duration, but the next transition starts at segment_start += segment.duration() - next_duration. The two expressions round differently, so sometimes the transition starts one ulp after the solo range ends. A frame time that lands in that gap maps to None.
Expected: every frame in 0..duration maps to a clip.
Actual: on some timelines one frame maps to nothing, and the export stops there.
Reproduction
Three 1x clips at source times [0, 3.1], [4.1, 5.5] and [6.5, 10.5], joined by two 0.5 s cross-fades. The timeline is 7.5 s long. At 30 fps, frame 105 (t = 3.5) is unmapped. The second clip's solo range ends at 3.5 and the next transition starts at 3.5000000000000004. An export at 30 fps would stop at 3.5 s and drop the last 4 s.
On main 2bffa46a4, a unit test that calls get_segment_time for every frame of that timeline reports [105] unmapped.
How often it happens: I generated 2,000 random 3 to 6 clip timelines per setting with 0.5 s transitions at every join, cut points on a 1/30, 1/60 or 1/100 s grid, at 30 and 60 fps, with 1x and mixed speeds. Between 1 and 12 of each 2,000 had a gap well before the end (0.05% to 0.6%).
Additional Context
- Cap version: main at 2bffa46a4
- Operating system, version: any (timeline math in
cap-project) - I reproduced this with the mapping function the exporter calls. I couldn't build the exporter on my machine, so I haven't watched a full export come out short.
- 主要语言
- Rust
- 星标
- 25.4k
- 派生
- 2.4k
- 平均合并
- 19 小时 49 分钟
- 30 天内合并 PR
- 701
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
CapSoftware/Cap 的其他 Issue
-
My Caps shows "Shared" on private Caps that were never shared可能已有人在做 @AksharP5 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
CapSoftware/Cap#4569 · 1 条评论 ·
维护者通常 1 天内回复
-
Download, FAQ, privacy and terms pages have no meta description可能已有人在做 @patrickballard 于 24 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 82/100
CapSoftware/Cap#3675 · 1 条评论 ·
维护者通常 1 天内回复
-
self hosting
难度 2/5 1-3 小时 新手友好度 68/100
CapSoftware/Cap#2384 · 3 条评论 ·
维护者通常 1 天内回复
-
Dashboard pagination causes full page reloads on self-hosted Cap可能已有人在做 @DipanshuAmbilkar03 于 22 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
CapSoftware/Cap#2305 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 68/100
CapSoftware/Cap#1714 · 3 条评论 ·
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
Document Web UI未关闭
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating values未关闭bug
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复