I'm trying to extract video from an mkv file using mkvextract. Is there a way to extract the audio along with it so that the resulting video file already has audio, or does audio and video have to be extracted separately and recombined later?
Look at the manual (emphasis mine):
The tool only has a very specific purpose, namely extracting parts from an MKV file. This is easier to implement than recombining audio and video at the same time, which would involve creating another container and synchronizing both streams. I guess this is way beyond the scope of an extractor tool.
If you want to recombine, you need another tool, as suggested by the
Using ffmpeg would also be an option, of course. If the only thing you want to to is get video and sound out of an MKV file, then you just want to transcode the file into something different. For example, the following command just copies the stream content as is (e.g. h.264 video and AAC audio) and transcodes an MKV into an MP4: