____ _ _ / ___| |_ _ __ ___ __ _ _ __ ___ | | ___ _ __ ___ \___ \ __| '__/ _ \/ _` | '_ ` _ \ | | / _ \ '_ \/ __| ___) | |_| | | __/ (_| | | | | | | | |__| __/ | | \__ \ |____/ \__|_| \___|\__,_|_| |_| |_| |_____\___|_| |_|___/
A minimalist, high-performance 60FPS virtual camera interface built for seamless real-time stream manipulation and global application integration. Quality Over Everything.
- Universal App Support: Built on top of the industry-standard OBS Virtual Camera backend, ensuring 100% compatibility with restrictive WebRTC browsers (Chrome/Google Meet) and Electron apps (WhatsApp Desktop, Zoom).
- Premium UI & Native Typography: A fully custom GUI designed with PyQt6, dynamically utilizing the
Interfont family for crisp, system-agnostic rendering. Features smooth drop shadows, clean padding, and a professional layout. - Real-Time Synchronization: Instant frame adjustments utilizing a robust thread-safe Signal/Slot architecture. No engine restarts required when altering settings.
- Pro-Level Color Grading: Real-time Brightness, Contrast, and Saturation adjustments using high-performance HSV color-space scaling.
- Automated 1-Click Build: Includes a
build.batscript for effortless Windows executable compilation (.exe) without touching the terminal. - Smart Device Handling: Built-in conflict resolution and UI filtering to prevent hardware locking and infinite loops during device selection.
StreamLens follows a rigorous, production-grade multithreaded architectural paradigm built on strict separation of concerns:
+-------------------------------------------+
| Main GUI Thread |
| - PyQt6 Event Loop |
| - Custom Frameless Control Windows |
+---------------------+---------------------+
^
Signal/Slot | (Frame Buffers)
v
+---------------------+---------------------+
| Background Worker QThread |
| - OpenCV Camera Processing (DirectShow) |
| - Image Filter/Grading Transformations |
| - PyVirtualCam output stream loop (OBS) |
+-------------------------------------------+
- GUI Main Thread: Drives the layout, listens to user control inputs, and uses high-performance signal boundaries to receive frame matrices for paint events.
- Background Camera Engine: Run continuously on a dedicated background worker (
QThread). Operates the camera capturing and transformation pipeline, formats frames, and channels frames natively topyvirtualcam's OBS registers.
Before running StreamLens, you must register the virtual camera drivers on your system. This acts as the certified bridge for applications like WhatsApp and Chrome.
- Download and install OBS Studio.
- Open OBS Studio at least once and click "Start Virtual Camera" to initialize the drivers. (You can close OBS afterward).
For the fastest setup, simply double-click the build.bat file in the root directory.
This script will automatically create a virtual environment, install all requirements, compile the project, and generate the stream_lens_v1.0.4.exe file inside the dist/ folder.
1. Clone & Initialize
git clone [https://github.com/dilshanxo/streamlens-virtual-cam.git](https://github.com/dilshanxo/streamlens-virtual-cam.git)
cd streamlens-virtual-cam2. Set up Virtual Environment
python -m venv venv
venv\Scripts\activate3. Install Requirements
pip install -r requirements.txt4. Execute the Application
python src/ui_main.pyWhen StreamLens is running, it locks your physical webcam to process the frames. To use your newly graded virtual stream in third-party applications:
- Open your target application (e.g., WhatsApp, Zoom, Google Meet).
- Go to the Video/Camera settings.
- Select
OBS Virtual Cameraas your input device. - Note: Do not select your physical webcam from the chat app's list, as StreamLens is already utilizing it.
StreamLens features high coverage unit tests. To run tests locally in your virtual environment:
python -m unittest discover -s testsContributions make the open-source community an amazing place! Check out our CONTRIBUTING.md to get started on following PEP 8 coding style standards and executing headless test suites before sending pull requests.