<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>

CC BY-SA 4.0
2021-08-29T01:06:27.950Z
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.
martinkunev
CC BY-SA 4.0
2022-10-23T14:18:53.690Z
It is really important to use also `-disposition:a:1 none`, otherwise you end up having two default streams!
Paul
CC BY-SA 4.0
2020-02-10T15:01:33.840Z
2020-02-10T15:01:33.840Z
drake7
<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>

CC BY-SA 4.0
2020-02-08T18:02:44.487Z
2020-02-08T18:02:44.487Z
Pankaj
<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>

CC BY-SA 4.0
2020-02-07T19:31:27.373Z
See `-disposition` option as shown in [Mux mkv and dts file, change default audio stream and language](https://video.stackexchange.com/a/21366/).
llogan
CC BY-SA 4.0
2020-02-08T15:36:56.833Z
No, both did not work. Can you send me the final command?
Pankaj
CC BY-SA 4.0
2020-02-10T19:59:38.317Z
What did you try? I can't help if you don't provide specifics.
llogan
<ffmpeg>
Change default audio track of Video file using ffmpeg
Pankaj
# 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.

English
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"


input
use video stream (0:0)
make 2nd audio stream (Hindi) the 1st
make 1st audio stream (English) the 2nd
use the new 1st audio stream (Hindi) as default
remove the default from the new 2nd audio stream (English)
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.


---

