Speed and trim tools can't open WebM files without a duration, including the speed tool's own output

Đang mở
#3,862 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@patrickballard đang làm issue này rồi.

Từ ngày 5/11/2026.

  • #3863 của @patrickballard — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
25/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
typescript, web-dev
Lĩnh vực
frontend

Hướng nghiên cứu

Start by reading the speed tool at cap.so/tools/video-speed-controller and the trim tool at cap.so/tools/trim, focusing on how each handles WebM duration and loading or recording completion. Reproduce with a WebM recorded using MediaRecorder.start(timeslice); done means both tools read its real duration and can process it. Pull request #3863 is already open against this issue.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Description

WebM recorded with MediaRecorder.start(timeslice) has no duration in its header, so a video element reports Infinity until playback reaches the end. Chrome only writes the duration when no timeslice is used. cap.so's speed and trim tools both record with a timeslice (start(1000) and start(100)), so the speed tool's WebM output is one of these files.

  • Speed tool (cap.so/tools/video-speed-controller): shows Duration: 0:00 and Estimated output duration: 0:00. Speed Up then reports "Video sped up successfully!" after about a quarter of a second, and the download is 0 bytes. The safety timeout is video.duration / speed * 1000 + 5000, which is Infinity, and setTimeout treats that as 0, so the recorder stops at once.
  • Trim tool (cap.so/tools/trim): stays on "Loading video..." for good. handleVideoLoaded returns early when the duration is Infinity and never clears the loading state.

So a WebM sped up with the speed tool can't then be trimmed with the trim tool, or sped up again.

Reproduction
  1. Speed up a WebM in cap.so's speed tool and download the result.
  2. Open that file in cap.so/tools/trim: "Loading video..." never goes away.
  3. Open it in cap.so/tools/video-speed-controller: the duration reads 0:00, and speeding it up gives a 0-byte file.

Seen on cap.so on 4 Nov in Chrome 152 with a 4 s VP9/Opus clip recorded in 1 s chunks.

Expected

Both tools read the real duration and work as they do for files that have one.

Ngôn ngữ chính
Rust
Star
24.2k
Fork
2.2k
Merge trung bình
1 ngày 10 giờ
Pull request đã merge (30 ngày)
689

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của CapSoftware/Cap

Tất cả issue của CapSoftware/Cap

Issue tương tự

Thêm issue về Rust

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.