Change perspective of a video

Dear Community, I am fairly new to blender and have a problem for which I would like to obtain your advice. I want to record soccer games with two cameras. Both cameras are positioned at the middle-line whereby each camera records the continuously the match on one half of the pitch including the middle-line. My idea is to combine these two videos into a single one using the middle-line as shared point. This aspect I got to work in blender. The problem resides in that both videos are recorded from a different perspective. The side-lines are hence not parallel. So, what I would like to know is whether blender can re-calculate the perspective of the two videos in such a manner that the side-lines are parallel. Do you have any idea on how this may be done? There is a professional solution to this problem using three cameras which, of course, is much to expensive (see http://www.matchanalysis.com/k2.htm).
Thx for you help!!

Welcome to the blender community!

The short answer is, yes, it can be done. But the problem is finding the best way.

The easiest way would be to map the videos to planes and transform them so they are in line with the camera as you want. But you may notice that the quality drops significantly after you render them.

A second way would take time to figure out, but by using the compositor’s nodes you could probably make it work through a combination of distort and math nodes.

In either case it may take several hours to figure out the best solution. But afterwards it will be easy to import the videos each time and render them together stitched.

Good luck!