Answers.Body: <p>I have found that using -map 0 will select <em>all</em> tracks, including subtitles if available.</p>
  <pre><code>ffmpeg -i &quot;!original!&quot; -map 0 -c:v libx265 -preset medium -crf 28 -c:a copy &quot;g:\Prepare\Convert\!file!&quot;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-05-21T08:15:10.863Z
Answers.Text: Saved my day !!
Answers.UserDisplayName: Toodoo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-02-20T11:28:16.800Z
Answers.LastActivityDate: 2021-02-20T11:28:16.800Z
Answers.UserDisplayName: Uncle Graham
Answers.Body: <p>Use</p>
  <pre><code>ffmpeg -i &quot;!original!&quot; \
      -map 0:v \
      -map 0:a \
      -c:v libx265 \
      -preset medium \
      -crf 28 \
      -c:a copy \
      &quot;g:\Prepare\Convert\!file!&quot;
  </code></pre>
  <p>FFmpeg by default only picks one video, audio and subtitle track (if they are present) from among the sources. Express map assignments are required in order to include other streams. <code>0:a</code> selects all audio streams.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2017-06-20T10:02:16.797Z
Answers.LastActivityDate: 2023-11-20T04:03:25.653Z
Answers.LastEditDate: 2023-11-20T04:03:25.653Z
Answers.UserDisplayName: Gyan
Body: <p>I am converting an mkv h.264 video to HEVC. The file has two audio tracks. How can I copy all audio tracks?</p>
  
  <p>I used this command (from a <code>.bat</code> file):</p>
  
  <pre><code>ffmpeg -i "!original!" -c:v libx265 -preset medium -crf 28 -c:a copy "g:\Prepare\Convert\!file!"
  </code></pre>
  
  <p>This exports only one audio track, but I always I need to copy all audio tracks.</p>
  
Tags: <ffmpeg>
Title: ffmpeg - video conversion with multiple audio tracks
UserDisplayName: koca2000
ThreadText: # ffmpeg - video conversion with multiple audio tracks
  
  (Asked by: username_0 on 2017-06-20)
  
  I am converting an mkv h.264 video to HEVC. The file has two audio tracks. How can I copy all audio tracks?
  
  I used this command (from a `.bat` file):
  
  ```
  ffmpeg -i "!original!" -c:v libx265 -preset medium -crf 28 -c:a copy "g:\Prepare\Convert\!file!"
  
  ```
  
  This exports only one audio track, but I always I need to copy all audio tracks.
  
  **Tags:** ffmpeg
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2017-06-20. Score: 9 | Accepted answer
  
  Use
  
  ```
  ffmpeg -i "!original!" \
      -map 0:v \
      -map 0:a \
      -c:v libx265 \
      -preset medium \
      -crf 28 \
      -c:a copy \
      "g:\Prepare\Convert\!file!"
  
  ```
  
  FFmpeg by default only picks one video, audio and subtitle track (if they are present) from among the sources. Express map assignments are required in order to include other streams. `0:a` selects all audio streams.
  
  
  ---
  
  ### Answer by username_1 on 2021-02-20. Score: 5
  
  I have found that using -map 0 will select *all* tracks, including subtitles if available.
  
  ```
  ffmpeg -i "!original!" -map 0 -c:v libx265 -preset medium -crf 28 -c:a copy "g:\Prepare\Convert\!file!"
  
  ```
  
  > **Comments:**
  > **username_2**: Saved my day !!  
  
  ---
  
  