MP4 vs MKV: Understanding Video Containers
MP4 and MKV are container formats. A container can hold video, audio, subtitles and metadata, while codecs determine how the media streams themselves are encoded.
MP4
MP4 is widely supported by browsers, phones, televisions and editing software. It is often selected when compatibility is a priority.
MKV
MKV is a flexible container that can hold multiple tracks, subtitles and other metadata. It is useful when a project needs more container flexibility.
Does changing the container change video quality?
A compatible remux can change the container without re-encoding the underlying streams. A conversion that also changes codecs or compression settings is different and can affect quality and file size.