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