Using pad, overlay and blend … (3)¶

doc

In video comparison, overlapping should often be allowed.

The approach shown here is an approach that seems rather absurd than the one shown earlier. However, depending on the input, the processing performance is the best compared with the previous one and two before.

#! /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},setsar=1,split[0v_1][0v_2];
[1:v]scale=${cx}:${cy},setsar=1,split[1v_1][1v_2];

[0v_2]crop=${cx}-${ox}:${cy}-${oy}:${ox}:${oy}[0v_c];
[1v_2]crop=${cx}-${ox}:${cy}-${oy}:0:0[1v_c];
[v_ov][v_c]overlay=x=${ox}:y=${oy}[v];