AD
addyosmani/video-compress
Video compression in the browser using FFMPEG.wasm
Browser Video Compressor
A powerful, browser-based video compression tool built with React and FFMPEG.wasm. Compress videos directly in your browser with real-time preview and advanced settings - no server uploads required.
Features
- ๐ฌ Client-side video compression
- ๐ Privacy-first (all processing happens locally)
- ๐ Real-time compression preview
- ๐ Live file size estimation
- โ๏ธ Advanced compression settings:
- Multiple compression methods:
- Bitrate targeting
- Quality percentage
- File size targeting
- CRF (Constant Rate Factor)
- Video codec selection (H.264/H.265)
- Audio codec options (AAC/MP3)
- Frame rate control
- Resolution scaling
- Audio bitrate adjustment
- Multiple compression methods:
Technology Stack
- React 18
- TypeScript
- Tailwind CSS
- FFMPEG.wasm
- Radix UI Components
- Lucide Icons
- Vite
Getting Started
Prerequisites
- Node.js 18 or higher
- npm or yarn
Installation
- Clone the repository:
git clone https://github.com/yourusername/video-compressor.git
cd video-compressor- Install dependencies:
npm install- Start the development server:
npm run devThe application will be available at http://localhost:5173
Building for Production
npm run buildUsage
- Drag and drop a video file or click to browse
- (Optional) Click the Settings button to adjust compression parameters:
- Choose compression method:
- Bitrate: Target a specific video bitrate
- Quality: Set a quality percentage (1-100%)
- File size: Target a specific output size
- CRF: Fine-tune quality (18-51, lower is better)
- Select video codec (H.264/H.265)
- Choose audio settings (codec and bitrate)
- Adjust frame rate
- Set maximum resolution
- Choose compression method:
- Click "Compress Video" to start compression
- Watch the real-time preview and progress
- Download the compressed video when complete
Technical Details
Video Processing
- Uses FFMPEG.wasm for client-side video processing
- Supports multiple compression strategies:
- Bitrate-based: Direct control over output bitrate
- CRF-based: Quality-focused compression
- Percentage-based: Simplified quality control
- File size targeting: Automatic bitrate calculation
Preview System
- Real-time preview during compression
- Split-view comparison (original vs. compressed)
- Progress-based preview scrubbing
- Live file size estimation
State Management
- Efficient React state management
- Proper cleanup of resources
- Memory leak prevention
- Comprehensive error handling
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- FFMPEG.wasm for browser-based video processing
- Radix UI for accessible UI components
- Tailwind CSS for styling
- Lucide for icons
On this page
Languages
TypeScript80.0%HTML8.2%JavaScript6.9%CSS4.8%
Contributors
MIT License
Created November 10, 2024
Updated March 2, 2026