FFmpeg recipe
FFmpeg: Convert MKV to MP4 (Stream-Copy)
When the MKV uses H.264 + AAC (most movie rips), stream-copy remuxes to MP4 in seconds — bit-identical streams, new container.
Command
ffmpeg -i input.mkv -c copy -map 0:v:0 -map 0:a:0 -y output.mp4Prefer no terminal?
Use the Video Converter in your browser
What each flag does
| -i | Input file. Can be a video, audio, or image. Repeat for multiple inputs. |
|---|---|
| -c copy | Stream-copy: no re-encoding. Output is bit-identical between cut points. Fastest possible. |
| -map | Manually pick which streams to include from the input(s). |
| -y | Overwrite output file without confirmation. |
| -map 0:v:0 | Take the first video stream from input 0. |
| -map 0:a:0 | Take the first audio stream from input 0. Add -map 0:a:1 to keep multiple tracks. |
Notes & gotchas
- For DTS or AC3 audio inside MKV, stream-copy fails — re-encode audio with -c:a aac -b:a 192k.
- For HEVC video, browsers reject the result; re-encode with -c:v libx264 -crf 23.
- Subtitles do not migrate cleanly to MP4 — burn them in with the Subtitle Burner if needed.
Related recipes
Convert MOV → MP4 · MOV → MP4
Convert MOV to MP4 with FFmpeg using H.264 video and AAC audio. CRF 23 default keeps quality visually identical.
Convert HEVC → H.264 · HEVC → H.264
Convert HEVC (H.265) video to H.264 with FFmpeg so it plays on Windows, in Chrome, and on older Macs.
Convert MP4 → WebM · MP4 → WebM
Convert MP4 to WebM with FFmpeg using VP9 video and Opus audio. ~30% smaller for the web.
Convert MP4 → GIF · MP4 → GIF
Convert MP4 to GIF with FFmpeg using a custom palette for sharp colors at small file sizes.