diff --git a/src/hooks/useAudioMixing.ts b/src/hooks/useAudioMixing.ts index b762c8f7..27b69e7e 100644 --- a/src/hooks/useAudioMixing.ts +++ b/src/hooks/useAudioMixing.ts @@ -228,9 +228,8 @@ export async function prepareAudioAsync( duration: totalSamples / sampleRate, }; } catch (error) { - const errorMessage = error instanceof Error ? error.message : 'Unknown error'; - console.error('Audio mixing error:', error); - throw new Error(`Failed to process audio: ${errorMessage}`); + console.error('[VideoStitch] Audio preparation failed:', error instanceof Error ? error.message : error, error); + throw new Error(`Failed to process audio: ${error instanceof Error ? error.message : 'Unknown error'}`); } } diff --git a/src/hooks/useStitchVideos.ts b/src/hooks/useStitchVideos.ts index e441cf8a..13f0ad5d 100644 --- a/src/hooks/useStitchVideos.ts +++ b/src/hooks/useStitchVideos.ts @@ -243,7 +243,8 @@ export async function stitchVideosAsync( }); if (!audioCodec) { - console.warn('No supported audio codec found, continuing without audio'); + console.warn('[VideoStitch] No supported audio codec found, continuing without audio'); + updateProgress('processing', 'Warning: no supported audio codec — audio skipped', 10); } else { updateProgress('processing', `Adding audio track (${audioCodec})...`, 10); diff --git a/src/store/execution/videoProcessingExecutors.ts b/src/store/execution/videoProcessingExecutors.ts index edb20225..c6af158d 100644 --- a/src/store/execution/videoProcessingExecutors.ts +++ b/src/store/execution/videoProcessingExecutors.ts @@ -55,6 +55,7 @@ export async function executeVideoStitch(ctx: NodeExecutionContext): Promise 0 && inputs.audio[0]) { + console.log('[VideoStitch] Audio input detected, preparing audio...'); const { prepareAudioAsync } = await import("@/hooks/useAudioMixing"); const audioUrl = inputs.audio[0]; const audioResponse = await fetch(audioUrl); @@ -68,6 +69,14 @@ export async function executeVideoStitch(ctx: NodeExecutionContext): Promise