fix: optimize FFmpeg encoding to reduce memory usage
- Switch from VP9 to VP8 codec for WebM (less memory-intensive) - Add realtime encoding deadline and fast CPU preset - Add ultrafast preset for x264 encoding - Set explicit bitrates to control memory usage - Use libvorbis instead of libopus for better compatibility This fixes "memory access out of bounds" errors during video conversion in browser environments with limited WASM memory. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -218,14 +218,14 @@ export const FORMAT_PRESETS: FormatPreset[] = [
|
||||
{
|
||||
id: 'web-video',
|
||||
name: 'Web Video',
|
||||
description: 'Optimize video for web playback',
|
||||
description: 'Optimize video for web playback (VP8 for better compatibility)',
|
||||
category: 'video',
|
||||
sourceFormats: ['mp4', 'avi', 'mov', 'mkv'],
|
||||
targetFormat: 'webm',
|
||||
options: {
|
||||
videoCodec: 'libvpx-vp9',
|
||||
videoCodec: 'libvpx',
|
||||
videoBitrate: '1M',
|
||||
audioCodec: 'libopus',
|
||||
audioCodec: 'libvorbis',
|
||||
audioBitrate: '128k',
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user