MP4 to MKV Converter

Convert MP4 video files to MKV format

Convert MP4 videos to MKV (Matroska) container format. MKV is an open-source format that supports virtually all video and audio codecs, multiple subtitle tracks, and chapter markers.

Click to upload file or drag and drop file here

Maximum file size: 100MB Supported formats: video/mp4, video/x-m4v

Only applies when re-encoding. 18-28 is recommended

Key Facts

Category
Images, Audio & Video
Input Types
file, select, number
Output Type
file
Sample Coverage
4
API Ready
Yes

Overview

The MP4 to MKV Converter allows you to seamlessly convert MP4 video files into the versatile MKV (Matroska) container format. Whether you want to preserve the original streams without re-encoding using the copy option, or transcode to modern codecs like H.265/HEVC or VP9 with custom CRF quality settings, this tool provides a fast and reliable way to repackage your media.

When to Use

  • When you need to wrap an existing MP4 video into an MKV container without re-encoding to preserve original quality.
  • When preparing video files for media players or home theater systems that require MKV's robust support for multiple audio tracks and subtitles.
  • When transcoding MP4 videos to highly efficient codecs like H.265/HEVC or VP9 to reduce file size while maintaining visual fidelity.

How It Works

  • Upload your MP4 or M4V video file up to the 500MB limit.
  • Select your preferred video and audio codecs, or choose 'Copy (No Re-encoding)' to instantly change the container format.
  • Adjust the CRF quality value if you are re-encoding, then click convert to generate and download your new MKV file.

Use Cases

Remuxing MP4 files to MKV containers instantly by copying the video and audio streams without transcoding.
Compressing large MP4 videos into space-saving MKV files using the H.265/HEVC codec and a custom CRF quality level.
Preparing media files for open-source players and home servers by converting legacy MP4 formats to MKV.

Examples

1. Instant Container Remuxing

Home Media Enthusiast
Background
A user has a high-quality MP4 video and wants to change its container to MKV to prepare it for a media server, but wants to avoid any quality loss or long processing times.
Problem
Changing the container format from MP4 to MKV without re-encoding the underlying video and audio streams.
How to Use
Upload the MP4 file, set both the Video Codec and Audio Codec options to 'Copy (No Re-encoding)', and run the converter.
Example Config
Video Codec: copy, Audio Codec: copy
Outcome
An MKV file is generated instantly with the exact same video and audio quality as the original MP4.

2. High-Efficiency Video Transcoding

Video Editor
Background
An editor needs to archive a large MP4 video file but has limited storage space.
Problem
Reducing the file size of an MP4 video while maintaining high visual quality in an MKV container.
How to Use
Upload the MP4 file, select 'H.265/HEVC' as the Video Codec, 'AAC' as the Audio Codec, and set the CRF Quality to 22.
Example Config
Video Codec: libx265, Audio Codec: aac, CRF Quality: 22
Outcome
A highly compressed MKV video file with excellent visual fidelity and a significantly smaller file size.

Try with Samples

audio, video, file

Related Hubs

FAQ

Can I convert MP4 to MKV without losing quality?

Yes, by selecting 'Copy (No Re-encoding)' for both video and audio codecs, the streams are transferred directly into the MKV container without quality loss.

What is the maximum file size supported?

The converter supports MP4 and M4V video files up to 500 MB in size.

When should I adjust the CRF Quality setting?

Adjust the CRF quality (recommended range 18-28) only when you choose to re-encode the video using codecs like H.264 or H.265.

Does this tool support H.265/HEVC encoding?

Yes, you can select the H.265/HEVC (libx265) video codec option to transcode your video during the conversion.

Can I convert M4V files with this tool?

Yes, the tool accepts both standard MP4 and M4V video formats as inputs.

API Documentation

Request Endpoint

POST /en/api/tools/mp4-to-mkv

Request Parameters

Parameter Name Type Required Description
videoFile file (Upload required) Yes -
videoCodec select No -
audioCodec select No -
quality number No Only applies when re-encoding. 18-28 is recommended

File type parameters need to be uploaded first via POST /upload/mp4-to-mkv to get filePath, then pass filePath to the corresponding file field.

Response Format

{
  "filePath": "/public/processing/randomid.ext",
  "fileName": "output.ext",
  "contentType": "application/octet-stream",
  "size": 1024,
  "metadata": {
    "key": "value"
  },
  "error": "Error message (optional)",
  "message": "Notification message (optional)"
}
File: File

AI MCP Documentation

Add this tool to your MCP server configuration:

{
  "mcpServers": {
    "elysiatools-mp4-to-mkv": {
      "name": "mp4-to-mkv",
      "description": "Convert MP4 video files to MKV format",
      "baseUrl": "https://elysiatools.com/mcp/sse?toolId=mp4-to-mkv",
      "command": "",
      "args": [],
      "env": {},
      "isActive": true,
      "type": "sse"
    }
  }
}

You can chain multiple tools, e.g.: `https://elysiatools.com/mcp/sse?toolId=png-to-webp,jpg-to-webp,gif-to-webp`, max 20 tools.

Supports URL file links or Base64 encoding for file parameters.

If you encounter any issues, please contact us at [email protected]