Software to combine two videos of the same scene? I think this software idea seems simple enough to have been created, but it might be so specific that no one has done it. I'm just wondering if it already exists.

I'm looking for some program which takes two videos which have identical backgrounds (or nearly identical, there are likely slight intensity differences in pixels) and allows you to combine the dynamical elements of each into a single video. For example, If I have a video of a room where I'm standing on the left side of the room, then another video from the same view where I'm standing on the right, and then the program would combine the two so I'm standing on both left and right. I guess things like shadows and whatnot would cause some problems here, but the general idea shouldn't be too ridiculous. Does something like this exist?

Thank you much!
Sony Vegas Pro can do it but it is a bit pricey. In general, you need any video editor that supports masking and compositing.