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

Abierto
#3,862 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@patrickballard ya está trabajando en esto.

Desde el 5/11/2026.

  • #3863 de @patrickballard — abierto

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
typescript, web-dev
Área
frontend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Rust
Estrellas
24.2k
Forks
2.2k
Merge medio
1 d 10 h
PR fusionados (30 d)
684

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de CapSoftware/Cap

Todos los issues de CapSoftware/Cap

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.