Metadata-Version: 2.4
Name: vlc-gesture-control
Version: 0.1.0
Summary: Control VLC media player using hand gestures detected through a webcam
Author-email: Your Name <your.email@example.com>
License: MIT
Project-URL: Homepage, https://github.com/yourusername/vlc-gesture-control
Project-URL: Bug Tracker, https://github.com/yourusername/vlc-gesture-control/issues
Project-URL: Documentation, https://github.com/yourusername/vlc-gesture-control#readme
Keywords: vlc,gesture,control,computer vision,mediapipe
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: End Users/Desktop
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Multimedia :: Video :: Display
Classifier: Topic :: Utilities
Classifier: Operating System :: Microsoft :: Windows
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: opencv-python>=4.8.0
Requires-Dist: mediapipe>=0.10.8
Requires-Dist: pywin32>=306
Requires-Dist: numpy>=1.24.3
Provides-Extra: gpu
Requires-Dist: tensorflow>=2.12.0; extra == "gpu"
Requires-Dist: torch>=2.0.1; extra == "gpu"
Requires-Dist: torchvision>=0.15.2; extra == "gpu"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Dynamic: license-file

# VLC Gesture Control

[![PyPI version](https://badge.fury.io/py/vlc-gesture-control.svg)](https://badge.fury.io/py/vlc-gesture-control)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Python Versions](https://img.shields.io/pypi/pyversions/vlc-gesture-control.svg)](https://pypi.org/project/vlc-gesture-control/)

Control VLC media player using hand gestures detected through your webcam.

## Features

- Control VLC media player without touching your keyboard/mouse
- Support for both CPU and GPU processing
- Palm-facing detection to prevent accidental triggers
- Fast-forward and rewind functionality with repeated gestures
- Real-time performance monitoring with FPS display

### Supported Gestures

| Gesture | Action |
|---------|--------|
| All five fingers up | Play/Pause |
| Index finger only | Volume Up |
| Thumb + Index finger | Volume Down |
| Index + Middle fingers | Forward 10 seconds (Fast-forward when repeated) |
| Thumb + Index + Middle fingers | Backward 10 seconds (Fast-rewind when repeated) |
| Index + Middle + Ring fingers | Toggle Subtitles |
| All fingers except thumb | Change Audio Track |
| Left hand thumb only (pointing right) | Next Video |
| Right hand thumb only (pointing left) | Previous Video |

## Installation

### Basic Installation

```bash
pip install vlc-gesture-control
```

### With GPU Support

```bash
pip install vlc-gesture-control[gpu]
```

### For Development

```bash
pip install vlc-gesture-control[dev]
```

## Usage

1. Open VLC media player and start playing a video
2. Run the application with either CPU or GPU mode:

```bash
# For CPU mode (default)
vlc-gesture-control-cpu

# For GPU mode (if supported by your hardware)
vlc-gesture-control-gpu
```

3. Position your hand in front of the webcam and use the gestures to control VLC
4. Press 'q' to quit the application

## How It Works

The application uses MediaPipe's hand tracking to detect hand landmarks in real-time. It analyzes the configuration of fingers to recognize specific gestures, then sends the corresponding keyboard commands to VLC. The system includes a consistency check that requires a gesture to be detected multiple times before triggering an action, which prevents accidental commands.

The application also checks if your palm is facing the camera, ignoring gestures when the back of your hand is visible. This allows you to adjust your hair or move around without accidentally triggering commands.

For directional gestures like next/previous video navigation, the application uses thumb-only gestures that are specific to which hand is being used (left hand thumb for next, right hand thumb for previous), making the controls more intuitive.

## Requirements

- Python 3.9+
- VLC Media Player
- Webcam
- Windows OS

## License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## Acknowledgments

- [MediaPipe](https://developers.google.com/mediapipe) for hand tracking technology
- [VideoLAN](https://www.videolan.org) for VLC media player 
