A cross-platform desktop application built with Electron and FFmpeg that allows you to split media files (video/audio) into smaller parts based on file size.
- Cross-Platform: Works on Windows, macOS, and Linux
- Wide Format Support: Supports MP4, AVI, MKV, MOV, WMV, FLV, WebM, MP3, WAV, FLAC, AAC, M4A, and more
- Smart Splitting: Automatically calculates optimal split points based on target file size
- Real-time Progress: Live progress tracking with detailed information
- Drag & Drop: Simply drag media files into the application
- Modern UI: Beautiful, responsive interface with dark theme
- Efficient Processing: Uses codec copying when possible for faster splitting
- Keyboard Shortcuts: Ctrl+O to select file, Ctrl+Enter to start splitting
- Node.js (v14 or higher)
- npm or yarn
-
Clone the repository:
git clone https://github.com/yourusername/media-splitter.git cd media-splitter -
Install dependencies:
npm install
-
Run the application:
npm start
Build for all platforms:
npm run buildBuild for specific platforms:
npm run build:win # Windows
npm run build:mac # macOS
npm run build:linux # Linux-
Select Media File
- Click "Choose File" button or drag & drop a media file
- Supported formats: MP4, AVI, MKV, MOV, WMV, FLV, WebM, MP3, WAV, FLAC, AAC, M4A
-
Configure Split Settings
- Set the maximum size per part (KB, MB, or GB)
- Choose output folder where split files will be saved
-
Start Splitting
- Click "Split Media File" button
- Monitor progress in real-time
- Files will be saved as
filename_part1.ext,filename_part2.ext, etc.
- Drag & Drop: Drag media files directly into the application window
- Keyboard Shortcuts:
Ctrl+O(orCmd+Oon Mac): Select fileCtrl+Enter(orCmd+Enteron Mac): Start splittingEscape: Clear selected file
- Smart Codec Handling: The app automatically uses codec copying when possible for faster processing
- Frontend: HTML, CSS, JavaScript with modern ES6+ features
- Backend: Electron main process with Node.js
- Media Processing: FFmpeg via fluent-ffmpeg library
- Cross-Platform: Electron framework ensures compatibility across all platforms
- Electron: Cross-platform desktop app framework
- fluent-ffmpeg: Node.js wrapper for FFmpeg
- ffmpeg-static: Bundled FFmpeg binaries
- ffprobe-static: Bundled FFprobe for media analysis
media-splitter/
βββ src/
β βββ main.js # Electron main process
β βββ preload.js # Context bridge for security
β βββ renderer.html # Main UI
β βββ styles.css # Application styles
β βββ renderer.js # Frontend logic
βββ assets/ # App icons and resources
βββ package.json # Project configuration
βββ README.md # This file
- File Analysis: Uses FFprobe to analyze media file properties (duration, bitrate, format)
- Split Calculation: Calculates optimal segment duration based on file size and target part size
- Processing: Uses FFmpeg to split the file at calculated intervals
- Progress Tracking: Provides real-time updates on processing status
- Output Management: Saves split files with sequential naming
The application includes FFmpeg binaries for all platforms. If you need to use a custom FFmpeg installation:
- Modify
src/main.js - Update the FFmpeg path configuration:
ffmpeg.setFfmpegPath('/path/to/your/ffmpeg');
Customize build settings in package.json under the build section:
- Change app icons
- Modify installer options
- Configure code signing (for distribution)
-
Large file processing is slow
- The app uses codec copying when possible
- Processing time depends on file size and system performance
-
Permission errors on output folder
- Ensure the selected output folder has write permissions
- Try selecting a different output directory
- SSD Storage: Use SSD for input/output folders for better performance
- File Format: Same-format splitting (MP4 to MP4) is faster due to codec copying
- System Resources: Close other applications during processing of large files
The build process creates platform-specific installers:
- Windows: NSIS installer & Portable (.exe)
- macOS: DMG package (.dmg)
- Linux: AppImage (.AppImage)
For distribution, consider code signing:
- Windows: Use SignTool with a code signing certificate
- macOS: Use Apple Developer certificate
- Linux: Use GPG signing for repositories
This project is licensed under the MIT License - see the LICENSE file for details.
- FFmpeg Team: For the powerful media processing capabilities
- Electron Team: For the cross-platform framework
- Node.js Community: For the excellent ecosystem of packages
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Search existing issues on GitHub
- Create a new issue with detailed information
- Include system information and error logs
Happy splitting! π¬βοΈ
