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:
@@ -90,6 +90,9 @@ async function runJob(
|
||||
} else {
|
||||
rawAudioPath = await saveUploadedFile(input.buffer, input.filename, jobId);
|
||||
title = input.filename.replace(/\.[^.]+$/, '');
|
||||
// Remux webm files (MediaRecorder output) to fix Cues/duration
|
||||
const { remuxUpload } = await import('./remux.js');
|
||||
rawAudioPath = await remuxUpload(rawAudioPath, jobId);
|
||||
}
|
||||
|
||||
updateJob({ id: jobId, title });
|
||||
|
||||
Reference in New Issue
Block a user