title: ffmpeg: concat video and audio files
body: <p>Is it possible to concatenate multiple files, if some of the files are videos with audio and some are audio only. The end result should look like this:</p>
  
  <pre><code>--------------------------------------------------------
  |###(v/a)### | ### (a) ### | ### (a) ### | ###(v/a)### |
  --------------------------------------------------------
  
  v/a: video + audio
  a  : audio only (blank screen)
  </code></pre>
  
  <p>I tried to do it with the following command:</p>
  
  <pre><code>ffmpeg 
  -i chunk1.mp4 
  -i chunk2.m4a 
  -i chunk3.mp4
  -filter_complex "[0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] concat=n=3:v=1:a=1 [v] [a]"
  -map "[v]" -map "[a]" -strict -2 result.mp4
  </code></pre>
  
  <p>So I tried to only use the audio track from input 1 (<code>[1:a:0]</code>) but unfortunately, I'm getting this error message:</p>
  
  <pre><code>Stream specifier ':v:0' in filtergraph description [0:v:0] [0:a:0] [1:v:0] [1:a:0] [2:v:0] [2:a:0] concat=n=3:v=1:a=1 [v] [a] matches no streams.
  </code></pre>
  
  <p>I thought that this must be possible somehow, since I can also combine a large audio file and a small video with ffmpeg. The result would then be a video file where the last frame just freezes but the audio still plays along. I would like to achieve the same result with either a frozen last frame or simply a black frames. Is this possible? </p>