KaZa Home automation

Home automation

Video integration

Video (RTSP / Hikvision)

Package kaza-video, module org.kazoe.video. Records IP camera streams without decoding (stream copy to Matroska), reacts to camera events and manages retention. Designed to replace ZoneMinder on a small server.

In development. Recording, retention and Hikvision events are implemented and tested. Live view and HTTP triggers are planned.

Building blocks

Type Role
RtspSource RTSP client in its own thread, auto-reconnect (1 s doubling to 30 s), TCP or UDP
VideoRecorder Matroska recording, H.264/H.265 + AAC/G.711 copied as is, pre-roll and post-roll, segmenting, detection XML stored as tag and .mkv.xml
VideoRetention Deletes oldest files above maxAge, maxSize or below minFree
HikvisionEvents ISAPI event stream (digest auth): motion, human, car, triggered
HttpTrigger Planned
VideoServer Planned: live view over TLS, port 1753, mutual TLS with the same CA as kazad. Access per user from the client certificate CN

Example

import org.kazoe.video 1.0

RtspSource { id: cam; address: "rtsp://user:pwd@192.168.1.161/Streaming/Channels/101" }

HikvisionEvents {
    id: hook
    host: "192.168.1.161"; login: "admin"; password: "..."
    eventTypes: ["VMD"]; holdTime: 10
}

VideoRecorder {
    source: cam; name: "pool"
    output: "/srv/video"
    preRoll: 5; postRoll: 10
    report: hook.xml
    record: hook.human
}

VideoRetention { directory: "/srv/video"; maxAge: 30; maxSize: 500; minFree: 20 }

Requirements

FFmpeg libraries (libavformat, libavcodec, libavutil). Tested with FFmpeg 7.1 target (Debian trixie) and 8.x. Camera credentials are never logged (masked as ***@).