Overlay Video and Insert video background looping with ffmpeg

Solution 1:

Try

ffmpeg -i main.mp4
       -vf "movie=bg.mp4:loop=200,hue=s=0[bg];
           [in]setpts=PTS/2,scale=iw/2:-1,pad=iw+20:ih+20:10:10:color=yellow[m];
           [bg][m]overlay=shortest=1:x=(W-w)/2:y=(H-h)/2"
       -af "atempo=2.0,volume=1.5" -c:v libx264 completed.mkv