Your best bet would be a professional video editor such as Adobe Premiere, but you specified freeware, so I direct you to a favourite of mine: ffmpeg or avconv. (It's the same program, basically. The kind people in the comments might be able to help clarify which one is available for Windows 7. I use avconv because that's the one in my Debian repository, but the download for ffmpeg for Windows looks simpler.)
I am not sure whether the commandline interface falls under your definition of "scripting", but I really believe this to be the best and easiest (and perhaps fastest) way to accomplish the task.
Also, ffmpeg/avconv is usually known only for trans-, en- and decoding, but it can do a lot more.
ffmpeg can make these mosaics, place a video on a static background image, overlay on top of another video (but that one looks like it's in C#) and overlay two videos on top of each other (commandline).
The first link about the mosaics is a tutorial from ffmpeg.org, so it explains a lot of what is going on.
ffmpeg/avconv is very powerful, but sometimes it can take a while to figure out precisely what you want to do and how you want to do it. I am now going to attempt to construct a specific solution.
Say the video is in standard HD 1920x1080, ratio 16:9.
First, you need to figure out the size of the overlay video. You probably would have wanted to see this visually, but you can try this process multiple times until you are satisfied. If the two videos are the same size, you can perhaps make the overlay an quarter of the horizontal size of the background. The overlay would then be 1920/4=480 wide and (1920/4)*(9/16)=270 high at coordinates (from top left) x=1920-480=1440 and y=1080-270=810.
This is just some Mathematics because I wanted to make the video precisely a quarter of the horizontal size. You can just specify the size and position of the overlay.
Using filter_complex (documentation), set the overlay position:
And adding the scale filter for the overlay:
-filter_complex " scale=480:270 [over]; [over] overlay=1440:810"
(The numbers in square brackets specify which of the inputs is acted on.) (The scale-filter needs to go before the overlay filter, otherwise the overlay-video will flow outside the background/output and cause an error.)
Constructing the entire command would then be as follows:
ffmpeg -i background.movie -i overlay.movie -filter_complex " scale=480:270 [over]; [over] overlay=1440:810" output.movie
("-i" designates inputs; the output is the only other argument without the "-" option-indicator.)
- Install ffmpeg/avconv
- Copy and paste the command into your commandline interface
- Change the input and output files. (You could first navigate to the specific folder and then just run with the filenames, or you can specify the full path in the command.) (ffmpeg/avconv automatically selects the format from the output filename extension, so just change it to e.g. ".mp4".)
- Change the resolutions/sizes.
- Execute the command.
I have tested this with avconv with precisely the same syntax (with other resolutions in ratio 4:3, just because that was the default) and was able to change this
(These are VLC snapshots.)
Thanks and Bibliography