Render a video with user input

I am a new user in this forum.Not sure where to put this,and also if this is even related to VFX area or server side video rendering!!
Please forgive me if its not the place to talk about it.
I wanted to learn how to render a video with user submitted input and get it downloaded on device for playing later.
It sounds confusing I know.
Lets break it down.Suppose there is a video of a wall of a building.
By any suitable input method: textbox for instance.I input hello and click submit…the word gets submitted to the video on server where that word HELLO gets written on the wall of the building and the finished video gets downloaded for later viewing.
I can send the php url with word to be inputted on the server and video gets rendered and later I could download it.
Now comes the VFX issue…I wish to use motion tracking on the wall and the word submitted…meaning the word is fixed to the wall regardless of the camera movement making it look real.
I have a basic idea of how it is going to be done.
The video on server is made with tracker points on wall already, while shooting…the user submitted word uses the tracking data of the video and gets rendered.

Please someone here guide me what could be the right way to go on this ,using ffmpeg and php for online rendering seems one way to go but adding motion tracking to align the word on wall,dunno how to achieve this.

many thanks for reading this…if this makes any sense at all.