Skip to content

Timdnb/idotmatrix-stream-camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

iDotMatrix Camera Streaming

This repository contains a script to stream camera/webcam video to an iDotMatrix LED display over Bluetooth Low Energy (BLE). The code uses the idotmatrix Python client plus OpenCV for camera capture and Pillow for image processing.

Requirements

Tested with:

  • Python 3.12.4 on macOS

Python packages:

  • idotmatrix
  • opencv-python
  • Pillow
  • numpy

Create a virtual environment and install requirements:

python -m venv venv
source venv/bin/activate
pip install -r ./requirements.txt

Streaming from a camera

stream_camera.py streams frames from a camera (e.g. webcam) to the iDotMatrix display.

Basic usage

From the repo root:

python stream_camera.py --address auto --adaptive

Arguments:

  • --address ADDRESS
    Bluetooth address of the device, or auto / empty to scan.

  • --size SIZE
    Physical pixel size of the square display.

  • --logical-size LOGICAL
    Internal render size before upscaling to size.

  • --fps FPS
    Target frames per second to send to the display.

  • --device-index INDEX
    OpenCV camera index (0 for the default webcam).

  • --max-colors N
    Maximum number of colors after quantization (palette size). Lower values → fewer bytes and more banding.

  • --adaptive
    Enable adaptive multi-scale smoothing on the logical frame before upscaling. This flattens low-variance regions (e.g. sky, walls), improving compression.

  • --debug
    Enable debug logging, including a rolling average of the effective bitrate.


Known limitations

  • At default settings, the screen still freezes every now and then. This has been traced to pure bandwidth limitations. Even with smoothing this issue is not solved, unless you lower bandwidth drastically (e.g. --max-colors 8 and --logical-size 16).

About

Stream a camera view to an idotmatrix pixel display.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages