AVIWriter FRenderTarget is null

I am building a custom version of the engine. After removing all of the UE_Minimal_Build requirements from AVIWriter, CapturePin, and CaptureSource. I’ve added direct show to the lean and mean configuration. In a Debug / Development build, when AVIWriter is called a viewport is passed in but the FRenderTarget returns null. In an editor build FRenderTarget is populated as expected. What is preventing FRenderTarget from being populated in the Debug / Development build?

I can capture movie in runtime and with editor,but without “RIFF” in avi file when run by exe.

How to use AVIWriter export movie?
Share to me. please.