Please help out... projection mapping project using Unreal Engine

I might come to have a mega projection mapping project that I have proposed to use unreal engine. I fired up unreal earlier to do some capture scene and have them mapped onto 4 panels for testing and found some issues.

Is there a way to distort so that I can manipulate the image or undistort the lens? I read that spout is able to do the trick but I can’t understand what exactly spout does? Can anyone help out and give me some advice? Is it possible to script via C (I have programmers in my company) or something which allows the final output of the image to be distorted to map onto the real life cubes?