How My NVR Cuts Recording Storage by 75% — Without AI, and Without Dropped Frames
说明与用途
MiBeeNvr 通过使用压缩域 P 帧大小触发自适应录制,减少 75 % 存储使用,同时在活动开始时保留所有帧。
问题
Continuous recording on security cameras writes full‑rate video even when nothing happens, wasting storage.
结果
Adaptive recording based on compressed‑domain P‑frame size reduces storage by 75 % while preserving all frames at activity onset.
工作流
- 1. Monitor P‑frame sizes in the compressed stream.
- 2. Maintain a rolling baseline of typical P‑frame size using median absolute deviation.
- 3. If a P‑frame exceeds the baseline by the spike_factor (default 5×), trigger activity.
- 4. Flush the 32 MB ring buffer containing the last GOP to disk to avoid missing initial frames.
- 5. Switch to full frame rate recording immediately, with zero dropped frames.
- 6. If the scene stays quiet for calm_threshold (default 60 s), downgrade to sparse mode: one keyframe every timelapse_interval (default 30 s) and pause audio.
- 7. Continue monitoring; any of five signals (video spike, audio trigger, pixgate, ONVIF event, external semantic trigger) can restore full frame rate.
证据
MiBeeNvr’s adaptive recording: drops to time‑lap‑grade sparse writes (one keyframe every 30s) when the scene is quiet; snaps back to full frame rate the instant activity is detected, with zero dropped frames at the switch; measures –75% disk on a static 2K/H.265 scene (~2700 → ~688 MB/h)
The NVR never decodes the picture. It watches each P‑frame's size against a rolling baseline — the typical P‑frame size of that stream recently, maintained with MAD (median absolute deviation, a statistic that resists jitter). A P‑frame suddenly several times the baseline (default 5×) means "activity": switch back to full frame rate immediately.
While in sparse mode, a 32 MB ring buffer in memory always holds the most recent complete GOP. The moment an activity spike appears: 1) the buffered GOP is flushed to disk; 2) then the recorder switches back to full frame rate, and everything after lands on disk as usual.
- 记录日期: 2026-10-18T15:41:11.919Z