# get ALL the file names INTO the list WITH required format printf "file '%s'\n" *.avi > ALL.list # concatente (merge, join) the videos FROM the list ffmpeg -f CONCAT -safe 0 -i ALL.list -c copy mergedOutput.avi