#!/bin/sh #Description: Intakes three parameters. Parameter one is a background video that will have parameter two's video overlayed upon it in the top right. Parameter three will act as the output location for this process. #Axioms: #Dependencies: https://packages.debian.org/sid/ffmpeg ffmpeg -i "$1" -stream_loop -1 -i "$2" -filter_complex "[1:v]scale=250:-1[v2];[0:v][v2]overlay=main_w-overlay_w:5:shortest=1;amerge=inputs=2" -c:v libx264 "$3" || ffmpeg -i "$1" -stream_loop -1 -i "$2" -filter_complex "[1:v]scale=250:-1[v2];[0:v][v2]overlay=main_w-overlay_w:5:shortest=1" -c:v libx264 "$3"