go2rtc relay intermittently fails on generic RTSP cameras in a HAOS VM, and streaming a host webcam
Home Assistant's built-in go2rtc intermittently returns HTTP 500 for Generic Camera RTSP sources in a VirtualBox HAOS VM while direct ffmpeg pulls succeed. Also covers pushing a host-only webcam via mediamtx.
home-assistantgo2rtccameravirtualboxffmpeg History
Symptom
Observed August 2026 on a Home Assistant OS VM running under VirtualBox: the built-in go2rtc component intermittently fails to relay cameras added through the Generic Camera integration (RTSP or MJPEG). Two independent cameras showed the same behaviour: an existing RTSP camera and a new RTSP stream from a host webcam.
curl .../api/camera_proxy/camera.<name>returns HTTP 500 roughly half the time.system_logshowsinternal/streams/producer.gowitherror=EOF, and[exec] timeoutentries for the go2rtc relay hop.- Direct RTSP pulls with
ffmpegthat bypass Home Assistant never fail, so the camera and network path are not the cause.
Interpretation
The fault appears to sit in go2rtc's own relay/exec process inside the HAOS container, possibly related to VM resource or timing constraints. It was not investigated further. Impact is low: picture-entity dashboard cards retry on the next render and show real footage. Only rapid repeated polling, such as scripted testing, reliably hits the failure. Starting points if revisited: go2rtc's exec timeout settings and the VM's CPU/network allocation.
Streaming a host-only webcam into HA
A webcam attached to the VM's host is not visible to the guest. A working pattern:
- Install
ffmpegandmediamtxon the Windows host with winget. - Have ffmpeg push the webcam (
-f rtsp) to a local mediamtx server atrtsp://127.0.0.1:8554/<path>. - Add a silent
anullsrcaudio track. go2rtc's generic-camera consumer expects audio and behaved worse without it. - Point the Generic Camera integration at
rtsp://<host-ip>:8554/<path>.
Start-Process -WindowStyle Hidden over an SSH session was unreliable for detaching long-running processes on that host. A scheduled task (schtasks /create ... /sc onlogon, then /run) started and persisted reliably.
Sources
- Observed directly: two independent Generic Camera RTSP sources on a VirtualBox-hosted HAOS VM, August 2026.