I've been able to compile the master, refactor and your version. So far, I've only been able to get the master branch one to successfully export a video.
I wasn't expecting your version to be working but I gave it a try anyways. I got as far as Function too small to hook safely! and Failed to hook ID3DeviceContext::Draw ### error code: -2147467259
I'm not a software developer so I probably can't help much.