FormatDrop
How-To Guide

How to Convert MKV to MP4 on Linux

Linux is actually the best platform for MKV-to-MP4 conversion — FFmpeg (the underlying engine for virtually all media conversion) runs natively on Linux with full hardware acceleration support. Whether you prefer a terminal command or a GUI, this guide covers the fastest methods for converting MKV to MP4 on any Linux distribution.

Step-by-step instructions

  1. 1

    Install FFmpeg

    Ubuntu/Debian: sudo apt install ffmpeg. Fedora/RHEL: sudo dnf install ffmpeg. Arch Linux: sudo pacman -S ffmpeg. Most distributions have FFmpeg in their official repositories. Verify installation: ffmpeg -version

    Go to converter
  2. 2

    Lossless remux (fastest — zero quality loss)

    ffmpeg -i input.mkv -c copy output.mp4. This remuxes the video without re-encoding. Takes seconds regardless of file length. Works when MKV contains H.264 or H.265 video and AAC, MP3, or AC3 audio. If you get errors about incompatible audio, add -c:a aac to convert audio to AAC.

  3. 3

    Re-encode to H.264 MP4 (maximum compatibility)

    ffmpeg -i input.mkv -c:v libx264 -crf 18 -preset slow -c:a aac -b:a 192k output.mp4. Use this when the source has incompatible codecs or when you need maximum device compatibility. '-crf 18' is visually lossless quality. Lower CRF = higher quality, larger file.

  4. 4

    Hardware-accelerated encoding (NVIDIA NVENC)

    ffmpeg -i input.mkv -c:v h264_nvenc -preset p5 -cq 18 -c:a aac output.mp4. For AMD GPU: -c:v h264_amf. For Intel Quick Sync: -c:v h264_qsv. Hardware encoding is 5-20x faster than software encoding but may produce slightly larger files at the same quality.

  5. 5

    Batch convert entire folder

    for f in /path/to/folder/*.mkv; do ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"; done. This remuxes every MKV in the folder. To process subdirectories: find /path/to/folder -name '*.mkv' -exec sh -c 'ffmpeg -i "$1" -c copy "${1%.mkv}.mp4"' _ {} \;

Why convert MKV to MP4?

Linux is the platform of choice for media server operators and power users who manage large video libraries. Plex, Jellyfin, and Emby all run on Linux servers, and converting MKV to MP4 may be needed for direct play on devices that don't support MKV. FFmpeg on Linux runs without performance overhead, supports hardware acceleration from all GPU vendors, and can be scripted for batch operations — making Linux the fastest and most flexible platform for MKV conversion.

Your files never leave your device

FormatDrop runs the conversion engine entirely inside your browser using WebAssembly. No file upload. No server. Nothing stored. You can verify this by opening DevTools → Network tab and watching: zero upload requests.

Frequently asked questions

Is FFmpeg available on all Linux distributions?
FFmpeg is available in the official repositories of virtually every major Linux distribution. On some distributions (particularly RPM-based ones like Fedora/CentOS/RHEL), you may need to enable RPM Fusion repository first: sudo dnf install https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm. On Ubuntu, the official universe repository includes FFmpeg.
How do I convert MKV to MP4 with a GUI on Linux?
HandBrake has a full Linux GUI version (available in most package managers: sudo apt install handbrake). Kdenlive, Shotcut, and OpenShot are video editors with export capabilities. For a simpler GUI: OGMrip (GNOME) or Avidemux handle basic MKV-to-MP4 conversion.
Convert MKV to MP4 Now — Free

No account. No upload. Works in any browser.