# algolive **Repository Path**: H-kernel/algolive ## Basic Information - **Project Name**: algolive - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-05-23 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # AlgoLive AlgoLive is a C++ RTSP detection relay with a browser management UI. ## Features - Pull RTSP streams with configurable TCP or UDP transport. - Prefer NVIDIA FFmpeg GPU codecs for H264/H265 decode and H264 encode when available. - Run OpenCV DNN detection on decoded frames. - Draw detection boxes and labels on the video frame. - Push H264 fragmented MP4 segments to the browser over WebSocket for MSE playback. - Optionally push encoded output to a configured RTMP endpoint. - Manage RTSP channels, live playback, model parameters, and codec defaults from the web UI. ## Build Install system dependencies: - CMake 3.20+ - C++20 compiler - OpenCV with DNN - FFmpeg development libraries: `libavformat`, `libavcodec`, `libavutil`, `libswscale` Then build: ```bash ./scripts/build.sh ``` ## Run ```bash ./build/algolive --config config/example.json ``` Open `http://127.0.0.1:8080/`. The example stream is disabled by default. Edit it in the UI or in `config/example.json`, then save. ## Web UI - `频道管理`: add and edit multiple RTSP channels, channel names, RTSP TCP/UDP mode, detection prompts, RTMP push toggle, RTMP URL, and per-channel encode parameters. - `实时播放`: select enabled channels and play multiple live H264+fMP4 WebSocket streams with MSE. - `系统配置`: manage model paths, detector thresholds/input size, service listen settings, and default codec parameters used by new channels. ## Detection Model Set `detector.model_path` to a YOLO-style ONNX model and `detector.labels_path` to a newline-delimited class label file. The current detector filters class labels by each stream's `prompt` field. Set `detector.model_type` to `yolo_altclip` to enable AltCLIP semantic filtering. In this mode YOLO still generates candidate boxes, then AltCLIP scores each cropped box against text embeddings and rewrites/filter labels by the stream prompt. AltCLIP configuration: - `detector.altclip_model_path`: ONNX image encoder. - `detector.altclip_embeddings_path`: text embedding file. - `detector.altclip_threshold`: minimum cosine similarity. - `detector.altclip_input_width` / `detector.altclip_input_height`: image encoder input size. The text embedding file accepts one label per line: ```text person0.12 0.34 ... car,0.11,0.22,... ```