title: FFMPEG amix filter volume issue with inputs of different duration
body: <p>I noticed that <code>ffmpeg amix</code> filter doesn't output good result in specific situation. It works fine if input files have equal duration. In that case volume is dropped in constant value and could be fixed with <code>",volume=2"</code>.</p>
  
  <p>In my case I'm using files with different duration. Resulted volume is not good. First mixed stream resulted in lowest volume, and last one is highest. You can see on image that volume is increased linearly withing a time.</p>
  
  <p><a href="https://i.stack.imgur.com/9G6T0.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9G6T0.png" alt="enter image description here"></a></p>
  
  <p>My command:</p>
  
  <pre><code>ffmpeg -i temp_0.mp4 -i user_2123_10.mp4  -i user_2123_3.mp4  -i user_2123_4.mp4  
  -i user_2123_7.mp4  -i user_2123_5.mp4  -i user_2123_1.mp4  -i user_2123_8.mp4  
  -i user_2123_0.mp4  -i user_2123_6.mp4  -i user_2123_9.mp4  -i user_2123_2.mp4  
  -i user_2123_11.mp4 -filter_complex "[1:a]adelay=34741.0[aud1];
  [2:a]adelay=18241.0[aud2];[3:a]adelay=20602.0[aud3];
  [4:a]adelay=27852.0[aud4];[5:a]adelay=22941.0[aud5];
  [6:a]adelay=13142.0[aud6];[7:a]adelay=29810.0[aud7];
  [8:a]adelay=12.0[aud8];[9:a]adelay=25692.0[aud9];
  [10:a]adelay=32143.002[aud10];[11:a]adelay=16101.0[aud11];
  [12:a]adelay=40848.0[aud12];
  [0:a][aud1][aud2][aud3][aud4][aud5][aud6][aud7]
  [aud8][aud9][aud10][aud11]
  [aud12]amix=inputs=13:duration=first:dropout_transition=0" 
  -vcodec copy -y temp_1.mp4
  </code></pre>
  
  <p>That could be fixed by applying silence at the beginning and end of each clip, then they will have same duration and volume will be at the same level.</p>
  
  <p>Please suggest how I can use <code>amix</code> to mix many inputs and ensure constant volume level.</p>