may help you . The overlay does not automatically end, remember you can also overlay an image instead of a video for instance. Give a frame for the end of the overlay and then continue the original video from there, like so:
I hope this helps you . I've never found a way to pass a command line parameter directly to a AVS script. Generating scripts on the fly is the only way I was able to get it working. I know this is not the answer you're looking for - nevertheless two approaches for generating scripts:
if "%1" == "" (
echo No input video found
IF "%1"=="" GOTO :EOF
:: Do whatever you want with the script
:: I use virtualdub...
"%vdub%" /i "%pth%Template.vdscript" "%pth%_tmp.avs"