# stream — Start a multi-camera capture + HTTP/TCP server Starts a capture server for OV2311 (preconfigured) sensors, exposing HTTP endpoints and a TCP stream for clients. ## Usage ```bash s6 stream # or python -m s6.app.stream ``` ## Key endpoints and ports - HTTP FastAPI on port 8000: - `GET /api/spec` — JSON capture spec (`width`, `height`, `num_cameras`, etc.). - `GET /api/current_frame` — latest composite frame as PNG (cameras tiled horizontally). - TCP streaming on port 8022 for low-latency `Frame` messages (see `s6.utils.streamer.VideoStreamClient`). ## How it works - `OV2311CaptureServer` subclasses `s6.utils.FastAPIVideoStreamServer`. - Cameras open by index (default `[0, 1, 2]`); capture occurs in an asyncio loop. - FastAPI serves spec and composite images; a parallel TCP server pushes JPEG-encoded frames. ### Client snapshot helper - `s6.utils.streamer.take_snapshot(server_url)` fetches `/api/spec` and `/api/current_frame`, returning the individual per-camera images split from the composite.