Dedicated Server, demo recording

So from my understanding, a dedicated server has no player controller and therefore no console, so I can’t simply add a blueprint executeconsolecommand node to run the demorec command.

Could someone explain how I could do this via C++ (assuming it’s not possible via BP)?

I saw an old post of someone mentioning calling StartRecordingReplay() manually, but I’m struggling to use that, I get access errors. I’m a bit confused how to cast it and call the function.

Also, I’d like to execute the demo.recordhz function to set the hz, or at least set a good default.

Thanks in advance for any help!