GitHub project simulates two camera streams from one video file
A GitHub project, 'Real_Time_Video_Processing_Pipeline,' was released, offering a production-grade system that simulates two camera streams from a single video file. The pipeline incorporates real-time pacing, quality filtering (blur, exposure, stuck frames), preprocessing for AI models, and live health metrics reporting. It is designed for continuous operation with stable memory usage and clean shutdown.
Key Takeaways
- The pipeline simulates two independent camera streams from one video file and loops each stream back to the start at EOF.
- Quality gates check blur with Laplacian, exposure with luma, and stuck frames with phash before frames reach the consumer.
- The consumer applies letterbox 640x640 preprocessing and converts frames to NCHW float32 for AI model input.
- The system emits JSON metrics every 5 seconds per stream, including fps_capture, fps_preprocess, frame_age_ms_p50, frame_age_ms_p99, frames_dropped, recovery_count, quality_counters, and rss_mb.
- The README reports a preprocessing benchmark of 6.95 ms/frame for blob and 9.31 ms/frame for numpy, plus a unit test result of 4/4 passed with round-trip error under 1 px.
Why It Matters
This is a compact reference design for real-time video ingestion where frame quality, preprocessing, and memory behavior all matter at once. The hard constraints are explicit: no GPU, no cloud, no LLM, a one-frame FrameSlot instead of an unbounded queue, and pacing driven by timestamps rather than sleep. For streaming teams building AI-adjacent pipelines, the useful signal is the observability stack: per-stream JSON metrics, a soak test, and threshold plots for blur, exposure, and stuck frames. Watch the reported RSS plot and the 5-second metrics output, since those are the clearest checks on whether the pipeline stays stable under continuous run time.
Read full article at github.com