MKV-to-MP4 Remuxing vs Re-Encoding — Lessons from Reddit
An evidence-led MP4 guide distilling genuine Reddit experiences, technical limits, privacy checks, and a reproducible workflow.
You insert a USB drive into a 2017 smart TV, navigate to a folder of MKV files, and get a blank screen or a terse “unsupported format” message. The same files play without issue on a laptop running VLC. The video stream inside is H.264 Main Profile, the audio is AAC-LC—both are fully specified in the ISO Base Media File Format that underpins MP4 (LOC FDD000155). The problem is the container, not the coded content. The fix should be a direct stream copy. Yet the path from that diagnosis to a working MP4 is narrower than most tutorials acknowledge, and the cost of guessing wrong is either wasted hours re-encoding or a file that still fails on the target device.
Remuxing: the lossless path and its hard limits
Remuxing copies the compressed video and audio bitstreams from a Matroska container into an MP4 container without decoding and re-encoding them. Every coded picture and audio sample remains bit-identical to the source. The operation is fast—limited only by disk speed—and introduces no generational loss.
The prerequisite is codec compatibility. MP4, as defined by the ISO Base Media File Format and its MPEG-4 Part 14 derivation, can carry H.264/AVC, H.265/HEVC (with constraints), MPEG-4 Part 2, AAC, MP3, and PCM audio. A thread in r/handbrake surfaced the common discovery that HandBrake can perform a container swap when its “Web Optimized” preset is configured correctly, but the option is easy to miss if you expect a dedicated remux button (source).
Hard limits that break a remux:
- Audio codecs MP4 cannot hold: DTS, TrueHD, DTS-HD Master Audio, and Vorbis are absent from the MP4 specification. Copying a DTS stream into MP4 produces a file that some players will open with silent audio and others will reject outright.
- Video codecs outside the MP4 spec: VP9, AV1, and VC-1 have no defined mapping in MP4. A Matroska file containing VP9 video cannot be remuxed to MP4; the video must be re-encoded.
- Subtitle formats: MP4 supports a limited timed-text format (
mov_text) and, through private extensions, VobSub in a few players. ASS (Advanced SubStation Alpha), PGS (Presentation Graphic Stream), and SSA subtitles have no standardized home in MP4. A remux that blindly copies an ASS stream will either produce a file that fails to play or one where subtitles silently disappear. - H.265 Main 10 profile: While HEVC is permitted in MP4, many hardware players that claim HEVC support only implement Main Profile, not Main 10 (10-bit). A remuxed HEVC Main 10 file may play on a desktop but stutter or show a black screen on an older set-top box.
The only reliable way to know what you have is to inspect the source before acting. Running ffprobe -v error -show_entries stream=codec_name,codec_type,index -of default=noprint_wrappers=1 input.mkv lists every stream with its codec and type. If the output shows dts, truehd, pgssub, or ass, those streams cannot travel into MP4 unchanged.
Re-encoding: the quality cost you can’t recover
Re-encoding decodes the source video to uncompressed frames and re-compresses them with a new codec or new parameters. The process is always lossy when the output codec is lossy—which it almost always is. Information discarded during the second compression pass cannot be restored, even if the result looks acceptable on a phone screen.
A discussion on r/DataHoarder about HandBrake compression practices noted that users who relied on fast encoder presets (such as “Very Fast” for x264) often noticed banding and blocking only after encoding an entire season and watching it on a large display (source). The preset name is not a warning; it is a trade-off between encoding speed and compression efficiency. Faster presets produce larger files at the same quality or worse quality at the same file size.
Operational rules for re-encoding:
- Use a quality-based rate control method, not a target bitrate. For H.264 with x264, CRF 18–22 keeps most of the visible detail. Lower CRF values produce larger files with higher fidelity. A fixed bitrate of, say, 8 Mbps will starve complex scenes and waste bits on static shots.
- Choose the slowest encoder preset your schedule can tolerate. “Slow” or “Slower” yields measurably better compression than “Very Fast” at the same CRF.
- Never re-encode a source that is itself a re-encode unless you have no alternative. Streaming rips and scene releases have already passed through one lossy compression cycle. A second cycle compounds artifacts, especially in gradients and dark areas.
- Test on a representative sample. A two-minute clip that includes motion, hard cuts, low-light scenes, and text overlays will reveal macroblocking and smearing that a 30-second talking-head clip hides.
- If only the audio stream is incompatible, re-encode the audio and copy the video. The FFmpeg command
- c:v copy -c:a aac -b:a 192kleaves the video bitstream untouched.
Operational workflow: inspect, remux, re-encode only what you must
- Run the stream probe. Use the
ffprobecommand above on every file you intend to process. Do not assume a folder of MKVs shares the same internal layout; different sources, different codecs. - Map the compatibility matrix. If video is H.264 Main or High Profile and audio is AAC, MP3, or PCM, a direct remux is possible. If video is H.265, confirm the target device’s profile support. If audio is DTS or TrueHD, plan to re-encode audio only.
- Decide subtitle handling. For SRT subtitles, convert to
mov_textwith-c:s mov_text. For ASS or PGS, either drop the stream (-sn) or burn it into the video with thesubtitlesfilter, which forces a full video re-encode. - Execute the remux or partial encode. A full remux command:
ffmpeg -i input.mkv -c copy -c:s mov_text -movflags +faststart output.mp4. A partial encode:ffmpeg -i input.mkv -c:v copy -c:a aac -b:a 192k -c:s mov_text -movflags +faststart output.mp4. - Test on the strictest playback device in your chain. A file that plays in a browser or VLC has not passed the test. The r/VideoEditing community has repeatedly noted that the only validation that matters is playback on the actual target—an old smart TV, a car USB system, or a hardware media player with a limited firmware decoder (source). If that device requires H.264 High Profile Level 4.1, a remux with Level 5.0 will fail regardless of codec compatibility.
MP4-specific failure modes that survive remuxing
Even a technically valid MP4 can break on specific players due to container-level metadata.
- Moov box position: MP4 structures its metadata in a
moovbox. If that box sits at the end of the file, a web player or progressive-download client must fetch the entire file before playback can start. The FFmpeg flag- movflags +faststartrelocates themoovbox to the front. Omitting it produces a file that is unstreamable from a standard web server. - Rotation metadata: Matroska stores display rotation in container headers. MP4 uses a transformation matrix inside the track header. A remux may not translate this field, causing a video shot in portrait orientation to display sideways. Set rotation explicitly with
-metadata:s:v:0 rotate=0(or 90, 180, 270) when the source carries rotation metadata. - Timestamp continuity: Matroska permits variable frame rate and timestamp gaps. MP4 players generally expect constant frame rate and gapless timestamps. The flag
-fflags +genptsinstructs FFmpeg to regenerate presentation timestamps. This fixes many sync issues but can introduce drift on sources with irregular cadence. Always spot-check audio sync on a sample longer than five minutes. - Codec private data: Some MKVs carry H.264 streams with out-of-band parameter sets stored in
CodecPrivateMatroska elements. FFmpeg typically handles this during remuxing, but edge cases with non-standard NAL unit ordering can produce an MP4 that decodes with macroblock errors on hardware players. If you encounter this, a full video re-encode is the only reliable fix.
Tools and their real boundaries
FFmpeg is the reference tool for this workflow. It exposes every stream mapping, codec flag, and metadata field relevant to the remux-or-re-encode decision. Its command-line interface requires precision but rewards it with reproducible results.
Shutter Encoder provides a graphical front-end to FFmpeg and surfaces the “Copy” codec option for video and audio streams individually. It is suitable for batch processing when each file has been manually inspected.
HandBrake is an encoder, not a remuxer. Its “remux” behavior is a side effect of selecting passthrough for all streams and an MP4 container. It does not expose fine-grained control over timestamp generation or matrix metadata. Use it when you must re-encode video and want a tested CRF-based pipeline; do not rely on it for stream-copy-only operations.
MKVToolNix reads and writes Matroska files exclusively. Use mkvinfo to inspect MKV structure in detail before remuxing, and mkvextract to pull out streams for separate processing. It cannot produce MP4 output.
mp4.now is a browser-based utility that remuxes H.264 and AAC streams into MP4. It operates on a single file at a time and does not handle subtitle conversion or rotation metadata. It is useful for a quick one-off when the source is already fully compatible.
Decision logic that protects the source
The core question is whether the existing streams can be copied without alteration. If the answer is yes, remux with FFmpeg, apply faststart, and test on the target device. If the answer is no, identify the incompatible stream and re-encode only that stream. Re-encoding the video is a last resort, reserved for cases where the codec itself is unsupported or where burned-in subtitles are required. Every unnecessary re-encode discards information the original capture preserved. The Reddit threads cited above converge on a single lesson: most playback failures trace back to a container mismatch, not a codec problem, and most quality loss traces back to a re-encode that did not need to happen. Inspect the source, copy what you can, and encode only what you must.