Thanks so much for this. I had been naively using motioneye to record continuously and the recompression was hammering the CPU and giving me a lousy frame rate.

This direct stream recording approach works so very much better. Thanks!