In this MiniTool free video converter post, we will walk you through the detailed steps to use FFmpeg to convert MKV to MP4. As a bonus, we also will recommend an easy alternative way for MKV to MP4 conversion.

FFmpeg is an open-source software project that has a suite of libraries and programs for handling videos, audio, and other multimedia files. It can help you convert a video to another video format or extract audio from a video by entering specific commands. In this post, we will introduce to you how to convert MKV to MP4 with FFmpeg.

How to Convert MKV to MP4 via FFmpeg

Here are 4 steps to make FFmpeg to convert MKV to MP4. Follow the below detailed guidance and you can master how to convert MKV to MP4 via FFmpeg.

Step 1. Download and install FFmpeg

You need to go to the official FFmpeg website to download its installation package and install it on your computer. For detailed steps to install FFmpeg, you can read this post: How to Download and Install FFmpeg on Windows/Mac/Linux

Step 2. Open the Command Prompt Window

Here are two options to open FFmpeg.

  • Option 1. Press Win + R to open the Run window, type CMD into the box, and click OK to open the Command Prompt.
  • Option 2. In the Search box of Windows, enter CMD, and press Enter.

Step 3. Specify the Directory for the Target MKV File

Next, what you need to do is specify the directory for the MKV file that you intend to convert. Type into the “cd” command, press the Space key to leave a space, and then copy and paste the directory name. Next, press Enter.

specify the directory for the target MKV file

Step 4. Start FFmpeg MKV to MP4 Conversion

After finishing the above preparations, let’s learn how to start converting MKV to MP4 using FFmpeg. Type into the below command:

ffmpeg -i filename.mkv filename.mp4

You should replace the first filename in the command with the true name of your MKV file. Also, you can change the second filename with the name you want to give to the converted MP4 file.

enter the conversion command

Then press Enter to initiate the conversion process. The conversion will be completed in a few seconds. Once the conversion is successful, you can get the scene shown in the following screenshot. If you fail to convert MKV to MP4, you need to go back and check your command.

the page of successful conversion
How to Use FFmpeg to Convert WebM to MP4 [Step-by-Step Guide]
How to Use FFmpeg to Convert WebM to MP4 [Step-by-Step Guide]

Can you convert WebM to MP4 with FFmpeg? How to convert WebM to MP4 in an easy way? Read this post and you’ll find the answer.

Read More

How to Batch FFmpeg MKV to MP4 Conversion

Furthermore, FFmpeg also supports batch video conversion. After repeating the above Step 1 and Step 2 to install and launch the Command Prompt window, you can follow the below steps to batch FFmpeg MKV to MP4 conversion.

Step 1. Enter the “cd” command, press the Space key to leave a space, and copy and paste the directory name of the folder that contains MKV files. Press Enter to process to the next step.

copy the directory name of the MKV folder

Step 2. Then you need to type into the below command:

for /R %f IN (*.mkv) DO ffmpeg -i “%f” -c copy “%~nf.mp4”

Next, press Enter to start the conversion process.

enter the command for batch conversion
Tips:
If you are a Mac or Linux user, you need to enter this command: for f in *.mkv; do ffmpeg -i "$f" -c copy "${f%.mkv}.mp4"; done

Step 3. You will get the result as shown in the below screenshot. And you can go to the MKV folder to find the converted MP4 files.

the window of successful batch conversion

An Easy Way to Convert MKV to MP4 or Vice Versa

MiniTool Video Converter is an easy-to-use video converter that is suitable for beginners. It supports converting various video formats, such as MP4, MKV, M4V, MOV, 3GP, WebM, etc. Moreover, it allows you to adjust the output format parameters, including the codec, resolution, frame rate, as well as the bit rate of the video, and the codec, channel, sample rate, and the bit rate of the audio.

interface of MiniTool Video Converter

Besides, MiniTool Video Converter, as a file converter, supports converting audio to audio, audio to video, and vice versa. You can also use its batch file conversion feature to save conversion time.

How to Fix “Dailymotion Not Working”? Here Are 4 Solutions
How to Fix “Dailymotion Not Working”? Here Are 4 Solutions

Have you encountered the problem of “Dailymotion not working”? Why is Dailymotion not working? How to fix that problem? Just read this post!

Read More
Tips:
MiniTool MovieMaker is a free movie maker and video editor that can help you edit MKV and MP4 videos easily with its various editing features and resources. Meanwhile, it supports MKV to MP4 conversion.

MiniTool MovieMakerClick to Download100%Clean & Safe

Conclusion

How to use FFmpeg for MKV to MP4 conversion? This post has offered a detailed tutorial. Hopefully, this post will be helpful to you.

  • linkedin
  • reddit