<p>Alain1A45 posted the correct answer as a comment, the following command creates an output file with working audio tracks for QuickTime player:</p>
<pre><code>ffmpeg -i in.mp4 -vcodec copy -tag:v hvc1 -acodec copy -scodec copy -map 0 -disposition:a:1 0 out.mp4
</code></pre>

CC BY-SA 4.0
2024-02-01T18:29:20.237Z
2024-02-01T18:29:20.237Z
janeden
<p>I tried to copy all streams (video, audio, subtitle) and add a tag with the following command in order to play the files using QuickTime player:</p>
<pre><code>ffmpeg -i in.mp4 -vcodec copy -tag:v hvc1 -acodec copy -scodec copy -map 0 out.mp4
</code></pre>
<p>The resulting file does open with QuickTime player, and the video/subtitles play fine, but the two audio tracks (E-AC3 in English and German) from the input file cannot be selected (<code>View → Languages → None</code>) and are in fact merged into each other while playing the video, even though both tracks are shown separately in <code>Inspector → Audio Details</code> and VLC handles them correctly. Is this a bug in QuickTime player, or would I need to add another option for QuickTime?</p>
<p>I experimented with various mapping options, e.g.</p>
<pre><code>ffmpeg -i in.mp4 -map:v:0 0:v:0 -tag:v hvc1 -c:v:0 copy -map:a:0 0:a:0 -c:a:0 copy -map:a:1 0:a:1 -c:a:1 copy out.mp4
ffmpeg -i in.mp4 -map 0:v -map 0:1 -metadata:s:a:0 language=eng -map 0:2 -metadata:s:a:1 language=deu -c copy -tag:v hvc1 out.mp4
</code></pre>
<p>without success.</p>

CC BY-SA 4.0
2024-01-31T08:53:38.320Z
Try adding `-disposition:a:1 0` so that the default audio track is only the first one.
Alain1A45
CC BY-SA 4.0
2024-02-01T18:28:22.730Z
That did the trick – thank you!
janeden
<ffmpeg><quicktime><h265>
ffmpeg, audio tracks, and QuickTime player
janeden
# ffmpeg, audio tracks, and QuickTime player

(Asked by: username_0 on 2024-01-23)

I tried to copy all streams (video, audio, subtitle) and add a tag with the following command in order to play the files using QuickTime player:
ffmpeg -i in.mp4 -vcodec copy -tag:v hvc1 -acodec copy -scodec copy -map 0 out.mp4

The resulting file does open with QuickTime player, and the video/subtitles play fine, but the two audio tracks (E-AC3 in English and German) from the input file cannot be selected (View → Languages → None) and are in fact merged into each other while playing the video, even though both tracks are shown separately in Inspector → Audio Details and VLC handles them correctly. Is this a bug in QuickTime player, or would I need to add another option for QuickTime?
I experimented with various mapping options, e.g.
ffmpeg -i in.mp4 -map:v:0 0:v:0 -tag:v hvc1 -c:v:0 copy -map:a:0 0:a:0 -c:a:0 copy -map:a:1 0:a:1 -c:a:1 copy out.mp4
ffmpeg -i in.mp4 -map 0:v -map 0:1 -metadata:s:a:0 language=eng -map 0:2 -metadata:s:a:1 language=deu -c copy -tag:v hvc1 out.mp4

without success.

**Tags:** ffmpeg, quicktime, h265

> **Comments:**
> **username_1**: Try adding `-disposition:a:1 0` so that the default audio track is only the first one.  
> **username_0**: That did the trick – thank you!  

---

## 1 answers

### Answer by username_0 on 2024-02-01. Score: 2 | Accepted answer

username_1 posted the correct answer as a comment, the following command creates an output file with working audio tracks for QuickTime player:
ffmpeg -i in.mp4 -vcodec copy -tag:v hvc1 -acodec copy -scodec copy -map 0 -disposition:a:1 0 out.mp4


---

