Answers.Body: <p>Use</p>
  
  <pre><code>ffmpeg -i input.mkv -map_metadata 0 -map 0 -c copy -c:a:0 ac3 -vbr 3 output.mkv
  </code></pre>
  
  <p>See <a href="https://superuser.com/a/1219824">https://superuser.com/a/1219824</a> for an illustrated guide to how stream options are parsed.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-10T19:58:19.040Z
Answers.LastActivityDate: 2020-01-10T19:58:19.040Z
Answers.UserDisplayName: Gyan
Body: <p>Input: </p>
  
  <pre><code> * One Video
   * 4 audio streams
   * Many subtitles
   * Chapters
  </code></pre>
  
  <p>I want to re-encode one of the audio streams (the first one) and keep everything else as-of (copy).<br>
  Is it possible to do that in one command-line in ffmpeg?</p>
  
  <p>So far my best 2 guesses don't work:</p>
  
  <p><code>ffmpeg -i input.mkv -map_metadata 0 -map 0:v -c:v copy -map 0:s -c:s copy -map 0:a:0 -c:a ac3 -vbr 3 -map 0:a:1 -c:a copy -map 0:a:2 -c:a copy -map 0:a:3 -c:a copy output.mkv</code><br>
  Copies everything</p>
  
  <p><code>ffmpeg -i input.mkv -map_metadata 0 -map 0:v -c:v copy -map 0:s -c:s copy -map 0:a -c:a copy -map 0:a:0 -c:a ac3 -vbr 3 output.mkv</code><br>
  Re-encodes all audio streams</p>
  
Tags: <ffmpeg><audio><encoding>
Title: How to tell ffmpeg to copy all streams except one audio stream (to encode)?
UserDisplayName: Thomas
ThreadText: # How to tell ffmpeg to copy all streams except one audio stream (to encode)?
  
  (Asked by: username_0 on 2020-01-10)
  
  Input:
  
  ```
   * One Video
   * 4 audio streams
   * Many subtitles
   * Chapters
  
  ```
  
  I want to re-encode one of the audio streams (the first one) and keep everything else as-of (copy).  
  Is it possible to do that in one command-line in ffmpeg?
  
  So far my best 2 guesses don't work:
  
  `ffmpeg -i input.mkv -map_metadata 0 -map 0:v -c:v copy -map 0:s -c:s copy -map 0:a:0 -c:a ac3 -vbr 3 -map 0:a:1 -c:a copy -map 0:a:2 -c:a copy -map 0:a:3 -c:a copy output.mkv`  
  Copies everything
  
  `ffmpeg -i input.mkv -map_metadata 0 -map 0:v -c:v copy -map 0:s -c:s copy -map 0:a -c:a copy -map 0:a:0 -c:a ac3 -vbr 3 output.mkv`  
  Re-encodes all audio streams
  
  **Tags:** ffmpeg, audio, encoding
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-01-10. Score: 6 | Accepted answer
  
  Use
  
  ```
  ffmpeg -i input.mkv -map_metadata 0 -map 0 -c copy -c:a:0 ac3 -vbr 3 output.mkv
  
  ```
  
  See <https://superuser.com/a/1219824> for an illustrated guide to how stream options are parsed.
  
  
  ---
  
  