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.

2 Answers 2



ffmpeg -i "!original!" \
    -map 0:v \
    -map 0:a \
    -c:v libx265 \
    -preset medium \
    -crf 28 \
    -c:a copy \

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.


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!"
  • Saved my day !!
    – Toodoo
    May 21, 2021 at 8:15

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.