title: FFmpeg not copying all audio streams
body: <p>I'm having trouble getting ffmpeg to copy all audio streams from a .mp4 file. After hours of searching online, it appears this should copy <em>all</em> streams (<a href="https://trac.ffmpeg.org/wiki/Map#Example4" rel="noreferrer">as shown in example 4 here</a>):</p>
  
  <pre><code>ffmpeg -i in.mp4 -map 0 -c copy out.mp4
  </code></pre>
  
  <p><code>in.mp4</code> contains 3 streams:</p>
  
  <ul>
  <li>Video</li>
  <li>Audio track 1</li>
  <li>Audio track 2</li>
  </ul>
  
  <p><code>out.mp4</code> (which should be identical to <code>in.mp4</code>) contains only 2 streams:</p>
  
  <ul>
  <li>Video</li>
  <li>Audio track 1</li>
  </ul>
  
  <p>FFmpeg does appear to correctly identify all 3 streams, but doesn't copy all of them over. Output from FFmpeg:</p>
  
  <pre><code>Stream mapping:
    Stream #0:0 -&gt; #0:0 (copy)
    Stream #0:1 -&gt; #0:1 (copy)
    Stream #0:2 -&gt; #0:2 (copy)
  </code></pre>
  
  <p><strong>Edit:</strong> Output from <code>ffmpeg -v 9 -loglevel 99 -i in.mp4</code>:</p>
  
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from in.mp4':
    Metadata:
      major_brand     : isom
      minor_version   : 512
      compatible_brands: isomiso2avc1mp41
      encoder         : Lavf57.36.100
    Duration: 00:00:06.03, start: 0.000000, bitrate: 5582 kb/s
      Stream #0:0(und), 1, 1/15360: Video: h264 (Main), 1 reference frame (avc1 /
  0x31637661), yuv420p(tv, bt470bg/unknown/unknown, left), 1920x1080 (0x0) [SAR 1:
  1 DAR 16:9], 0/1, 5317 kb/s, 30 fps, 30 tbr, 15360 tbn, 60 tbc (default)
      Metadata:
        handler_name    : VideoHandler
      Stream #0:1(und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
   stereo, fltp, 128 kb/s (default)
      Metadata:
        handler_name    : SoundHandler
      Stream #0:2(und), 1, 1/48000: Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz,
   stereo, fltp, 128 kb/s
      Metadata:
        handler_name    : SoundHandler
  Successfully opened the file.
  At least one output file must be specified
  [AVIOContext @ 0000000001c2b9e0] Statistics: 153350 bytes read, 2 seeks
  </code></pre>
  
  <p><strong>Edit 2 (solved):</strong> I managed to find the correct syntax from <a href="https://trac.ffmpeg.org/ticket/1056" rel="noreferrer">this ticket</a>. For any others that are interested, the correct syntax is:</p>
  
  <p><code>ffmpeg -i in.mp4 -vcodec copy -c:a copy -map 0 out.mp4</code></p>
  
  <p>This will copy all streams.</p>