Using pad, overlay and blend … (1)

Watch on youtube.com
doc

https://ffmpeg.org/ffmpeg-filters.html#blend, https://ffmpeg.org/ffmpeg-filters.html#pad, https://ffmpeg.org/ffmpeg-filters.html#overlay, https://ffmpeg.org/ffmpeg-filters.html#amerge, https://ffmpeg.org/ffmpeg-filters.html#pan

In video comparison, overlapping should often be allowed.

The method shown here is never wise and the appearance is quite complicated. However, you can get the results you see.

#! /bin/sh
pref="`basename $0 .sh`"
vleft="EuropeanArchive.mp4"
vright="Eduardo.mp4"

#
fac=${1:-80}
cx=$((16 * ${fac}))
cy=$((9 * ${fac}))
ox=$((1920 - 16 * ${fac}))
oy=$((1080 - 9 * ${fac}))
#
ffmpeg -y -i "${vleft}" -i "${vright}" -filter_complex "
[0:v]scale=${cx}:${cy},pad=1920:1080:0:0,setsar=1[v1_1];
[1:v]scale=${cx}:${cy},setsar=1[v2_1];
[v1_1][v2_1]overlay=x=W-w:y=H-h[v3_1];

[0:v]scale=${cx}:${cy},setsar=1[v1_2];
[1:v]scale=${cx}:${cy},pad=1920:1080:${ox}:${oy},setsar=1[v2_2];
[v2_2][v1_2]overlay=x=0:y=0[v3_2];

[v3_1][v3_2]blend=all_mode=average[v];


[0:a][1:a]amerge=inputs=2,pan=stereo|c0<c0+c1|c1<c2+c3[a]
" -map '[v]' -map '[a]' \
  "${pref}.mp4"