Have you not tried just using HA’s CAMERA RECORD service?
Be sure to specify a lookback value to “rewind” the video some. That’s due to the aforementioned lag.
Addendum:
@himdola - Since you are using Blue Iris, have you tried using the BI integration for accessing recordings?