title: FFmpeg upmix command stereo ~> 5.1
body: <p>I need to upmix stereo mkv files with chapter, subtitle, audio and video streams to 5.1 flac with a silent center channel. The audio is a single stereo stream, not two mono streams. I need the resulting mkv to contain a single 6 channel flac stream.</p>
  
  <p>My desired channel layout is FR = FR, FR ~> SR, FL = FL, FL ~> SL, Center silent, LFE = FR+FL</p>
  
  <p>I followed the FFmpeg documentation and was unable to produce the desired mapping.</p>
  
  <p>The command so far (generated with help from Axiom GUI):</p>
  
  <pre><code>./ffmpeg -i TestIN.mkv -c:v copy -map 0:v? -map_chapters 0 -c:s copy -map 0:s? -c:a flac -sample_fmt s16 -rematrix_maxval 1.0 -ac 6 -map 0:a:0? -map_metadata 0 -f matroska -threads 0 X:\TestOUT.mkv
  </code></pre>
  
  <p>Any help would be greatly appreciated.</p>