Skip to main content
Control webcam streaming for visual monitoring of devices.

Syntax

Commands

Options


Command Reference

start

Start a webcam stream.

snapshot

Save one frame from a running stream as a JPEG. This is the right way for scripts and assistants to look at the bench. The frame comes back over the box’s command endpoint, so the stream’s own port never has to be reachable.
Without --out the file is named CAM1-<timestamp>.jpg in the current directory. An existing file at the --out path is overwritten. On success the command prints Saved frame.jpg (<N> bytes). The stream must already be running. If it is not, the command exits 1 with Error: Hardware error: No active stream for net 'CAM1' — start it first. The first snapshot after start can take up to 5 seconds, because the camera opens on the first request. If no frame arrives in that time, the error ends in streamer answered 503. A box older than 0.47.0 answers Error: Unknown action 'snapshot' for webcam. Run lager update on that box.

stop

Stop a webcam stream.

url

Print URLs of all active webcam streams, with who started each one when the box recorded it.
Output:

Access-gated boxes

When a box sits behind an access gateway, its stream ports only admit requests that carry your sign-in token. A browser cannot attach one from a plain link. So start, start-all and url append the token to the printed URL (http://<BOX_IP>:8086/?token=...), and say how many minutes it stays valid. Run lager webcam url for a fresh link when it expires. If no sign-in is stored for the box, the CLI tells you which lager login URL to use.

start-all

Start all configured webcam streams.

stop-all

Stop all webcam streams.

Usage

Basic Workflow

Multiple Cameras


Stream Format

Webcam streams are provided as:
  • HTTP MJPEG streams for browser viewing (/stream)
  • Single JPEG frames on demand (/snapshot, or lager webcam NET snapshot)
  • Per-webcam ports (8086, 8087, etc.)
  • Device path reporting for debugging
Streams can be started and stopped from the CLI, the Python API, or other tools that manage the same box. Each stream records which surface started it, and any of them can stop it. One stream serves every viewer at once, but a video device can only belong to one stream. Stop a stream before starting another on the same camera.

Use Cases

Visual Inspection

Monitor physical state of device during testing:

Remote Debugging

View LED states, display outputs, or physical connections:

Documentation

Capture visual evidence of test results:

Examples


Notes

  • Webcams must be connected via USB to the box
  • Each webcam uses a unique port (8086+)
  • Streams are reachable at the box IP address. On an access-gated box, a link works only with the sign-in token that the CLI adds to it
  • Default net can be set with lager defaults add --webcam-net
  • USB webcams must be compatible with V4L2