____ _ _ / ___| |_ _ __ ___ __ _ _ __ ___ | | ___ _ __ ___ \___ \ __| '__/ _ \/ _` | '_ ` _ \ | | / _ \ '_ \/ __| ___) | |_| | | __/ (_| | | | | | | | |__| __/ | | \__ \ |____/ \__|_| \___|\__,_|_| |_| |_| |_____\___|_| |_|___/
A high-performance, 60FPS virtual camera for Windows featuring real-time image transformations and a premium frameless UI.
- Strict 60FPS DirectShow Stream: Low-latency video capture leveraging OpenCV's native DirectShow (
cv2.CAP_DSHOW) backend.
- Premium Frameless UI: A fully custom dark-themed GUI designed with PyQt6, featuring smooth rounded window corners, custom draggable title bar, drop shadows, and high-fidelity rendering.
- Real-Time Transformations:
- Zoom & Crop: Lossless digital zoom slider (1.0x to 3.0x).
- Flips: Live horizontal mirror previews and vertical mirror feeds.
- Color Correction: Real-time Brightness, Contrast, and Saturation adjustments using high-performance HSV color-space scaling.
- Automatic Persistence: Instant JSON serialization/deserialization to preserve parameters across program restarts.
- Full DevOps & CI/CD Tooling: Automated multi-platform lint checkups, headless offscreen testing support, and native Windows PyInstaller packaging configurations.
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 |
+-------------------------------------------+
- GUI Main Thread: Drives the layout, listens to user control inputs, writes immediately to the local
StateManager, 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 to RGB, and channels frames natively topyvirtualcam's camera registers.
git clone https://github.com/DilshanX09/streamlens-virtual-cam
cd stream-lenspython -m venv venv
venv\Scripts\activateEnsure you have registered a virtual camera driver (e.g. OBS Studio Virtual Camera) on your machine, then run:
pip install -r requirements.txtpython src/main.pyStreamLens 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.