From b32f8ca89f2e2341f4ce2bfb7f954aaaf6bd6cf1 Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Tue, 31 Mar 2026 16:04:43 -0500 Subject: [PATCH 1/2] fix: transcode audio to MP3 instead of stream-copy in ffmpeg clip WAV files with .mp3 extension cause ffmpeg -c copy to fail with "Invalid audio stream" because PCM audio can't be stream-copied into an MP3 container. Use libmp3lame transcoding instead. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/content/generateAudioVideo.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/content/generateAudioVideo.ts b/src/content/generateAudioVideo.ts index 6040e47..f28ea5d 100644 --- a/src/content/generateAudioVideo.ts +++ b/src/content/generateAudioVideo.ts @@ -108,7 +108,8 @@ async function clipAndUploadAudio( "-i", inputPath, "-ss", String(startSeconds), "-t", String(durationSeconds), - "-c", "copy", + "-c:a", "libmp3lame", + "-q:a", "2", clippedPath, ]); From 6b9824c1b304afef5f5349f98b8bec2558af556b Mon Sep 17 00:00:00 2001 From: Sweets Sweetman Date: Tue, 31 Mar 2026 16:15:54 -0500 Subject: [PATCH 2/2] fix: increase create-content maxDuration to 30 minutes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 10 minutes was too short — WAV transcoding + lipsync video generation can exceed 10 min for larger audio files. Co-Authored-By: Claude Opus 4.6 (1M context) --- src/tasks/createContentTask.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tasks/createContentTask.ts b/src/tasks/createContentTask.ts index 5309f63..71a6a50 100644 --- a/src/tasks/createContentTask.ts +++ b/src/tasks/createContentTask.ts @@ -43,7 +43,7 @@ import { FACE_SWAP_INSTRUCTION, NO_FACE_INSTRUCTION } from "../content/contentPr export const createContentTask = schemaTask({ id: "create-content", schema: createContentPayloadSchema, - maxDuration: 60 * 10, + maxDuration: 60 * 30, machine: "medium-1x", retry: { maxAttempts: 0,