You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(ffmpeg): implement dynamic FFmpeg download system with runtime management (#155)
* feat(ffmpeg): implement dynamic FFmpeg download system with runtime management
- Remove static FFmpeg bundling from build configuration
- Add FFmpegDownloadService for cross-platform binary management
- Implement automatic platform detection (Windows/macOS/Linux, x64/ARM64)
- Add IPC channels for download progress monitoring and control
- Integrate download service with existing FFmpegService architecture
- Update build scripts to remove prebuild FFmpeg requirements
- Add comprehensive test coverage for download functionality
Changes:
- electron-builder.yml: Remove extraResources FFmpeg bundling
- package.json: Remove prebuild FFmpeg download from release scripts
- FFmpegDownloadService.ts: New service with download/extract/management capabilities
- FFmpegService.ts: Enhanced with download service integration and fallback logic
- IpcChannel.ts: Add 9 new channels for download operations
- ipc.ts: Register download service handlers for renderer communication
- preload/index.ts: Expose download APIs to renderer process
- useVideoFileSelect.ts: Updated to work with dynamic FFmpeg detection
This implementation enables on-demand FFmpeg installation, reducing app bundle
size by ~200MB while maintaining cross-platform compatibility and user experience.
The system gracefully falls back to bundled → downloaded → system FFmpeg.
* feat(settings): implement FFmpeg settings UI with download management
- Add new FFmpegSettings component with status indicator and download controls
- Remove deprecated FFmpeg build plugin from electron.vite.config.ts
- Enhance IndicatorLight component with proper CSS-in-JS animation syntax
- Add comprehensive i18n support for FFmpeg management (en-us, zh-cn)
- Remove box-shadow from ant-btn components for cleaner UI appearance
- Integrate FFmpeg settings into main SettingsPage navigation
Changes:
- FFmpegSettings.tsx: Complete UI implementation with download progress, path validation, and status management
- electron.vite.config.ts: Remove build-time FFmpeg download plugin (shift to runtime approach)
- IndicatorLight.tsx: Fix styled-components animation with proper css helper
- i18n locales: Add 61 new translation keys for FFmpeg settings UI
- ant.scss: Remove button shadows for consistent design system
- SettingsPage.tsx: Add FFmpeg settings tab integration
This implements the frontend interface for the dynamic FFmpeg download system,
providing users with a comprehensive management UI for FFmpeg installation,
status monitoring, and path configuration.
* feat(ffmpeg): implement FFmpeg guidance dialog for enhanced user experience
Add comprehensive FFmpeg download guidance system that transforms technical errors
into user-friendly guidance with seamless navigation to settings and auto-download.
**Components Added:**
- FFmpegDownloadPrompt: Full-featured guidance dialog with benefits, effort info, and actions
- Comprehensive internationalization support (zh-CN, en-US)
**Hook Enhancements:**
- useVideoFileSelect: Extended with FFmpeg prompt state management
- Replaced technical error throwing with guided dialog display
- Enhanced error detection for FFmpeg missing scenarios
**Integration Updates:**
- HomePage: State management for prompt visibility and component integration
- EmptyState/VideoAddButton: Bidirectional state communication with parent
- HeaderNavbar: Props forwarding for prompt handler
**Features:**
- Benefits explanation (compatibility, performance, reliability)
- Installation effort communication
- Auto-navigation to settings with download trigger
- Seamless integration with existing video file selection workflow
- Graceful error handling with user-centric messaging
**Technical Details:**
- Styled-components with theme variables and CSS custom properties
- Modal-based UI with responsive design and accessibility
- State management across component hierarchy
- URL parameter-based auto-download triggering
- Comprehensive TypeScript interfaces
Transforms "视频处理组件未安装" technical errors into guided user experience
that educates users about FFmpeg benefits and provides immediate resolution path.
* test: fix FFmpegService mock for dynamic download system
- Add getDownloadService method to FFmpegService mock
- Include all FFmpegDownloadService interface methods in mock
- Fix 43 failing test cases caused by missing mock method
- All 554 test cases now pass successfully
Resolves test failures introduced by FFmpeg dynamic download system implementation.
* test: fix cross-platform FFmpeg executable name test
- Update test to handle platform-specific executable names (ffmpeg vs ffmpeg.exe)
- Fix Windows CI test failure where test expected 'ffmpeg' but got 'ffmpeg.exe'
- Test now correctly validates system FFmpeg fallback behavior on all platforms
- Maintains test coverage while supporting cross-platform compatibility
Resolves Windows CI test failure in FFmpegService integration tests.
0 commit comments