1

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.

2
  • 1
    Try adding -disposition:a:1 0 so that the default audio track is only the first one.
    – Alain1A45
    Jan 31 at 8:53
  • That did the trick – thank you!
    – janeden
    Feb 1 at 18:28

1 Answer 1

1

Alain1A45 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.