title: How to encode multi audio streams with different options at the same time using ffmpeg
body: <p>I'm trying to encode a dvd using ffmpeg.</p>
  
  <pre><code>$ffmpeg -i VTS_01_1.VOB
  Input #0, mpeg, from 'VTS_01_1.VOB':
  Duration: 00:38:06.52, start: 0.287267, bitrate: 3756 kb/s
  Stream #0:0[0x1e0]: Video: mpeg2video (Main), yuv420p, 720x576 [SAR 64:45 DAR 16:9], 9800 kb/s, 25 fps, 25 tbr, 90k tbn, 50 tbc
  Stream #0:1[0x80]: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
  Stream #0:2[0x81]: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
  Stream #0:3[0x82]: Audio: ac3, 48000 Hz, 5.1(side), s16, 384 kb/s
  Stream #0:4[0x83]: Audio: ac3, 48000 Hz, mono, s16, 96 kb/s
  Stream #0:5[0x28]: Subtitle: dvd_subtitle
  Stream #0:6[0x29]: Subtitle: dvd_subtitle
  Stream #0:7[0x23]: Subtitle: dvd_subtitle
  Stream #0:8[0x24]: Subtitle: dvd_subtitle
  Stream #0:9[0x26]: Subtitle: dvd_subtitle
  Stream #0:10[0x27]: Subtitle: dvd_subtitle
  </code></pre>
  
  <p>From the above streams I'm interested in keeping two audio streams : number 1 and 4.
  As you can see the number 4 is already 96kbps so I tried to execute a command which could treat the two streams in a different way:</p>
  
  <pre><code>cat VTS_01_1.VOB | nice ffmpeg -i - -s 640x368 -vcodec libtheora -r 25 -b:v 1200k -an -metadata title="My Title" -pass 1 -passlogfile "/media/data/outputlog" -f ogg -y /dev/null
  
  cat VTS_01_1.VOB | nice ffmpeg -i - -map 0:0 -s 640x368 -vcodec libtheora -r 25 -b:v 1200k -async 1 -metadata title="My Title" -map 0:1 -acodec libvorbis -ac 6 -ar 48000 -b:a 192k -metadata title="english" -map 0:4 -acodec libvorbis -ac 2 -ar 48000 -b:a 96k -metadata title="commented" -pass 2 -passlogfile "/media/data/outputlog" "/media/data/output.ogv"
  </code></pre>
  
  <p>What I would like to obtain is:</p>
  
  <pre><code>Input #0, ogg, from 'output.ogv':
  Duration: 00:38:07.20, start: 0.000000, bitrate: 1360 kb/s
  Stream #0:0: Video: theora, yuv420p, 640x368 [SAR 46:45 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
  Stream #0:1: Audio: vorbis, 48000 Hz, stereo, s16, 192 kb/s
  Stream #0:2: Audio: vorbis, 48000 Hz, stereo, s16, 96 kb/s
  </code></pre>
  
  <p>Instead with the above command I obtain:</p>
  
  <pre><code>Input #0, ogg, from 'output.ogv':
  Duration: 00:38:07.20, start: 0.000000, bitrate: 1360 kb/s
  Stream #0:0: Video: theora, yuv420p, 640x368 [SAR 46:45 DAR 16:9], 25 fps, 25 tbr, 25 tbn, 25 tbc
  Stream #0:1: Audio: vorbis, 48000 Hz, stereo, s16, 96 kb/s
  Stream #0:2: Audio: vorbis, 48000 Hz, stereo, s16, 96 kb/s
  </code></pre>
  
  <p><strong>So how can I specify different params for multiple audio streams?</strong></p>
  
  <p>BTW: I'm on lubuntu oneiric with the latest ffmpeg from git</p>
  
  <pre><code>ffmpeg version git-2012-03-05-1007a80 Copyright (c) 2000-2012 the FFmpeg developers
  built on Mar  5 2012 09:40:09 with gcc 4.6.1
  configuration: --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab --enable-libxvid --enable-libvpx
  libavutil      51. 41.100 / 51. 41.100
  libavcodec     54.  8.100 / 54.  8.100
  libavformat    54.  2.100 / 54.  2.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 63.100 /  2. 63.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0.  7.100 /  0.  7.100
  libpostproc    52.  0.100 / 52.  0.100
  </code></pre>
  
  <p>Therefore the newaudio option is no more recognized</p>