for to mention, scrypted is probably better if you have homekit:
https://github.com/koush/scrypted
"Scrypted is a high performance home video integration platform and NVR with smart detections. Instant, low latency, streaming to HomeKit, Google Home, and Alexa. Supports most cameras."