MKV vs. MP4: Understanding the Container Difference
Here is something that surprises most people: MKV and MP4 are not video formats in the traditional sense. They are containers — think of them as boxes that hold video streams, audio tracks, subtitles, and metadata. The actual video and audio codecs inside the container are what determine quality, file size, and compatibility.
This distinction is important because it means that, in many cases, you can convert MKV to MP4 without re-encoding. The video and audio streams are simply copied from one container to another — a process called remuxing. It is instantaneous and introduces zero quality loss.
In this guide, we will cover when you can remux, when you need to re-encode, and how to handle the special features that make MKV unique: multiple audio tracks, embedded subtitles, and chapter markers.
| Feature | MKV (Matroska) | MP4 (MPEG-4 Part 14) |
|---|---|---|
| Developer | Matroska.org (open source) | ISO/IEC (MPEG group) |
| Codec Support | Virtually unlimited | H.264, H.265, AV1, VP9, AAC, AC3 |
| Subtitle Formats | SRT, ASS, SSA, PGS, VobSub | SRT (mov_text), MPEG-4 Timed Text |
| Multiple Audio Tracks | Excellent (unlimited) | Supported but less common |
| Chapter Markers | Full support | Supported |
| Streaming | Limited | Excellent (progressive download) |
| Browser Playback | Minimal (Chrome partial) | Universal |
| Smart TV Support | Some models | Universal |
| File Size | Same as MP4 (container overhead is negligible) | Same as MKV |
Pro Tip: If your MKV file contains H.264 or H.265 video with AAC audio, you can remux to MP4 in seconds with zero quality loss. Always check the codecs before deciding to re-encode — you might save yourself hours of processing time.

Step 1: Identify Your MKV File Contents
Before converting, inspect the MKV file to understand what streams it contains:
ffprobe -v error -show_streams -show_entries \
stream=index,codec_type,codec_name,channels,width,height \
-of table input.mkv
Example output:
index codec_type codec_name channels width height
0 video hevc 1920 1080
1 audio aac 6
2 audio ac3 6
3 subtitle subrip
4 subtitle ass
This tells you:
- Video is H.265 (HEVC) — compatible with MP4
- Two audio tracks: AAC (compatible) and AC3 (compatible)
- Two subtitle tracks: SRT and ASS (require conversion for MP4)
Method 1: Lossless Remux (No Quality Loss)
If the video and audio codecs are MP4-compatible, remuxing is the way to go. It takes seconds regardless of file size.
Basic Remux
ffmpeg -i input.mkv -c copy -movflags +faststart output.mp4
This copies all streams as-is. The -c copy flag means no decoding or encoding occurs.
Remux with Stream Selection
If the MKV has multiple audio tracks and you only want one:
# Copy video and first audio track only
ffmpeg -i input.mkv -map 0:v:0 -map 0:a:0 -c copy output.mp4
Remux with Subtitle Conversion
MKV often contains ASS/SSA subtitles, which MP4 does not support. Convert to the MP4-compatible mov_text format:
ffmpeg -i input.mkv -c:v copy -c:a copy -c:s mov_text output.mp4
Note: mov_text is a simple text subtitle format. It does not support the styling features of ASS/SSA subtitles (colors, positioning, animations). If the subtitles have complex formatting, consider burning them into the video instead.
MP4-Compatible Codec Reference
| Codec | Compatible with MP4? | Remux Possible? |
|---|---|---|
| H.264 (AVC) | Yes | Yes |
| H.265 (HEVC) | Yes | Yes |
| AV1 | Yes | Yes |
| VP9 | Technically yes (limited support) | Yes, but poor player support |
| VP8 | No | No, re-encode needed |
| MPEG-2 | No (technically possible, rarely works) | Not recommended |
| AAC | Yes | Yes |
| AC3 (Dolby Digital) | Yes | Yes |
| E-AC3 (DD+) | Yes | Yes |
| DTS | Yes (limited player support) | Yes, but check target player |
| FLAC | No | No, re-encode to AAC |
| Opus | No (in standard MP4) | No, re-encode to AAC |
| Vorbis | No | No, re-encode to AAC |
Method 2: Re-encoding (When Remux Is Not Possible)
If the MKV contains codecs that MP4 does not support (like VP8 video or Vorbis audio), re-encoding is necessary.
Standard Re-encode to H.264 + AAC
ffmpeg -i input.mkv -c:v libx264 -crf 20 -preset slow \
-c:a aac -b:a 192k -movflags +faststart output.mp4
Re-encode Video, Copy Audio
When only the video codec is incompatible but the audio is AAC:
ffmpeg -i input.mkv -c:v libx264 -crf 20 -preset slow \
-c:a copy -movflags +faststart output.mp4
Re-encode Audio, Copy Video
When the video is H.264/H.265 but the audio is in a non-MP4 format like Vorbis or FLAC:
ffmpeg -i input.mkv -c:v copy \
-c:a aac -b:a 192k -movflags +faststart output.mp4
Pro Tip: When re-encoding audio from FLAC (lossless) to AAC, use a high bitrate (256-320 kbps) to preserve as much audio quality as possible. For casual listening, 192 kbps AAC is transparent to most listeners. For details on audio quality, see our FLAC vs MP3 guide.
Method 3: Online Conversion
For quick one-off conversions without installing software, use the MP4 Converter online.
Steps
- Navigate to the MP4 Converter
- Upload your MKV file
- The tool automatically detects the codecs and chooses the optimal conversion path (remux if possible, re-encode if needed)
- Download the resulting MP4
The online tool handles all the complexity of codec detection, stream selection, and format compatibility automatically. For more conversion options, the full Video Converter provides advanced settings.

Handling Multiple Audio Tracks
MKV files frequently contain multiple audio tracks — different languages, commentary tracks, or different audio formats (stereo vs. surround). MP4 supports multiple audio tracks, but not all players handle them well.
List All Audio Tracks
ffprobe -v error -select_streams a -show_entries \
stream=index,codec_name,channels,tags \
-of table input.mkv
Copy All Audio Tracks
ffmpeg -i input.mkv -map 0:v -map 0:a -c copy output.mp4
Select Specific Audio Tracks
# Keep only English and Japanese audio
ffmpeg -i input.mkv \
-map 0:v:0 \
-map 0:a:m:language:eng \
-map 0:a:m:language:jpn \
-c copy output.mp4
Convert Incompatible Audio Tracks
If some audio tracks use non-MP4 codecs:
# Copy video, re-encode all audio to AAC
ffmpeg -i input.mkv -map 0:v -map 0:a \
-c:v copy -c:a aac -b:a 192k output.mp4
Handling Subtitles
Subtitles are where MKV and MP4 differ the most. MKV supports a wide range of subtitle formats with full styling, while MP4 is limited to basic text subtitles.
Subtitle Handling Options
| Approach | Result | Styling Preserved | File Size Impact |
|---|---|---|---|
| Convert to mov_text | Soft subtitles in MP4 | Basic only (no colors/positioning) | Negligible |
| Burn into video | Hard-coded (permanent) | Full (ASS/SSA styling) | Slight increase |
| Extract to SRT | Separate file | Basic only | No impact on video |
| Drop subtitles | No subtitles | N/A | Slight decrease |
Convert Subtitles to mov_text
ffmpeg -i input.mkv -c:v copy -c:a copy -c:s mov_text output.mp4
Burn Subtitles into Video
When you need to preserve complex subtitle styling (common with anime ASS/SSA subtitles):
# For SRT subtitles
ffmpeg -i input.mkv -vf "subtitles=input.mkv" \
-c:v libx264 -crf 20 -c:a copy output.mp4
# For ASS/SSA with full styling
ffmpeg -i input.mkv -vf "ass=input.mkv" \
-c:v libx264 -crf 20 -c:a copy output.mp4
Note that burning subtitles requires re-encoding the video track.
Extract Subtitles to Separate File
# Extract first subtitle track to SRT
ffmpeg -i input.mkv -map 0:s:0 subtitles.srt
# Extract all subtitle tracks
ffmpeg -i input.mkv -map 0:s:0 subs_track1.srt -map 0:s:1 subs_track2.srt
Chapter Markers
MKV files often include chapter markers for navigation. These can be preserved during conversion to MP4:
# Remux with chapters preserved (default behavior)
ffmpeg -i input.mkv -c copy -movflags +faststart output.mp4
# Verify chapters in output
ffprobe -v error -show_chapters output.mp4
Chapters are automatically copied during both remuxing and re-encoding. To strip chapters:
ffmpeg -i input.mkv -c copy -map_chapters -1 output.mp4
Batch Converting MKV to MP4
Smart Batch Script (Remux When Possible)
This script checks each file's codecs and remuxes if possible, only re-encoding when necessary:
#!/bin/bash
mkdir -p converted
for file in *.mkv; do
[ -f "$file" ] || continue
output="converted/${file%.mkv}.mp4"
# Check video codec
vcodec=$(ffprobe -v error -select_streams v:0 \
-show_entries stream=codec_name -of csv=p=0 "$file")
if [[ "$vcodec" == "h264" || "$vcodec" == "hevc" ]]; then
echo "Remuxing (lossless): $file"
ffmpeg -i "$file" -c:v copy -c:a aac -b:a 192k \
-movflags +faststart "$output" -y
else
echo "Re-encoding: $file ($vcodec -> h264)"
ffmpeg -i "$file" -c:v libx264 -crf 20 -preset medium \
-c:a aac -b:a 192k -movflags +faststart "$output" -y
fi
done
For more batch processing techniques, see our batch processing guide and our guide on how to batch convert files.

Common Issues and Solutions
Issue: "Could not find tag for codec"
This error means the stream uses a codec that MP4 does not support. Common culprits are Vorbis audio, VP8/VP9 video, and PGS (bitmap) subtitles.
Fix: Re-encode the incompatible stream:
# If Vorbis audio is the problem
ffmpeg -i input.mkv -c:v copy -c:a aac -b:a 192k output.mp4
# If PGS subtitles are the problem, drop them
ffmpeg -i input.mkv -c:v copy -c:a copy -sn output.mp4
Issue: Audio Out of Sync After Conversion
Some MKV files have audio tracks with a start delay. This delay is handled differently in MP4.
Fix: Use the -async flag or explicitly set the audio delay:
ffmpeg -i input.mkv -c:v copy -c:a copy \
-af "adelay=0" -movflags +faststart output.mp4
Issue: File Size Increased After Conversion
If the output MP4 is larger than the input MKV, it means re-encoding produced a higher bitrate than the original. This can happen when using a low CRF value or when the source was already highly compressed.
Fix: Increase the CRF value or use a two-pass encoding approach for precise bitrate control.
Issue: HDR Metadata Lost
When remuxing HDR content (common with 4K MKV files), some metadata may not transfer correctly.
Fix: Explicitly copy the HDR metadata:
ffmpeg -i input_hdr.mkv -c copy \
-movflags +faststart \
-tag:v hvc1 output.mp4
The -tag:v hvc1 flag is important for Apple device compatibility with HEVC content. For more on 4K handling, see our 4K video conversion guide.
Performance Comparison: Remux vs. Re-encode
| File Size | Remux Time | Re-encode (fast) | Re-encode (slow) |
|---|---|---|---|
| 500 MB | 2-5 seconds | 1-3 minutes | 5-15 minutes |
| 2 GB | 5-15 seconds | 5-15 minutes | 20-60 minutes |
| 8 GB | 20-60 seconds | 20-60 minutes | 1-4 hours |
| 20 GB | 1-3 minutes | 1-3 hours | 4-12 hours |
The speed difference is dramatic. Always remux when possible.
When to Keep MKV Format
While MP4 is the most compatible container, there are valid reasons to keep files in MKV:
- Complex subtitle styling (ASS/SSA with fonts, effects, positioning)
- Multiple audio and subtitle tracks for media library management
- Lossless audio (FLAC in MKV, which MP4 does not support)
- Ordered chapters and segment linking (MKV-exclusive features)
- Media server use (Plex, Jellyfin, and Emby handle MKV natively)
If you do not need broad device compatibility, MKV is an excellent container for media archival and home server use.
Frequently Asked Questions
Does converting MKV to MP4 lose quality?
Not if you remux (copy streams). Remuxing transfers the identical video and audio data from one container to another with zero quality loss. Only re-encoding introduces potential quality changes.
Why can't I play MKV files on my TV?
Many smart TVs support MP4 but not MKV (or only certain codecs within MKV). Converting to MP4 solves this compatibility issue. Use the Video Converter for a quick conversion.
How do I keep all audio tracks when converting?
Use -map 0:a to include all audio streams: ffmpeg -i input.mkv -map 0:v -map 0:a -c copy output.mp4
Can I convert MKV to MP4 on my phone?
Yes. Use the MP4 Converter from your mobile browser. Upload the MKV file and download the MP4 result. No app installation required.
What happens to chapters during conversion?
Chapters are preserved by default during both remuxing and re-encoding. FFmpeg automatically copies chapter metadata to the output file.
Conclusion
Converting MKV to MP4 is often easier than people expect. The key insight is that MKV and MP4 are just containers, and when the codecs inside are compatible, you can remux in seconds with zero quality loss.
Start by checking your file's codecs with ffprobe. If the video is H.264 or H.265 and the audio is AAC or AC3, remux with -c copy. If not, re-encode with quality settings that match your needs. For subtitle-heavy content, decide whether to convert, burn, or extract the subtitles.
For a quick and easy conversion without the command line, use the MP4 Converter or the full Video Converter. For more on video formats and codecs, explore our guides on video codecs explained and H.265 vs H.264 vs AV1.



