Control video playback using your facial expressions. This system detects your mood through the webcam and adjusts the playback speed of a video accordingly—speed up, slow down, or pause—all without lifting a finger.
-
🎥 Video Playback
- Uses VLC’s Python bindings (
python-vlc) for reliable and responsive video playback. - Playback speed can be dynamically adjusted (fast-forward, slow-mo, pause).
- Uses VLC’s Python bindings (
-
🧠 Face Detection
- Utilizes OpenCV’s Haar Cascade classifier to detect faces in real-time from webcam input.
-
😐 Emotion Analysis
- Leverages DeepFace to analyze detected faces and classify emotions (e.g., happy, sad, angry, neutral, etc.).
-
⚙️ Action Triggering
- When a consistent emotion is detected over a few frames:
- 😄 Happy → Speed up
- 😐 Neutral → Normal speed
- 😞 Sad → Slow down
- 😠 Angry → Pause the video
- When a consistent emotion is detected over a few frames:
-
📊 UI Feedback
- Real-time on-screen display showing:
- Your current emotion
- Current video speed
- Real-time on-screen display showing:
- Python 3.7 or above
opencv-pythonpython-vlcdeepfacenumpy
Install all dependencies using:
pip install opencv-python python-vlc deepface numpy- Clone the repository.
- Make sure your webcam is connected.
- Update the path to the video file in the script if needed.
- Run:
python slayback.py --video path/to/your/video.mp4- Accessibility for motor-impaired users
- Emotion-aware learning platforms
- Mood-reactive art installations
- Personalized media experiences
- Add voice command fallback
- Support YouTube or streaming platforms
- Add sensitivity settings for emotion detection
- Custom mappings of emotions to actions
Coming soon...