How to Convert Multi-Track MKV to MP4 Using FFmpeg without Quality Loss

Cecilia Hwung
5 min readMay 24, 2023

--

While smartphones have revolutionized the way we interact with technology, they still face certain limitations. For instance, Android devices are unable to play certain file formats, such as MKV. This is precisely why converting MKV to MP4 becomes necessary, as MP4 is widely compatible with various electronic devices. Well, if searching online, you may have come across various threads on using FFmpeg to convert MKV to MP4.

However, navigating through these discussions to find the right approach can be challenging, especially for those unfamiliar with FFmpeg and video-related terminologies. Worry not, as here we have pieced together a complete tutorial on how to convert MKV to MP4 using FFmpeg. Read on to learn more!

What Is FFmpeg

FFmpeg is a powerful open-source tool used to process multimedia data. It can convert various formats including MKV to MP4 and various other formats while preserving the original quality. Moreover, it provides a wide range of features such as media file recording and streaming, decoding, encoding, transcoding, filtering, multiplexing, and demultiplexing. The cross-platform compatibility of FFmpeg allows it to work with operating systems such as Linux, Mac OS X, Microsoft Windows, and even mobile platforms like Android and iOS.

Despite its impressive power and functionality, one drawback that users often encounter is the absence of a user-friendly interface. To address this, we have prepared a beginner-friendly tutorial below that will guide you through the process of converting MKV to MP4 using FFmpeg.

How to Convert MKV to MP4 Using FFmpeg on PC/Mac

Step 1: Downloading and Installing FFmpeg on Your System:

To get started, visit www.ffmpeg.org and initiate the download process. Choose the appropriate version based on your operating system (Windows or Mac).

Installing FFmpeg on Windows:

  1. Download the Windows package of FFmpeg and select the latest 32-bit or 64-bit Static version.
  2. Extract the ffmpeg.exe file from the downloaded 7z archive using a tool like 7zip.
  3. Create a new folder named “FFmpeg” in the system directory (usually located at C:).
  4. Move all the extracted files into the newly created “FFmpeg” folder.
  5. Open the “My Computer” or “This PC” window, go to Properties > Advanced system settings > Environmental Variables > New. Set the variable name as “Path” and the variable value as “C:\FFmpeg\bin”. Click OK to save the changes.
  6. Press the Windows key + R, and type “CMD” to open Command Prompt in administrator mode.
  7. Type “ffmpeg-version” and press Enter. If multiple lines of content are displayed, it indicates that the FFmpeg installation was successful.
Install FFmpeg on Windows
Install FFmpeg on Windows

Installing FFmpeg on Mac OS X:

  1. Install Homebrew by executing the Homebrew command provided on their website via the Terminal.
  2. In the Terminal, type “brew install ffmpeg” and press Enter to install FFmpeg.

Step 2: Converting MKV to MP4 with FFmpeg

Converting MKV to MP4 with FFmpeg on Windows:

  1. Copy the path of the source MKV video file.
  2. Open Command Prompt and navigate to the location where FFmpeg is installed by typing “cd” followed by the path. Press Enter.
  3. Enter the command “ ffmpeg -i my_movie.mkv -vcodec copy -acodec copy my_movie.mp4 “ and press Enter. Replace “my_movie” with the actual name of your source video file. Ensure there are no missing spaces.
Convert MKV to MP4 with FFmpeg on Windows
Convert MKV to MP4 with FFmpeg on Windows

Converting MKV to MP4 with FFmpeg on Mac:

  1. Clear the Terminal by pressing Space and typing “clear”.
  2. Use the “cd” command followed by the path of the source video file to navigate to its location. Press Enter.
  3. Type the command “ ffmpeg -i my_movie.mkv -vcodec copy -acodec copy my_movie.mp4 “ and press Enter. Replace “my_movie” with the name of your source video file.

The Best FFmpeg Alternative to Convert MKV to MP4 without Losing Quality

There is no doubt about the fact that FFmpeg is an extremely powerful tool. But, at the same time, it can’t be denied that it is also an extremely complex tool, even for a person with a technical background. If you’re seeking a solution that is more efficient, faster, and user-friendly, then your search ends with VideoProc Converter.

VideoProc Converter, an all-in-one video processing software, allows you to convert and remux MKV to MP4 without compromising any quality loss. The Full-GPU Acceleration built-in makes the entire conversion process quick and easy.

VideoProc Converter — Best FFmpeg Alternative
VideoProc Converter — Best FFmpeg Alternative

How to Convert MKV to MP4 with the Best FFmpeg Alternative

Step 1: Download and Install VideoProc on Your PC or Mac.

Start by downloading and installing VideoProc on your computer. It’s available for both PC and Mac.

Step 2: Input the Source MKV Video to VideoProc

Launch the software and select the “Video” option. Click the “+Video” button to add your MKV file for conversion.

Choose Video Menu from VideoProc Converter Homepage
Choose Video Menu from VideoProc Converter Homepage

Step 3: Start to Convert the Video

If you have multiple files to convert, select the “+Video Folder” tab to import all of them. Choose the target format as MP4, and then simply hit the “RUN” button to begin the conversion process.

Convert MKV to MP4 in VideoProc Converter
Convert MKV to MP4 in VideoProc Converter

Note: Make sure to check the “Auto Copy” feature on the right side of the screen, which allows the software to remux without re-encoding.

FAQs

1. Why my audio file is lost after converting MKV to MP4 in FFmpeg?

1. Your FFmpeg may be out of date. You can upgrade your FFmpeg to its latest versions and install an upgraded audio decoder.

2. The MKV file imported has a DTS audio format, which may not be compatible with your player. You can choose the supported audio encoder/decoder from AAC, AC4, MP3, WAV1, WAV2, Vorbis, MP2, Opus.

2. How to solve the subtitle track loss after FFmpeg converts MKV to MP4?

1. Add the subtitle track as the independent optional track, and add the commands in FFmpeg: ffmpeg -i infile.mp4 -i infile.srt -c > copy -c:s mov_text outfile.mp4.
2. Add the subtitle track as the hardcode subtitle:

a. In the Libass Library, convert the subtitle file format from .srt to .ass. Insert the command: ffmpeg -i subtitles.srt subtitles.ass;

b. Use the filter to add the subtitle. Insert the command: ffmpeg -i mymovie.mp4 -vf ass = subtitles.ass mysubtitledmovie.mp4.

3. How can I convert MKV to MP4 in the fastest way?

For a quick MKV to MP4 conversion, it is suggested to use the most versatile video converter — VideoProc Converter. With its built-in Level-3 Hardware Acceleration technology, you can convert MKV to MP4 file in mere seconds.

--

--

Cecilia Hwung
Cecilia Hwung

Written by Cecilia Hwung

Tech writer on AI, hardware, and software. I share reviews, trends, and tips. Visit me at videoproc.com for the latest in multimedia.

No responses yet