Automatically mute advertisements during cricket matches on streaming platforms using computer vision and machine learning.
This tool uses a trained deep learning model to detect when advertisements are playing during cricket matches (IPL, World Cup, Test matches) and automatically mutes your system audio. When the match resumes, audio is restored automatically.
- Real-time Screen Monitoring: Captures a specific region of your screen at ~10 FPS
- ML-Powered Detection: Uses a TensorFlow/Keras CNN model to classify frames as "logo" (match content) or "ads"
- Smart Muting: Automatically controls system volume based on predictions
- Noise Filtering: Uses a sliding window of 3 consecutive predictions to avoid audio chatter
| Platform | IPL | World Cup | Test Matches |
|---|---|---|---|
| Hotstar | ✓ | ✓ | - |
| JIO | ✓ | - | ✓ |
- Python 3.7+ (64-bit) - This program uses TensorFlow. See TensorFlow installation requirements for details.
- pipenv - Python virtual environment manager
- Operating System:
- Windows: Uses
SetVol.exe(included) for volume control - Linux: Requires
pactlfor audio control
- Windows: Uses
-
Clone the repository:
git clone https://github.com/shrihari1999/ipl-auto-mute.git cd ipl-auto-mute -
Activate the virtual environment:
pipenv shell
-
Install dependencies (first time only):
pipenv install
Run the program with your streaming platform and event type:
python run.py <platform> <event># Watch IPL on JIO
python run.py jio ipl
# Watch Test match on JIO
python run.py jio test
# Watch IPL on Hotstar
python run.py hotstar ipl
# Watch World Cup on Hotstar
python run.py hotstar wcWhile the program is running, you can control it using keyboard inputs:
p- Pause the automation (stops muting/unmuting)r- Resume the automation
- Cross-Platform Support: Works on Windows and Linux
- Adaptive Scaling: Automatically adjusts to your screen resolution
- Minimal CPU Usage: Only monitors a small region of the screen
- Manual Override: Pause and resume automation as needed
- Smart Prediction: Filters noise to prevent rapid audio toggling
- TensorFlow/Keras 2.8.0 - Deep learning model
- OpenCV 4.5.5 - Image processing
- MSS 6.1.0 - Screen capture
- NumPy 1.21.5 - Numerical operations
Contributions are welcome! Areas for improvement:
- Adding support for more streaming platforms
- Training data for better accuracy
- Support for additional cricket events
- Platform-specific optimizations
This project is licensed under the MIT License - see below for details.
MIT License
Copyright (c) 2026 Shrihari
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Created for cricket fans who want to enjoy matches without advertisement interruptions.