Combine multiple MP4 videos into one

Originally posted on 2021-01-05

This is a nasty one-liner but it works. Basically we need to use ffmpeg's concat feature and feed it our file names in a specific format. One issue is that the video filenames are relative to the input list's filename. When using process substitution you'll end up getting an error about your video files not being found in /dev/fd/. After some banging of my head against the wall I ended up with the command below.

NOTE: This only works if your video files are named in such a way that ls | sort will list them in order!