.mkv
Example
ffmpeg -i movie.mkv movie.mp4ffmpeg -i movie.mkv -c copy -movflags +faststart movie.mp4If the codecs are H.264 and AAC, -c copy only rewraps the streams into MP4, which is fast and lossless.
Common mistakes
- Re-encoding an MKV to MP4 when only the container needs to change, losing quality and time.
- Losing extra audio tracks and subtitles when converting, since MP4 handles them differently.
Key points
- Web players use
.mp4or.webm, not.mkv, even when some browsers happen to play it. - Conversion from MKV first tries remuxing with
-c copywhen the codecs are already web-friendly.
Interview questions
MKV vs MP4: which is better?
MKV is more flexible for many audio and subtitle tracks, which suits archives. MP4 is better for web and device playback.
Is WebM related to MKV?
Yes. WebM is based on the Matroska container, limited to web codecs like VP8, VP9, AV1, Vorbis and Opus.