title: How to concat videos from a file list while adding black fade transitions in ffmpeg
body: <p>I have a piece of code that concats videos from a file list. It works perfectly.</p>
  <pre><code>ffmpeg -f concat -safe 0 -i file_list.txt -c copy mergedVideo.avi
  </code></pre>
  <p>However, I want to add a black fade transition between each video. I found this code snippet that apparently does this, but it requires you to input each file by hand.</p>
  <pre><code>ffmpeg -i in.mp4 -i main.mp4 -i out.mp4 -filter_complex \
    &quot;[0:v]fade=type=out:duration=2:start_time=28,setpts=PTS-STARTPTS[v0]; \
     [1:v]fade=type=in:duration=2,fade=type=out:duration=2:start_time=28,setpts=PTS-STARTPTS[v1]; \
     [2:v]fade=type=in:duration=2,setpts=PTS-STARTPTS[v2]; \
     [v0][0:a][v1][1:a][v2][2:a]concat=n=3:v=1:a=1[v][a]&quot; \
    -map &quot;[v]&quot; -map &quot;[a]&quot; output.mp4
  </code></pre>
  <p>I want to be able to read all the video files from a txt file as I have hundreds of videos. How do I combine these two snippets, or is there a better way to accomplish the concat with fade transitions?</p>