录像配置
Securex NVR 的录像不是“每个事件单独生成一份视频”,而是把摄像头视频持续切成片段,再根据 continuous、motion、alerts 和 detections 的保留策略决定哪些片段保留多久。
四类保留策略
| 类别 | 含义 | 适合 |
|---|---|---|
| continuous | 无论是否有运动都保留 | 需要连续取证 |
| motion | 只保留有运动的时间段 | 节省空间 |
| alerts | 与 Alert Review 项重叠的片段 | 重要人员/车辆事件 |
| detections | 与 Detection Review 项重叠的片段 | 一般检测事件 |
平衡型示例
record:
enabled: true
continuous:
days: 1
motion:
days: 7
alerts:
retain:
days: 30
mode: motion
detections:
retain:
days: 14
mode: motion
这个例子保留 1 天完整录像、7 天运动录像,并把 Alert / Detection 对应片段继续保留更久。实际天数要根据码率和磁盘容量计算。
容量估算
粗略估算:每天容量 ≈ 平均码率(Mbps) × 10.8 GB。例如 4 Mbps 约为 43 GB/天/摄像头;8 台就是约 344 GB/天。VBR 摄像头应以实际平均码率为准。
NAS 使用建议
- 确认挂载在容器启动前已经就绪,避免录像写入宿主机本地目录。
- SMB/NFS 需要稳定网络和足够 IOPS;大量摄像头优先有线网络。
- 不要把数据库文件放在高延迟网络盘,录像目录和数据库可以分开规划。
录像缺失排查
- 确认
record.enabled: true。 - 确认摄像头存在 record role。
- 检查 FFmpeg 是否持续收到主码流。
- 检查磁盘可用空间、挂载状态和写权限。
- 查看保留策略是否已经把片段清理。
验证
不要只看“录像开关”。应在时间线向前回放至少 10–20 分钟,确认片段连续、音视频同步、Seek 正常,并重启服务后再确认仍能写入。
Recording configuration
Securex NVR records stream segments and then applies retention rules. Continuous, motion, alerts, and detections determine how long overlapping segments remain on disk.
Retention layers
| Layer | Meaning | Typical use |
|---|---|---|
| continuous | Keep video regardless of activity | Forensic continuity |
| motion | Keep periods containing motion | Save storage |
| alerts | Segments overlapping Alert review items | Important people/vehicle events |
| detections | Segments overlapping Detection review items | General detections |
Balanced example
record:
enabled: true
continuous:
days: 1
motion:
days: 7
alerts:
retain:
days: 30
mode: motion
detections:
retain:
days: 14
mode: motionStorage estimate
A useful approximation is GB/day ≈ average Mbps × 10.8 per camera. A 4 Mbps stream is roughly 43 GB/day; eight such cameras are about 344 GB/day before retention pruning.
NAS guidance
- Mount storage before the container starts so recordings do not fall back to a local directory.
- Use reliable wired networking and enough IOPS for multiple high-bitrate cameras.
- Keep the database on low-latency storage even when recordings are on NAS.
Missing recordings
- Confirm recording is enabled.
- Confirm a record role exists.
- Check FFmpeg continuity.
- Check free space, mount state, and permissions.
- Review retention settings.
Verify
Seek backward at least 10–20 minutes, check segment continuity and A/V sync, and verify that recording resumes after a service restart.
Configuración de grabación
Securex NVR guarda segmentos y aplica reglas de retención. continuous, motion, alerts y detections determinan cuánto tiempo permanece cada segmento.
Capas de retención
| Capa | Significado | Uso |
|---|---|---|
| continuous | Vídeo siempre | Continuidad forense |
| motion | Periodos con movimiento | Ahorrar espacio |
| alerts | Segmentos de Alerts | Eventos importantes |
| detections | Segmentos de Detections | Detecciones generales |
Ejemplo equilibrado
record:
enabled: true
continuous:
days: 1
motion:
days: 7
alerts:
retain:
days: 30
mode: motion
detections:
retain:
days: 14
mode: motionCálculo de espacio
Una aproximación útil: GB/día ≈ Mbps medios × 10.8 por cámara. Un stream de 4 Mbps consume unos 43 GB/día.
NAS
- Monte el almacenamiento antes de arrancar el contenedor.
- Use red cableada e IOPS suficientes.
- Mantenga la base de datos en almacenamiento de baja latencia.
Si faltan grabaciones
- Confirme que record está habilitado.
- Confirme el rol record.
- Revise FFmpeg.
- Revise espacio, montaje y permisos.
- Revise retención.
Verificación
Retroceda 10–20 minutos, compruebe continuidad, sincronía y que la grabación continúe después de reiniciar el servicio.
