Answers.Body: <p>ffmpeg -i input.mkv -map 0:v:0 -c:v copy -map 0:a:0 -c:a:0 aac -b:a:0 512k -map 0:a:0 -c:a:1 copy -map 0:s:0 -c:s:0 copy -metadata:s:s:0 language=eng -map 0:s:1 -c:s:1 copy -metadata:s:s:1 language=fre output.mkv</p>
  <pre><code>Stream #0:0 -&gt; #0:0 (copy)
  Stream #0:1 -&gt; #0:1 (truehd (native) -&gt; aac (native))
  Stream #0:1 -&gt; #0:2 (copy) # truehd 7.1
  Stream #0:3 -&gt; #0:3 (copy) # (English subtitles)
  Stream #0:6 -&gt; #0:4 (copy) # (French subtitles)
  </code></pre>
  <p>If I've done this correctly it should only copy or encode what you asked for and nothing else..</p>
  <pre><code>-canvas_size 1920x804 (WidthxHeight of video.. Is needed to copy DVD &amp; Blu-ray picture based subtitles over..)
  </code></pre>
  <p>And on a side note:</p>
  <pre><code>-map 0:m:language:eng (Missing Index on which stream metadata should be changed)
  -map 0:m:language:fre (Missing Index on which stream metadata should be changed)
  -c copy (This will copy all streams over regardless of mapping..)
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-23T17:28:22.803Z
Answers.LastActivityDate: 2020-12-23T17:28:22.803Z
Answers.UserDisplayName: ArchAngel
Body: <p>I have a video with 1 video stream, 2 audio streams (TrueHD 7.1 and E-AC3 5.1), a bunch of PGS subtitles and chapters.</p>
  <p>I want to copy the video, convert the 7.1 audio into AAC, copy over the original 7.1 and 5.1 streams (so 3 audio streams), keep only French and English subtitles and all the metadata.</p>
  <p>After a few trials, this command seems to do exactly that:</p>
  <pre><code>ffmpeg -i input.mkv -map 0:v:0 -map 0:a:0 -map 0:m:language:eng -map 0:m:language:fre -c copy -c:a:0 aac -b:a:0 512k output.mkv
  </code></pre>
  <p>Stream mapping:</p>
  <pre><code>  Stream #0:0 -&gt; #0:0 (copy)
    Stream #0:1 -&gt; #0:1 (truehd (native) -&gt; aac (native))
    Stream #0:1 -&gt; #0:2 (copy) # truehd 7.1
    Stream #0:2 -&gt; #0:3 (copy) # e-ac3 5.1
    Stream #0:3 -&gt; #0:4 (copy) # (English subtitles)
    Stream #0:6 -&gt; #0:5 (copy) # (French subtitles)
  </code></pre>
  <p>Now the question is... if I wanted to get rid of the e-ac3, how would I do that?</p>
  
Tags: <ffmpeg><audio><conversion>
Title: ffmpeg: convert an existing audio stream as an additional audio stream (keeping untouched original as well)
UserDisplayName: Thomas
ThreadText: # ffmpeg: convert an existing audio stream as an additional audio stream (keeping untouched original as well)
  
  (Asked by: username_0 on 2020-07-25)
  
  I have a video with 1 video stream, 2 audio streams (TrueHD 7.1 and E-AC3 5.1), a bunch of PGS subtitles and chapters.
  
  I want to copy the video, convert the 7.1 audio into AAC, copy over the original 7.1 and 5.1 streams (so 3 audio streams), keep only French and English subtitles and all the metadata.
  
  After a few trials, this command seems to do exactly that:
  
  ```
  ffmpeg -i input.mkv -map 0:v:0 -map 0:a:0 -map 0:m:language:eng -map 0:m:language:fre -c copy -c:a:0 aac -b:a:0 512k output.mkv
  
  ```
  
  Stream mapping:
  
  ```
    Stream #0:0 -> #0:0 (copy)
    Stream #0:1 -> #0:1 (truehd (native) -> aac (native))
    Stream #0:1 -> #0:2 (copy) # truehd 7.1
    Stream #0:2 -> #0:3 (copy) # e-ac3 5.1
    Stream #0:3 -> #0:4 (copy) # (English subtitles)
    Stream #0:6 -> #0:5 (copy) # (French subtitles)
  
  ```
  
  Now the question is... if I wanted to get rid of the e-ac3, how would I do that?
  
  **Tags:** ffmpeg, audio, conversion
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-12-23. Score: 2
  
  ffmpeg -i input.mkv -map 0:v:0 -c:v copy -map 0:a:0 -c:a:0 aac -b:a:0 512k -map 0:a:0 -c:a:1 copy -map 0:s:0 -c:s:0 copy -metadata:s:s:0 language=eng -map 0:s:1 -c:s:1 copy -metadata:s:s:1 language=fre output.mkv
  
  ```
  Stream #0:0 -> #0:0 (copy)
  Stream #0:1 -> #0:1 (truehd (native) -> aac (native))
  Stream #0:1 -> #0:2 (copy) # truehd 7.1
  Stream #0:3 -> #0:3 (copy) # (English subtitles)
  Stream #0:6 -> #0:4 (copy) # (French subtitles)
  
  ```
  
  If I've done this correctly it should only copy or encode what you asked for and nothing else..
  
  ```
  -canvas_size 1920x804 (WidthxHeight of video.. Is needed to copy DVD & Blu-ray picture based subtitles over..)
  
  ```
  
  And on a side note:
  
  ```
  -map 0:m:language:eng (Missing Index on which stream metadata should be changed)
  -map 0:m:language:fre (Missing Index on which stream metadata should be changed)
  -c copy (This will copy all streams over regardless of mapping..)
  
  ```
  
  
  ---
  
  