@echo off IF "%5"=="" GOTO HAVE_0 ffmpeg -i %1 -i %2 -i %3 -filter_complex "[0]volume=0[a];[1]adelay=%4|%4,volume=0.4[b];[2]adelay=%4|%4,volume=2[c];[a][b][c]amix=3" -c:v copy -ac 2 %5 GOTO DONE :HAVE_0 ffmpeg -i %1 -i %2 -filter_complex "[0]volume=0.2[1]adelay=%3|%3,volume=1[b];[0][b]amix=2" -c:v copy -ac 2 %4 :DONE