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

未關閉
#3,862 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 1 天內回覆

@patrickballard 已經在處理了。

開始於 2026年11月5日。

  • #3863 來自 @patrickballard —— 未關閉

評估

難度
4/5
預估耗時
3-5 天
新手友好度
25/100
Issue 類型
缺陷
描述清晰度
描述清楚
活躍度
停滯
技術堆疊
typescript, web-dev
領域
frontend

研究方向

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.

由索引模型根據 Issue 內容生成。

描述

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.

主要語言
Rust
星號
24.2k
分支
2.2k
平均合併
1 天 10 小時
30 天內合併 PR
684

環境準備

  • 提供 Dockerfile 或 Docker Compose 檔案
  • 沒有 Pull Request 範本
  • 閱讀貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

CapSoftware/Cap 的其他 Issue

查看 CapSoftware/Cap 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。