# 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