A cross platform python application for capturing an area of your screen and streaming it to any WLED device over UDP using the DDP realtime protocol.
Maybe I just wasn't lookig very hard, but I didn't find a simple tool already existing that does this.
This was mostly created with the idea of casting to an LED matrix in mind, but there's no reason you couldn't use it to cast to a strip or an alien covered in strips. You'd just need to use your imagination a bit more to work out what mapped where.
There are loads of cool visualisations on youtube etc that look good even at relatively low resolution
Issues and PRs are welcomed. This is still alpha at the moment. I have only really tested on windows but theoretically it should work on linux and MacOS too.
Features
- Autodiscovers WLED devices on your network. Choose which to cast to.
- Pick a window to cast
- The aspect ratio of the wled configuration is autodiscovered and applied to the casting area
- Filters for saturation, contrast, brightness, sharpness and rgb balance are included. The values can be edited in the console menu on the fly while casting. Scale r, g, b down (ie less than 1) if you need sp you as not to have values overflow and clip. The default values work well for the 16x16 matrices from Aliexoress I have, but experiment as there is no doubt variation
- The area being cast is clearly displayed with a red border
- Move and scale the capture area with the keyboard (Ctrl + arrows to move, Alt+arrows to scale). Alternatively left click on the red border to drag it around, right click and move up/down to scale.
- Decent performance - I get around 60-65fps with all filters enabled with the fps limiter off. This is really a little too fast for WS2812bs if you have a quite a few on a pin, so the fps is limited to 25 by default
Options (none required)
| Option | Desctription |
|---|---|
| --title TITLE | Cast the window whost title contains TITLE |
| --fps FPS | Limit fps to FPS. 500 LEDS per GPIO is stable up to around 40Hz on and ESP32-WROOM for me but YMMV |
| --host HOST | Skip network discovery and cast to this IP address |
| --live-preview | Show the output in a preview pane on the computer |
| --search-timeout TIMEOUT | Timeout for WLED network discovery, defaults to 3s. Increase if your latency is higher and devices are not found. |
| --dxcam | A more performant capture with DirectX, only works on windows with primary monitor I believe |
To implement: --output-resolution Skip resolution discovery from WLED and use this (format 64x32)
Installation
With pip (recommended)
pip install wledcast
From source
Create and activate a conda/venv, If you aren't sure how, I recommend micromamba as it's very lightweight and fast:
micromamba create -n wledcast -c conda-forge python=3.10
micromamba activate wledcast
Clone the repo, install dependencies, run
git clone https://github.com/ppamment/wledcast.git
cd wledcast
python -m pip install -r requirements.txt
python main.py
Licence
GPLv3, See the LICENCE file
Metadata
Release files for wledcast 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wledcast-0.1.1.tar.gz | 48.6 kB | Without provenance | Details for wledcast-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wledcast-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for wledcast-0.1.1-py3-none-any.whl |
Total release size: 87.1 kB
Release files / wledcast-0.1.1.tar.gz
| Download URL | wledcast-0.1.1.tar.gz |
|---|---|
| Size | 48.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4734ade1117a6d5da05eeafacaad86876d7146104c891555cba72f6987961537
|
|
BLAKE2b-256 checksum How to use checksums |
4dd348340fddfc16fe0a133d411792a408345f7fe44e276400b9a7abd7a4db91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / wledcast-0.1.1-py3-none-any.whl
| Download URL | wledcast-0.1.1-py3-none-any.whl |
|---|---|
| Size | 38.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
54bffe2aa5fff0da01eec75a6bd82ba9f7b17a674c4b95d92dbfa84e122e6f57
|
|
BLAKE2b-256 checksum How to use checksums |
6a0e7a1c870638bacc495c70e1aaeabace34b489f5bae286ea037ca41035a841
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for wledcast 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.