MoodCutter is an open-source Python project that automatically detects and extracts funny and sad moments from videos. The goal is to make emotional video clipping effortless and accessible for content creators, researchers, or anyone who wants to analyze video emotions.
The first version focuses on audio-based laughter detection using energy analysis. It processes audio files, identifies loud moments (potential laughter), and visualizes the results.
- ✅ Audio loudness analysis using RMS energy
- ✅ Dynamic threshold-based detection
- ✅ Time-stamped loud moment extraction
- ✅ Energy visualization graph
- ✅ Command-line interface
- Detect loud moments in audio (potential laughter)
- Configurable chunk duration and sensitivity threshold
- Visual energy analysis with matplotlib
- Export timestamps of detected moments
- Modular architecture for future expansion
- Clone the repository:
git clone https://github.com/axtheon/MoodCutter.git
cd MoodCutter- Install dependencies:
pip install -r requirements.txtRun the main script with default settings:
python src/main.pyThe script will:
- Load the test audio file (
examples/audio/test_audio.wav) - Analyze audio in 0.5-second chunks
- Detect moments exceeding 1.5x average energy
- Display timestamps in the terminal
- Show an interactive energy visualization graph
You can adjust detection parameters in src/main.py:
CHUNK_DURATION = 0.5 # Analysis window size (seconds)
THRESHOLD_MULTIPLIER = 1.5 # Sensitivity (lower = more sensitive)- Audio Loading: Loads audio file using
librosa - Chunking: Divides audio into fixed-duration segments
- Energy Calculation: Computes RMS energy (loudness) for each chunk
- Threshold Detection: Identifies chunks exceeding the dynamic threshold
- Visualization: Displays energy levels and detected moments
This project is open-source and available under the MIT License.
- Video processing integration
- Extract video segments based on audio timestamps
- Support for multiple audio formats
- Machine learning-based laughter classification
- Sad moment detection (audio + visual cues)
- GUI interface
- Batch processing support
- Export to multiple formats
- Real-time detection
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
Made with ❤️ for content creators and video enthusiasts


