Extract audio from video files before loading
Video files (MP4, MKV, etc.) are now processed with ffmpeg to extract audio to a temp WAV file before loading into wavesurfer. This prevents the WebView crash caused by trying to fetch multi-GB files into memory. - New extract_audio Tauri command uses ffmpeg (sidecar-bundled or system) - Frontend detects video extensions and extracts audio automatically - User-friendly error if ffmpeg is not installed with install instructions - Reverted wavesurfer MediaElement approach in favor of clean extraction - Added FFmpeg install guide to USER_GUIDE.md Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -57,6 +57,12 @@
|
||||
isReady = false;
|
||||
});
|
||||
|
||||
wavesurfer.on('error', (err: Error) => {
|
||||
console.error('[voice-to-notes] WaveSurfer error:', err);
|
||||
isLoading = false;
|
||||
loadError = 'Failed to load audio';
|
||||
});
|
||||
|
||||
if (audioUrl) {
|
||||
loadAudio(audioUrl);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user