Exports with clip transitions can end early without an error
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 73/100
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- Rust
- Star
- 25.4k
- Fork
- 2.4k
- Merge trung bình
- 19 giờ 49 phút
- Pull request đã merge (30 ngày)
- 701
Chuẩn bị môi trường
- Có Dockerfile hoặc tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của CapSoftware/Cap
-
My Caps shows "Shared" on private Caps that were never sharedCó thể đã có người làm @AksharP5 đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
CapSoftware/Cap#4569 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Download, FAQ, privacy and terms pages have no meta descriptionCó thể đã có người làm @patrickballard đã nhận 24 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
CapSoftware/Cap#3675 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
self hosting
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CapSoftware/Cap#2384 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Dashboard pagination causes full page reloads on self-hosted CapCó thể đã có người làm @DipanshuAmbilkar03 đã nhận 22 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
CapSoftware/Cap#2305 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
CapSoftware/Cap#1714 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của CapSoftware/Cap
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Document Web UIĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
parquet: reject truncated BYTE_STREAM_SPLIT numeric pages instead of silently fabricating valuesĐang mởbug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày