Batch add intro and outro to videos I have 500+ videos. I need to add intro and outro to them.

Found this .bat script on a different website, and tried it. But it didn't work for me. As the script only ads outro - still didn't work.

SET RESOLUTION="1280:720"
SET INPUT_FOLDER="input"
SET INTRO="intro.mp4"
SET OUTPUT_FOLDER="output"

for %%a in ("%INPUT_FOLDER%\*.*") do ffmpeg -i %INTRO% -i "%%a" -filter_complex "[0:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,pad=%RESOLUTION%:(ow-iw)/2:(oh-ih)/2[v0]; [1:v]scale=%RESOLUTION%:force_original_aspect_ratio=1,pad=%RESOLUTION%:(ow-iw)/2:(oh-ih)/2[v1]; [v0][0:a][v1][1:a]concat=n=2:v=1:a=1[v][a]" -map [v] -map [a] "%OUTPUT_FOLDER%\%%~na.mp4"


I'm on Windows OS, but I also have Linux Mint installed on my workstation.

My question is: how to add 1 intro and 1 outro to 500+ videos?

PS: Intro and Outro files are the same file.

Thank you.
Did you install ffmpeg? This script uses it so it'd be good to have it...

The Idea is that you create a txt-document with all the file-names inside, which will then get stitched together. You can read up on how it works here:


  https://trac.ffmpeg.org/wiki/Concatenate