An intelligent Electron desktop application that automatically generates engaging short clips from long-form videos using advanced AI analysis. Perfect for content creators looking to repurpose their videos for social media platforms like TikTok, YouTube Shorts, and Instagram Reels.
- Quiet Part Removal: Removes silent sections so you can focus on the good stuff
- Accurate Transcription: Uses Whisper to convert speech to text reliably
- Content Analysis: GPT identifies the most engaging segments automatically
- Clip Generation: Generates multiple short clips ready for social media
- Drag & Drop Upload: Just drag your video file in or click to browse
- Progress Tracking: See exactly what's happening and how long it'll take
- Subtitle Editor: Reposition subtitles by dragging, with live preview
- Flexible Processing: Different modes for different needs
- Common Formats: MP4, MOV, AVI, MKV all work out of the box
- Auto Format Conversion: Converts to vertical 9:16 format for shorts
- Quality: Keeps your videos looking good throughout the process
- Batch Mode: Handle multiple videos at once
- Engagement Scores: See which clips are likely to perform best
- Auto Tagging: Topics get identified and tagged automatically
- Detailed Breakdown: Get a full analysis of each segment
- Node.js (v16+)
- Python (v3.8+)
- FFmpeg (for video processing)
-
Clone the repository
git clone https://github.com/yourusername/ai-video-editor.git cd ai-video-editor -
Install dependencies
# Install Node.js dependencies npm install # Install Python dependencies pip install -r src/python/requirements.txt
-
Add your OpenAI API key (optional but recommended)
- Grab your key from OpenAI
- Pop it in the app settings after you launch
-
Launch the application
npm run dev
-
Upload Video
- Click "Choose Video" or drag & drop your video file
- Supported formats: MP4, MOV, AVI, MKV
-
Configure Settings
- Add your OpenAI API key in Settings
- Adjust processing parameters if needed
-
Start Processing
- Click "Start AI Processing"
- Monitor real-time progress updates
-
Review Generated Clips
- Preview generated clips in the results panel
- View engagement scores and descriptions
- Export or save clips as needed
- Generate accurate subtitles using Whisper
- Interactive subtitle editor with drag-and-drop positioning
- Export SRT files for use in other applications
- Remove silent sections from videos
- Configurable silence detection sensitivity
- Preserve natural speech flow with smart frame margins
The application uses a sophisticated multi-step AI processing pipeline:
- Uses jumpcutter algorithm to detect and remove silent sections
- Configurable silence threshold and processing speed
- Preserves context frames around speech segments
- Extracts video properties and generates thumbnails
- Prepares audio tracks for transcription
- Uses OpenAI Whisper for high-accuracy speech-to-text
- Processes the cleaned audio (quiet parts removed)
- Generates timestamped transcripts
- Sends transcript to GPT for intelligent analysis
- Identifies engaging segments and topics
- Generates engagement scores and descriptions
- Creates video clips based on AI analysis
- Converts to optimal format for social media
- Generates thumbnails and metadata
- Saves processed files and metadata
- Cleans up temporary files
- Provides downloadable results
The application integrates with OpenAI services:
- Whisper API: For audio transcription
- GPT-4/3.5: For content analysis and clip selection
- Secure API key storage using Electron's safeStorage
- Encrypted sensitive data handling
- User preference persistence
Python Dependencies Missing
pip install -r src/python/requirements.txtFFmpeg Not Found
- Install FFmpeg and ensure it's in your PATH
- Download from: https://ffmpeg.org/download.html
OpenAI API Errors
- Verify your API key is correct and has sufficient credits
- Check API rate limits and usage
Processing Fails
- Ensure input video file is not corrupted
- Check available disk space in temp directory
- Verify Python environment has all required packages
Enable debug logging by setting environment variable:
DEBUG=true npm run devai-video-editor/
├── src/
│ ├── main/ # Electron main process
│ │ ├── main.js # Application entry point
│ │ ├── preload.js # IPC bridge
│ │ ├── ai-engine/ # AI processing bridges
│ │ └── database/ # SQLite database
│ ├── renderer/ # React frontend
│ │ ├── src/
│ │ │ ├── components/ # React components
│ │ │ ├── contexts/ # React contexts
│ │ │ └── App.jsx # Main app component
│ └── python/ # AI processing pipeline
│ ├── ai_pipeline.py # Main coordinator
│ ├── analysis/ # Content analysis
│ ├── transcription/ # Whisper integration
│ ├── editing/ # Video processing
│ └── cut-quiet-parts/ # Silence removal
├── temp/ # Temporary processing files
├── package.json
└── README.md
npm run dev # Start both renderer and electron
npm run dev:renderer # Start Vite dev server only
npm run dev:electron # Start Electron onlynpm run build # Build both renderer and main
npm run build:renderer # Build React frontend
npm run build:main # Prepare main process
npm run dist # Create distributable# Core AI processing
pip install whisper openai moviepy
# Quiet parts removal
pip install numpy scipy pillow audiotsm pytube
# Additional dependencies
pip install -r src/python/requirements.txtCreate a .env file in the project root:
OPENAI_API_KEY=your_openai_api_key_here
TEMP_DIR=./temp
MAX_CLIPS=5The AI pipeline can be configured with various parameters:
- Silent Threshold: Volume level for silence detection (0.01-0.1)
- Processing Speed: Speed multiplier for quiet sections
- Frame Quality: Video frame extraction quality (1-31)
- Max Clips: Maximum number of clips to generate
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please feel free to submit a Pull Request.
- Follow existing code style and conventions
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting
- Use the GitHub issue tracker
- Provide detailed reproduction steps
- Include system information and error logs
- Documentation: Check this README and inline code comments
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Thanks to:
- OpenAI for Whisper and GPT APIs
- Electron for the desktop framework
- React for the UI
- Python Community for the excellent libraries
- Jumpcutter for the quiet parts detection algorithm
Built for content creators