> every wifi ONVIF camera
I haven't tried a lot of wifi cameras, but I'm not surprised you're having trouble, particularly with multiple simultaneous streams talking directly to the camera.
* Wired should be much more successful. To be clear, wired cameras still have crap firmware [1] but you should be able to get a stable stream.
* If the camera must be wireless, try using an RTSP proxy server so that there's only one direct client. The proxy server can multiplex so you can have several things connecting to it, and ideally they go over the wired LAN. Even if they don't, the wifi hardware/software on anything that isn't a cheap camera is probably a lot more stable. Also, the RTSP implementation is probably a lot better at handling mixed network conditions. I've noticed several cameras' RTSP/TCP support (aka RTP over RTSP interleaved channels) will truncate RTSP data messages when the TCP send buffer fills, throwing off the framing. Nothing good happens after that. And UDP has its own problems (single lost packet => seconds of video questionable/useless, but still sent, and there's no real congestion handling unless they've done a miracle in application code with infrequent RTCP reports). Edit: also, some cameras have a particular bug [2] in which they will continue sending RTP-over-TCP data to a file descriptor after it's closed. The file descriptor is often reused while this is still happening, which causes all sorts of problems, not the least being sending sensitive data over an unauthenticated channel.
[1] In particular, I have very low expectations for their security. Poor software quality, backdoors. Firewall them so nothing can connect to them other than your proxy server / NVR and so that they can't connect out either.
[2] https://github.com/scottlamb/retina/issues/17