How to record video to file

Hi, I’m newer for UE, In my business scene, I need to use cpp code to drive UE Blueprint’s digithuman content to make some action and record to video file, And the UE would run on server with no screen, after few days learn about UE, I have no idea about how to done this, I’m so shame… :frowning: , So, I want to ask some question about my research.

First, I think, I should make a engine plugin, in which do this flow:
receive http request → call blueprint’s function(digithuman dance etc…) → begin record → end record(when dance finish) → save to file.

In this flow, I think the key point is how to record and save to file in cpp code

I find the UTakeRecorder series classes and UMovieSceneCapture series classes, Can I use these classes to record file? is there some example about this? if these classes can’t archive my purpose, Any other solution about this? please give me some advise about any section in my idea flow about my purpose, especially the record to file , thank you very much!!