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

オープン
#3,862 コメント 1 件 リアクション 0 件 担当者 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時間
マージ済み PR(30日)
684

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CapSoftware/Cap のほかの issue

CapSoftware/Cap の issue をすべて見る

似ている issue

Rust の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。