1

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.

4

Use

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

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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