`<Audio>` at composition root resolves to `duration=Infinity` in ffmpeg filter graph
評価
- 難易度
- 3/5
- 見積もり時間
- 半日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 静か
- 技術スタック
- react, typescript
- 領域
- audio-video-rtc, cli
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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)
- 主要言語
- TypeScript
- スター
- 159
- フォーク
- 32
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
thecodacus/rendiv のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
thecodacus/rendiv#17 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
thecodacus/rendiv#16 ·
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
thecodacus/rendiv#15 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
thecodacus/rendiv#24 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
thecodacus/rendiv#23 ·
thecodacus/rendiv の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
langchain-ai/langchainjs#12157 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
activescott/home-infra-k8s-flux#511 ·
メンテナーはふだん 1 日以内に返信
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
lingdojo/kana-dojo#33753 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信
-
android:player
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
follow-up needs-triage S3: minor
難易度 1/5 1〜3時間 初心者へのやさしさ 85/100
manaflow-ai/cmux#38032 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信