`<Audio>` at composition root resolves to `duration=Infinity` in ffmpeg filter graph
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- Mezza giornata
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Tranquilla
- Stack tecnologico
- react, typescript
- Ambito
- audio-video-rtc, cli
Direzione di ricerca
Start from the code that turns <Audio> into an ffmpeg atrim filter and see how it computes duration when there is no endAt and no wrapping <Sequence>. Reproduce with the MyChapter composition from the report and look at the filter string it builds. Done when that case either gets a finite bound from the composition's durationInFrames or fails early with a clear error naming the <Audio> src, and a test covers the no-endAt case.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
A bare <Audio src={...} /> placed at the root of a <Composition> (no endAt prop, no wrapping <Sequence>) causes the renderer to emit duration=Infinity into the ffmpeg atrim filter, which crashes the render.
Reproduction
// MyChapter.tsx
import { CanvasElement, Audio, staticFile } from '@rendiv/core';
export const CHAPTER_DURATION = 3814;
export const MyChapter = () => (
<CanvasElement id="MyChapter">
<Audio src={staticFile('audio/chapter.mp3')} />
{/* ...other content sized to CHAPTER_DURATION... */}
</CanvasElement>
);
// index.tsx
<Composition
id=\"MyChapter\"
component={MyChapter}
durationInFrames={CHAPTER_DURATION}
fps={30}
width={1920}
height={1080}
/>
Run:
rendiv render src/index.tsx MyChapter out/MyChapter.mp4
Actual
FFmpeg exited with code 234:
[Parsed_atrim_0 @ 0x...] Unable to parse option value \"Infinity\" as duration
Error applying option 'duration' to filter 'atrim': Invalid argument
Failed to set value '[1:a]atrim=start=0.000000:duration=Infinity,asetpts=PTS-STARTPTS[aout]'
for option 'filter_complex': Invalid argument
Expected
The renderer should treat `` without an explicit `endAt` as bounded by the parent composition's `durationInFrames` — same behavior as Remotion.
Workaround
Explicitly pass `endAt`:
```tsx
<Audio src={staticFile('audio/chapter.mp3')} endAt={CHAPTER_DURATION} />
```
This works, but every chapter master in the project needed the same one-line fix, and the failure mode (`duration=Infinity` from ffmpeg) was very far from the cause.
Suggested fixes (any one would help; all three would be ideal)
-
Default `endAt` to composition duration. When `` has no `endAt` and no wrapping ``, treat it as `endAt = compositionDurationInFrames`.
-
Guard the filter-graph emitter. Before serializing `atrim=duration=${value}`, `assert(Number.isFinite(value))` and throw with a useful message, e.g.:
`Audio src="..." resolved to infinite duration. Pass endAt={N} or wrap in .`
-
Mount-time lint. Walk the composition tree once and warn for any `` / `` / `` lacking a bounded `endAt` and a Sequence ancestor.
Environment
- `@rendiv/core`: ^0.1.0
- `@rendiv/cli`: ^0.1.0
- ffmpeg: 7.0.2-static
- OS: Debian inside Docker container (headless)
- Lingua principale
- TypeScript
- Stelle
- 159
- Fork
- 32
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di thecodacus/rendiv
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
thecodacus/rendiv#17 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
thecodacus/rendiv#16 ·
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
thecodacus/rendiv#15 ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 55/100
thecodacus/rendiv#24 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 45/100
thecodacus/rendiv#23 ·
Tutte le issue di thecodacus/rendiv
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
riverqueue/river#1576 ·
I maintainer di solito rispondono entro 1 giorno
-
[bug] A prompt queued during a run is assessed without its textForse già presa @jwiegley l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
DevMortimer/pi-warden#211 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
mattermost/compass-design#191 ·
I maintainer di solito rispondono entro 1 giorno
-
Add unit tests for the organization admin role checkForse già presa @SaffuSafwan l’ha presa oggi. Apertaarea/core good first issue help wanted
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
elmohq/elmo#1095 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
HorusGoul/trizum#559 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno