Real-time motion visualization in browser using WebSocket streaming.
StreamWare provides real-time motion analysis visualization through a browser-based viewer. The system uses a separate process architecture to ensure smooth streaming regardless of LLM processing speed.
βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββ
β MAIN PROCESS β β DSL STREAMER PROCESS β
β β β (Isolated) β
βββββββββββββββββββββββββββββββ€ βββββββββββββββββββββββββββββββ€
β β β FastCapture (5-20 FPS) β
β LLM Analysis β β β β
β (~1-4s per frame) β β βΌ β
β β β DSL Analysis (~10ms) β
β - Throttled rate β β β β
β - Background thread β β βΌ β
β β β WebSocket β Browser :8766 β
βββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββ
# Start with real-time viewer
sq live narrator --url "rtsp://camera_ip/stream" --realtime --turbo
# Open browser
open http://localhost:8766
# No LLM, maximum FPS
sq live narrator --url "rtsp://..." --dsl-only --realtime --fps 20
# Real-time viewer + async LLM
sq live narrator --url "rtsp://..." --realtime --turbo --fps 5
| Option | Default | Description |
|---|---|---|
--realtime |
off | Enable WebSocket streaming |
--fps N |
2 | Target frames per second |
--dsl-only |
off | Skip LLM, use only OpenCV |
--turbo |
off | Fast mode with optimizations |
| Port | Service |
|---|---|
| 8765 | WebSocket server |
| 8766 | HTTP viewer |
The browser viewer at http://localhost:8766 provides:
When --realtime is enabled, DSL streaming runs in a separate process:
# Main process only handles LLM (throttled)
# DSL process handles streaming (fast)
DSL Process:
/dev/shm/streamware_dsl/ # Separate frame directory
FastCapture β DSL Analysis β WebSocket
Main Process:
/dev/shm/streamware/ # Main frame directory
FastCapture β LLM Analysis (async)
| Mode | DSL FPS | LLM Rate | Browser |
|---|---|---|---|
--dsl-only |
20+ | None | Smooth |
--realtime |
5-10 | ~0.5/s | Smooth |
| No realtime | N/A | ~0.3/s | N/A |
# Kill existing processes
fuser -k 8765/tcp 8766/tcp
π DSL F20: logs--fps 5--fps 2--dsl-onlyRelated: