Answers.Body: <pre><code>ffmpeg -i "input.mkv" \
  -map 0:0 \
  -map 0:2 \
  -map 0:1 \
  -disposition:a:0 default \
  -disposition:a:1 none \
  -c copy "output.mkv"
  </code></pre>
  
  <ol>
  <li>input</li>
  <li>use video stream (0:0)</li>
  <li>make 2nd audio stream (Hindi) the 1st</li>
  <li>make 1st audio stream (English) the 2nd</li>
  <li>use the new 1st audio stream (Hindi) as default</li>
  <li>remove the default from the new 2nd audio stream (English)</li>
  <li>create output without transcoding</li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-08-29T01:06:27.950Z
Answers.Text: I lost several hours until I realized some players (e.g. on the web) don't support some audio formats (and the second audio track was a different format). The solution in my case was to also add `-c:a <audio_format>` to convert the audio format.
Answers.UserDisplayName: martinkunev
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-23T14:18:53.690Z
Answers.Text: It is really important to use also `-disposition:a:1 none`, otherwise you end up having two default streams!
Answers.UserDisplayName: Paul
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-10T15:01:33.840Z
Answers.LastActivityDate: 2020-02-10T15:01:33.840Z
Answers.UserDisplayName: drake7
Answers.Body: <pre><code>ffmpeg -i input -map 0:v -map 0:m:language:hin -c copy output
  </code></pre>
  
  <p>Above code helped me. It worked perfectly for me.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-02-08T18:02:44.487Z
Answers.LastActivityDate: 2020-02-08T18:02:44.487Z
Answers.UserDisplayName: Pankaj
Body: <p>I have a video file with extension .mkv. It contains 2 Audio Tracks.</p>
  
  <ol>
  <li>English</li>
  <li>Hindi</li>
  </ol>
  
  <p>English Audio track is the default Audio track. I am trying to set the default Audio track to Hindi because when I try to play it on my LED, it plays English Audio track as it is the default track.</p>
  
  <p>I used below command to set Hindi as default Audio track.</p>
  
  <pre><code>ffmpeg -i input.mkv -map 0:1 output.mkv
  </code></pre>
  
  <p>But, it still keeps English as default track.</p>
  
  <p>Am I missing anything?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-07T19:31:27.373Z
Comments.Text: See `-disposition` option as shown in [Mux mkv and dts file, change default audio stream and language](https://video.stackexchange.com/a/21366/).
Comments.UserDisplayName: llogan
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-08T15:36:56.833Z
Comments.Text: No, both did not work. Can you send me the final command?
Comments.UserDisplayName: Pankaj
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-02-10T19:59:38.317Z
Comments.Text: What did you try? I can't help if you don't provide specifics.
Comments.UserDisplayName: llogan
Tags: <ffmpeg>
Title: Change default audio track of Video file using ffmpeg
UserDisplayName: Pankaj
ThreadText: # Change default audio track of Video file using ffmpeg
  
  (Asked by: username_0 on 2020-02-07)
  
  I have a video file with extension .mkv. It contains 2 Audio Tracks.
  
  1. English
  2. Hindi
  
  English Audio track is the default Audio track. I am trying to set the default Audio track to Hindi because when I try to play it on my LED, it plays English Audio track as it is the default track.
  
  I used below command to set Hindi as default Audio track.
  
  ```
  ffmpeg -i input.mkv -map 0:1 output.mkv
  
  ```
  
  But, it still keeps English as default track.
  
  Am I missing anything?
  
  **Tags:** ffmpeg
  
  > **Comments:**
  > **username_1**: See `-disposition` option as shown in [Mux mkv and dts file, change default audio stream and language](https://video.stackexchange.com/a/21366/).  
  > **username_0**: No, both did not work. Can you send me the final command?  
  > **username_1**: What did you try? I can't help if you don't provide specifics.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2020-02-10. Score: 15
  
  ```
  ffmpeg -i "input.mkv" \
  -map 0:0 \
  -map 0:2 \
  -map 0:1 \
  -disposition:a:0 default \
  -disposition:a:1 none \
  -c copy "output.mkv"
  
  ```
  
  1. input
  2. use video stream (0:0)
  3. make 2nd audio stream (Hindi) the 1st
  4. make 1st audio stream (English) the 2nd
  5. use the new 1st audio stream (Hindi) as default
  6. remove the default from the new 2nd audio stream (English)
  7. create output without transcoding
  
  > **Comments:**
  > **username_3**: I lost several hours until I realized some players (e.g. on the web) don't support some audio formats (and the second audio track was a different format). The solution in my case was to also add `-c:a <audio_format>` to convert the audio format.  
  > **username_4**: It is really important to use also `-disposition:a:1 none`, otherwise you end up having two default streams!  
  
  ---
  
  ### Answer by username_0 on 2020-02-08. Score: 1
  
  ```
  ffmpeg -i input -map 0:v -map 0:m:language:hin -c copy output
  
  ```
  
  Above code helped me. It worked perfectly for me.
  
  
  ---
  
  