This note shows how to use go2rtc to pull Xiaomi camera streams directly and reuse them across NVR, HomeKit, and Frigate.
Docker deployment example
|
|
go2rtc web UI:
|
|
Stream config example
|
|
RTSP URL format:
|
|
Quality and parameters
Quality is controlled with values from 0 to 5:
0usually means auto1meanssd2meanshd(default in go2rtc)
Some newer models may map HD to 3. Older models can break codec settings at 3, so avoid applying one fixed value to all devices.
Use subtype=hd/sd/auto/0-5 to set quality:
|
|
For dual-lens cameras, use second channel with channel=2:
|
|
Summary
Once go2rtc is in front, one RTSP source can serve NVR recording, Frigate detection, and HomeKit preview at the same time, which simplifies maintenance.
References
- Camera support list: https://github.com/AlexxIT/go2rtc/issues/1982
- Official Xiaomi notes: https://github.com/AlexxIT/go2rtc/blob/master/internal/xiaomi/README.md
- Docker image: https://hub.docker.com/r/alexxit/go2rtc