Body: <p>I have a file that has the following format (note the number of tracks and channels within each track):</p>
  
  <pre><code>Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mov':
    Metadata:
      major_brand     : qt
      minor_version   : 537199360
      compatible_brands: qt
      creation_time   : 2015-05-13 12:07:36
      encoder         : Lavf56.15.102
    Duration: 00:01:02.04, start: 0.000000, bitrate: 29083 kb/s
      Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 19872 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
      Metadata:
        creation_time   : 2015-05-13 12:07:36
        handler_name    : Apple Alias Data Handler
        encoder         : Lavc56.1.100 prores
      Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 8 channels (FL+FR+FC+LFE+BL+BR+DL+DR), s32 (24 bit), 9216 kb/s (default)
      Metadata:
        creation_time   : 2015-05-13 12:07:36
        handler_name    : Apple Alias Data Handler
  </code></pre>
  
  <p>I want to create 2 files from that - one with the video, and one with the audio. I also want the audio file to have 7 tracks - one with the first 2 channels, and another 6 with each of the remaining channels.</p>
  
  <p>If I use the following command, </p>
  
  <pre><code>ffmpeg.exe -i "a.mov" -an -dn -sn -y "a.video.mp4" -map 0:1 -map_channel 0.1.0:0.0.0 -map_channel 0.1.1:0.0.1 -map 0:1 -map_channel 0.1.2:0.1.0 -map 0:1 -map_channel 0.1.3:0.2.0 -map 0:1 -map_channel 0.1.4:0.3.0 -map 0:1 -map_channel 0.1.5:0.4.0 -map 0:1 -map_channel 0.1.6:0.5.0 -map 0:1 -map_channel 0.1.7:0.6.0 -acodec pcm_s16le -ar 48000 -y "a.audio.mov"
  </code></pre>
  
  <p>...I get the correct video file but the audio file contains 7 tracks, each one containing 8 channels.</p>
  
  <p>However, if I skip the video part and do:</p>
  
  <pre><code>ffmpeg -i "a.mov" -map 0:1 -map_channel 0.1.0:0.0.0 -map_channel 0.1.1:0.0.1 -map 0:1 -map_channel 0.1.2:0.1.0 -map 0:1 -map_channel 0.1.3:0.2.0 -map 0:1 -map_channel 0.1.4:0.3.0 -map 0:1 -map_channel 0.1.5:0.4.0 -map 0:1 -map_channel 0.1.6:0.5.0 -map 0:1 -map_channel 0.1.7:0.6.0 -acodec pcm_s16le -ar 48000 -y -ss 00:00:00 -t 00:01:02.0400000 "a.audio.mov"
  </code></pre>
  
  <p>I get the audio I'm expecting. </p>
  
  <p>A workaround could be to call FFmpeg twice, one for video and one for audio, but I'd ideally like to avoid that.</p>
  
  <p>Am I doing something wrong? Is map_channel not meant to work like that or is it a bug?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-23T11:50:02.830Z
Comments.Text: I think you need to specify `-ac 1` to tell it to make the audio streams single channel. When you use the map command it makes a new stream, which can have any number of channels, and it defaults to the same number as the input.
Comments.UserDisplayName: stib
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-23T14:43:44.673Z
Comments.Text: -ac 1 mixes all the channels together so it won't give me what I need (as described in the question). Are you sure that this is the expected behavior of the map command? Because it looks like it's working as I expect when I only have an audio file as output.
Comments.UserDisplayName: charisk
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-24T02:08:31.033Z
Comments.Text: have a look at http://ffmpeg.org/ffmpeg.html#Audio-Options I think that means you need to do `-ac:[stream specifier] 1` e.g. `-ac:0.0.0 1 -ac:0.1.0 1…` for each of your output streams. See if that works.
Comments.UserDisplayName: stib
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-07-24T10:16:08.133Z
Comments.Text: Tried it and it doesn't do what I'm after - it downmixes channels into one so I end up with the audio of all 8 channels in a single channel. What I want is to just grab specific files.
Comments.UserDisplayName: charisk
Tags: <ffmpeg>
Title: FFmpeg map_channel and video
UserDisplayName: charisk
ThreadText: # FFmpeg map_channel and video
  
  (Asked by: username_0 on 2015-07-21)
  
  I have a file that has the following format (note the number of tracks and channels within each track):
  
  ```
  Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'a.mov':
    Metadata:
      major_brand     : qt
      minor_version   : 537199360
      compatible_brands: qt
      creation_time   : 2015-05-13 12:07:36
      encoder         : Lavf56.15.102
    Duration: 00:01:02.04, start: 0.000000, bitrate: 29083 kb/s
      Stream #0:0(eng): Video: prores (apch / 0x68637061), yuv422p10le, 1920x1080, 19872 kb/s, 25 fps, 25 tbr, 12800 tbn, 12800 tbc (default)
      Metadata:
        creation_time   : 2015-05-13 12:07:36
        handler_name    : Apple Alias Data Handler
        encoder         : Lavc56.1.100 prores
      Stream #0:1(eng): Audio: pcm_s24le (in24 / 0x34326E69), 48000 Hz, 8 channels (FL+FR+FC+LFE+BL+BR+DL+DR), s32 (24 bit), 9216 kb/s (default)
      Metadata:
        creation_time   : 2015-05-13 12:07:36
        handler_name    : Apple Alias Data Handler
  
  ```
  
  I want to create 2 files from that - one with the video, and one with the audio. I also want the audio file to have 7 tracks - one with the first 2 channels, and another 6 with each of the remaining channels.
  
  If I use the following command,
  
  ```
  ffmpeg.exe -i "a.mov" -an -dn -sn -y "a.video.mp4" -map 0:1 -map_channel 0.1.0:0.0.0 -map_channel 0.1.1:0.0.1 -map 0:1 -map_channel 0.1.2:0.1.0 -map 0:1 -map_channel 0.1.3:0.2.0 -map 0:1 -map_channel 0.1.4:0.3.0 -map 0:1 -map_channel 0.1.5:0.4.0 -map 0:1 -map_channel 0.1.6:0.5.0 -map 0:1 -map_channel 0.1.7:0.6.0 -acodec pcm_s16le -ar 48000 -y "a.audio.mov"
  
  ```
  
  ...I get the correct video file but the audio file contains 7 tracks, each one containing 8 channels.
  
  However, if I skip the video part and do:
  
  ```
  ffmpeg -i "a.mov" -map 0:1 -map_channel 0.1.0:0.0.0 -map_channel 0.1.1:0.0.1 -map 0:1 -map_channel 0.1.2:0.1.0 -map 0:1 -map_channel 0.1.3:0.2.0 -map 0:1 -map_channel 0.1.4:0.3.0 -map 0:1 -map_channel 0.1.5:0.4.0 -map 0:1 -map_channel 0.1.6:0.5.0 -map 0:1 -map_channel 0.1.7:0.6.0 -acodec pcm_s16le -ar 48000 -y -ss 00:00:00 -t 00:01:02.0400000 "a.audio.mov"
  
  ```
  
  I get the audio I'm expecting.
  
  A workaround could be to call FFmpeg twice, one for video and one for audio, but I'd ideally like to avoid that.
  
  Am I doing something wrong? Is map\_channel not meant to work like that or is it a bug?
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: I think you need to specify `-ac 1` to tell it to make the audio streams single channel. When you use the map command it makes a new stream, which can have any number of channels, and it defaults to the same number as the input.  
  > **username_0**: -ac 1 mixes all the channels together so it won't give me what I need (as described in the question). Are you sure that this is the expected behavior of the map command? Because it looks like it's working as I expect when I only have an audio file as output.  
  > **username_1**: have a look at http://ffmpeg.org/ffmpeg.html#Audio-Options I think that means you need to do `-ac:[stream specifier] 1` e.g. `-ac:0.0.0 1 -ac:0.1.0 1…` for each of your output streams. See if that works.  
  > **username_0**: Tried it and it doesn't do what I'm after - it downmixes channels into one so I end up with the audio of all 8 channels in a single channel. What I want is to just grab specific files.  
  
  ---
  
  ## 0 answers
  
  