unreal engine automating video creation

My idea is simple and maybe difficult to realize, here’s what I would to achieve:

a make a sprite that react to some key, for e.g. jump if I press a key, or ran etc.
well this commands, jump, run and move is wrote in a json file.
When I run this “game” the file is read and executed, and so I have a prerecorded movements, now I would like to transform this into video automatically.

So wrapping up I’ve an automated video creator based on a json file, the problem is that I dunno how to create a video (see Record Gameplay in Unreal Engine | Unreal Engine 5.0 Documentation),

I think that the one way can be python script but I know that is impossible to run in gameplay, so any other possible solution?

thanks