Merge MKV video and MKA audio tracks while keeping subtitles
Matthew Martinez
I have this situation:
- file1.mkv (video with two 5.1 tracks and several subtitles)
- file1.mka (two stereo audio tracks)
I want to merge the files to a single output that has:
- 4 audio tracks (the 5.1 original tracks and the other two from the MKA file)
- the subtitles from the MKV
Here's the command I'm trying:
@ffmpeg.exe -i "file1.mkv" -i "file1.mka" -map 1 -map 0 -c:v copy -c:a copy -c:s copy "output.mkv"The problem is that output.mkv does indeed have everything, but the tracks from the MKA are mute, and some players even crash when I try to play them. The other two tracks (from original MKV) work just fine.
Is there something I'm doing wrong?
31 Answer
why not use mkvmerge?
mkvmerge.exe --output E:\output.mkv --audio-tracks 1,2 --subtitle-tracks 3,4 --no-chapters --language 0:und --default-track 0:yes --compression 0:none --language 1:und --default-track 1:yes --compression 1:none --language 2:und --compression 2:none --language 3:und --compression 3:none --language 4:und --default-track 4:yes --compression 4:none "E:\file1.mkv" --language 0:eng --compression 0:none --language 1:und --compression 1:none "E:\file2.mka" --track-order 0:0,0:1,0:2,0:3,0:4,1:0,1:1 --probe-range-percentage 0.50