A client-side web application that extracts speech audio from video files using subtitle timing, perfect for language immersion learning.
- Client-side processing: All processing happens in your browser - no files uploaded to servers
- Multiple format support: Videos (MP4, MKV, AVI, etc.) and subtitles (SRT, ASS, VTT)
- Intelligent filtering: Remove parenthetical text and unwanted characters
- Batch processing: Handle multiple video files at once
- Flexible output: MP3, FLAC, WAV, AAC, OGG formats
- Condensed subtitles: Optional SRT/LRC output matching the condensed timeline
🚀 Use ScriptSnip instantly at: script-snip.vercel.app
No installation required - just open the link in your browser and start processing!
If you prefer to run the app locally or want to contribute:
- Node.js (version 16 or higher)
- A modern web browser with SharedArrayBuffer support
-
Install dependencies:
cd ScriptSnip npm install -
Start the development server:
npm run dev
-
Open your browser:
- Navigate to
http://localhost:3000 - The app should load automatically
- Navigate to
This app requires SharedArrayBuffer for optimal FFmpeg.wasm performance. Most modern browsers support this, but you need:
- Chrome/Edge: Version 68+
- Firefox: Version 79+
- Safari: Version 15.2+
The development server is configured with the required security headers automatically.
- Select files: Drag and drop or click to select video files and their corresponding subtitle files
- Configure settings: Adjust padding, output format, and filtering options in the Configuration tab
- Process: Click the process button to start condensing
- Download: Processed files will automatically download when complete
The app uses an advanced intelligent matching algorithm to automatically pair video and subtitle files, even with different naming conventions:
movie.mp4+movie.srtepisode01.mkv+episode01.assvideo.mp4+video_en.srt(if you set "Subtitle Suffix" to "_en")
The intelligent matcher can handle complex episode numbering:
- Season/Episode formats:
S01E01,Season 1 Episode 1,1x01 - Bracketed numbers:
[01],(14),{Episode 23} - Episode prefixes:
Episode 01,Ep01,E01 - Sequential numbering:
001,014,23
Automatically matches files using different numbering systems:
- Video:
[VCB-Studio] Series [14][1080p].mkv - Subtitle:
Series S02E01.srt(if Season 1 had 13 episodes)
The algorithm intelligently detects when sequential and seasonal numbering need to be mapped together, making it work seamlessly with mixed media collections.
- Padding: Time added before/after each subtitle line (default: 500ms)
- Output Format: Choose from MP3, FLAC, WAV, AAC, OGG
- Filter Parentheses: Remove text in (), [], {} brackets
- Filtered Characters: Remove specific characters (musical notes, etc.)
- Condensed Subtitles: Output subtitle files matching the condensed timeline
ScriptSnip/
├── src/
│ ├── types.ts # TypeScript interfaces and types
│ ├── subtitle-processor.ts # Subtitle parsing and filtering
│ ├── audio-processor.ts # FFmpeg.wasm audio processing
│ ├── file-manager.ts # File handling utilities
│ ├── condenser-engine.ts # Main processing engine
│ └── main.js # UI and app initialization
├── index.html # Main app interface
├── package.json # Dependencies and scripts
├── vite.config.js # Vite configuration
└── README.md # This file
- Subtitle Processing: Parses SRT/ASS/VTT files, applies filtering, merges overlapping periods
- Audio Extraction: Uses FFmpeg.wasm to extract audio from video files
- Segmentation: Cuts audio based on subtitle timing with configurable padding
- Concatenation: Combines segments into final condensed audio
- Recommended: Chrome 90+, Firefox 88+, Safari 15.2+
- Required Features: ES2020, Web Audio API, File API, Web Workers
- Optional: SharedArrayBuffer (for better performance)
- Make sure you're accessing via
http://localhost:3000(not file://) - Try a different browser (Chrome/Firefox recommended)
- Check your internet connection (FFmpeg.wasm loads from CDN)
- Clear browser cache and reload
- Ensure subtitle files have the same base name as video files
- Check the "Subtitle Suffix" setting if your subs have suffixes
- Use smaller video files for testing
- Try FLAC output for faster processing
- Consider using the original Python version for very large batches
To build for production:
npm run buildTo preview the production build:
npm run preview