How can I capture user's moving and then export this to video file?

I want to make the one button that export the video file that is captured the user’s moving in unreal engine.
How can I capture and export this to video file?

I think that Twitch streaming features are good search point, but most likey that would need C++

Thanks for your response.
How can I capture using c++. Can you send me the sample is relevant to this?