Skip to content

Blink Music Controller is a Python tool that allows users to control their media playback using only their eye blinks. it simulates keyboard shortcuts such as play/pause, next/previous track, and seek actions, based on blink gesture so no hands required.

Notifications You must be signed in to change notification settings

ACT91/Blink_To_Play

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Blink Music Controller

Blink_To_Play is a hands-free, eye-blink-based controller for your media player.
It lets you use facial gestures (left eye, right eye, or both blinks) to simulate media keys like play/pause, next/previous track, and even seeking β€” just by blinking.

Perfect for:

  • πŸ” Accessibility applications
  • 🧠 Experimental human-computer interaction
  • 🎧 Listening to music without touching your device

πŸ‘οΈ Blink Gesture Controls

Blink Action Simulated Keys Media Action
Blink both eyes Ctrl + P Play / Pause
Blink right eye Ctrl + F Next track
Blink left eye Ctrl + B Previous track
Long blink (right eye) Ctrl + β†’ Seek forward
Long blink (left eye) Ctrl + ← Seek backward

βœ… Works with any media player that supports these shortcuts
Examples: Windows Media Player, VLC, Groove Music


🧠 How It Works

  • Uses OpenCV to access your webcam
  • Tracks face + eye movement with MediaPipe FaceMesh
  • Detects left/right/both eye blinks, and long blinks
  • Simulates keyboard shortcuts using pynput

πŸ—‚οΈ Project Structure

blink_music_controller/ β”œβ”€β”€ main.py # Main loop: webcam + action triggers β”œβ”€β”€ eye_tracker.py # Detects left, right, both eye blinks β”œβ”€β”€ media_keys.py # Simulates media key presses (Ctrl + P, etc.) β”œβ”€β”€ utils.py # Tracks blink duration for long blinks β”œβ”€β”€ requirements.txt # Dependencies


πŸš€ Getting Started

βœ… Prerequisites

  • Python 3.10 or 3.11
  • Webcam

πŸ“¦ Install Dependencies

pip install -r requirements.txt
▢️ Run the Tool
bash
Copy
Edit
python main.py
Make sure your media player window is active
(e.g., click on the WMP or VLC window)

πŸ“‹ Requirements
opencv-python

mediapipe

pynput

Already included in requirements.txt

πŸ“Έ Screenshots
screenshots coming soon

πŸ› οΈ Features to Improve
GUI showing current song, eye status, blink type

Sound or popup feedback after an action

Blink customization (e.g., adjust threshold/delay)

Voice fallback or confirmation mode

🧾 License
MIT License β€” use, share, and improve!

πŸ™Œ Author
ACT91
Built with Python, creativity, and a blink of genius πŸ˜‰

About

Blink Music Controller is a Python tool that allows users to control their media playback using only their eye blinks. it simulates keyboard shortcuts such as play/pause, next/previous track, and seek actions, based on blink gesture so no hands required.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages