D1: webm upload remux step for MediaRecorder output

New src/lib/server/remux.ts:
- remuxUpload(inputPath, jobId) — ffmpeg stream copy to fix Cues/duration
- Detects .webm by extension (case-insensitive), pass-through for others
- Wired into pipeline.ts upload branch after saveUploadedFile(),
  before prepareAudio() — YouTube path untouched

Regression tests (all passing, 0 regressions across 158 tests):
- Mock-based unit tests: ffmpeg invocation, non-webm pass-through, error cleanup
- Integration test w/ synthetic opus-in-webm fixture (lower-confidence flag)
  verifies remux produces valid webm with finalized duration
This commit is contained in:
Giancarmine Salucci
2026-07-08 00:43:43 +02:00
parent 35a2d86dbb
commit ffa931e959
5 changed files with 296 additions and 0 deletions
Binary file not shown.