Skip to content

kumaradityaapril/gesture-controlled-media-player

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🎡 Gesture-Controlled Media Player

Python OpenCV MediaPipe Platform Status

A real-time gesture-controlled media player that allows users to control system media
(play/pause, volume, next/previous track) using hand gestures captured via webcam.

This project demonstrates computer vision, real-time processing, gesture recognition, and OS-level automation using Python.


πŸš€ Key Features

  • βœ‹ Open Palm β†’ Play / Pause
  • πŸ‘ Thumb Up β†’ Volume Up
  • πŸ‘Ž Thumb Down β†’ Volume Down
  • πŸ‘‰ Swipe Right β†’ Next Track
  • πŸ‘ˆ Swipe Left β†’ Previous Track
  • 🧠 Gesture stability using multi-frame confirmation
  • ⚑ Real-time performance with FPS counter
  • πŸ–₯️ OS-level media control (works with Spotify, YouTube, VLC, etc.)

🧠 System Workflow

Webcam Feed -> OpenCV Frame Processing -> MediaPipe Tasks API (21 Hand Landmarks) -> Finger State Detection -> Static & Dynamic Gesture Classification -> Gesture Stabilization (N-frame window) -> Media Control via PyAutoGUI


Project Architecture

gesture-controlled-media-player/ β”œβ”€β”€ models/ β”‚ └── hand_landmarker.task # MediaPipe hand landmark model β”‚ β”œβ”€β”€ src/ β”‚ β”œβ”€β”€ camera.py # Webcam handling (OpenCV) β”‚ β”œβ”€β”€ hand_tracker.py # Hand landmark detection (MediaPipe) β”‚ β”œβ”€β”€ gesture_utils.py # Gesture logic, swipe detection, stability β”‚ β”œβ”€β”€ media_controller.py # OS-level media automation β”‚ └── main.py # Application entry point β”‚ β”œβ”€β”€ requirements.txt # Project dependencies β”œβ”€β”€ README.md # Project documentation └── venv/ # Virtual environment (ignored in Git)


βš™οΈ Installation & Setup

1️⃣ Clone Repository

git clone cd gesture-controlled-media-player

2️⃣ Create & Activate Virtual Environment

python -m venv venv venv\Scripts\activate # Windows

3️⃣ Install Dependencies

pip install -r requirements.txt

4️⃣ Run Application

python src/main.py πŸ§ͺ Supported Gestures Gesture Action Open Palm Play / Pause Thumb Up Volume Up Thumb Down Volume Down Swipe Right Next Track Swipe Left Previous Track


πŸ“ˆ Performance & Stability Real-time hand tracking using MediaPipe Tasks API

FPS counter for performance monitoring

Gesture stabilization using sliding window (N-frame confirmation)

Cooldown & debounce logic to prevent accidental triggers


🧠 Technical Highlights (Resume Keywords) Computer Vision

Real-Time Video Processing

Hand Landmark Detection

Gesture Recognition

MediaPipe Tasks API

OpenCV

OS Automation

Performance Optimization

Modular Python Design


πŸ“Œ Future Enhancements Gesture-controlled virtual mouse

Smart home device integration

Custom gesture training using ML models

Cross-platform support (Linux/macOS)

πŸ‘¨β€πŸ’» Author

Kumar Aditya

πŸ“Œ Aspiring Software / Full Stack / Computer Vision Developer

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages