Python examples demonstrating key features of the Alecs Open Smart Camera using the VmbPy API.
THE SOFTWARE IS PRELIMINARY AND STILL IN TESTING AND VERIFICATION PHASE AND IS PROVIDED ON AN “AS IS” AND “AS AVAILABLE” BASIS AND IS BELIEVED TO CONTAIN DEFECTS. A PRIMARY PURPOSE OF THIS EARLY ACCESS IS TO OBTAIN FEEDBACK ON PERFORMANCE AND THE IDENTIFICATION OF DEFECT SOFTWARE, HARDWARE AND DOCUMENTATION.
Activate the Python virtual environment before running any example:
source .venv/bin/activateCaptures frames from the camera and streams them to a host PC via RTP/H.265 over UDP using a GStreamer pipeline. Hardware-accelerated H.265 encoding is performed on the NVIDIA Jetson module.
Usage:
python3 send_stream.py <target_ip>The accompanying stream.sdp file can be opened on the host PC to receive and display the stream. The following players are supported:
VLC:
vlc stream.sdpFor minimal latency, set --network-caching to a low value.
ffmpeg:
ffplay -max_delay 0 -analyzeduration 0 -flags +low_delay -fflags +nobuffer -protocol_whitelist "file,rtp,udp" -i stream.sdpGStreamer:
gst-launch-1.0 udpsrc port=51372 caps="application/x-rtp" ! rtph265depay ! h265parse ! d3d11h265dec ! videoconvert ! autovideosinkControls the external ring light output, synchronising it with the camera's exposure. Line1 is configured as an output and driven by the ExposureActive signal, so the light is on exactly while the sensor is exposing. Supports both Continuous Strobe and Flashed Strobe (overdrive) modes.
Usage:
python3 flash.pyPress <Enter> to stop acquisition.
Sets the RGB colour of the onboard status indicator LEDs. A specific LED can be targeted by index (0–9), or all LEDs can be set at once by omitting the index.
Usage:
# Set all LEDs to a colour
python3 indicator_lights.py <red> <green> <blue>
# Set a specific LED
python3 indicator_lights.py <LED_number> <red> <green> <blue>Example — set all LEDs to blue:
python3 indicator_lights.py 0 0 255Intensity values range from 0 to 255. The settings are saved persistently on the camera.
Configures Line0 as a hardware trigger input and acquires one frame per trigger signal transition. Useful for synchronising image acquisition with an external process or sensor.
Usage:
python3 trigger_input.pyToggle the trigger input line between high and low to acquire a frame. Press <Enter> to stop acquisition.