How to Use FFmpeg to Convert MKV to MP4 Lossless

How to Use FFmpeg to Convert MKV to MP4 Lossless

Kevin Miller

January 03, 2020 16:27Updated by to Convert Video

– “How to simply convert MKV to MP4 with FFmpeg?”

– “FFmpeg converting from MKV to MP4 without re-encoding.”

– “How to convert MKV to MP4 in terminal?”

– “Convert MKV to MP4 with the output file viewable in the process”

You can see these or those questions asked online about how to use FFmpeg to convert MKV to MP4. Compares with other online MKV to MP4 converters and MKV to MP4 converter freeware, FFmpeg seems different and kind of difficult to handle at the beginning. But do not worry about that, you can read this article to figure out what FFmpeg is and how to convert MKV to MP4 with FFmpeg with ease.

ffmpeg convert mkv to mp4

Part 1: How to convert MKV to MP4 using FFmpeg

FFmpeg is the free cross-platform converter that enables you to convert MKV to MP4 and other video formats. And you can use FFmpeg to stream and record media files in free way too. You will not get the common MKV to MP4 interface such as “Add File” “Output Format” and other buttons to optimize with. To be more specific, converting .mkv to .mp4 with FFmpeg is faster than common video converters like Audacity, Handbrake and others.

Key Features:

You can decode, encode, transcode, mux, demux, stream, filter and play pretty much anything that humans and machines have created. And FFmpeg is compatible with Linux, Mac OS, Microsoft Windows and other platforms. There are many FFmpeg tools like ffmpeg, ffserver, ffplay and ffprobe that enable you to manage multimedia files in one-stop. Once you open website, you may be shocked with the black-based interface with only one blank to fill with. Just spend one minute to read the following guidance to convert MKV to MP4 with FFmpeg lossless.


How to Convert MKV Videos to MP4 on PC/Mac

Step 1

Download and install FFmpeg on PC/Mac

Open to click the huge green “Download” icon. You can choose FFmpeg versions and which operating system to install including OS X, Windows and Linux mainly.

Step 2

Convert MKV to MP4 from the terminal using FFmpeg on PC/Mac

Find the MKV video you want to convert to MP4. And then you can run the following command to convert a MKV to a MP4 in Terminal.
ffmpeg -i my_movie.mkv -vcodec copy -acodec copy my_movie.mp4

After that, you can get converted MKV to MP4 video lossless on Mac, PC and other platforms for free.

Part 2: Best FFmpeg alternative to convert MKV to MP4

If you still feel hard of understanding the above MKV to MP4 FFmpeg conversion, then you can get another MKV to MP4 converter with easy-to-use interface. It is AnyMP4 Video Converter Ultimate that can batch convert MKV to MP4 with fast conversion speed and highest video quality. The whole interface is well-designed with all kinds of filters displayed simply. And you can get more video-editing filters to customize video settings and video effects of converted MKV to MP4 files on Windows and Mac computers. In a word, Video Converter Ultimate app can satisfy your daily video and audio management, so you do not have to use FFMPEG to convert MKV to MP4 in hassle.

How to Convert MKV to MP4

Step 1

Add MKV videos to FFmpeg alternative video converter

You can free download AnyMP4 Video Converter Ultimate from AnyMP4 official site. For Mac users, you need to drag Video Converter Ultimate to the “Application” folder to complete the FFmpeg alternative app installation. Launch the FFmpeg alternative on Windows or Mac computer. Tap “Add File” in the toolbar. There will be the popping up window that you can select which MKV video to import.

add video

Step 2

Edit MKV video effect

Tap “Edit” in the top right corner to enter the MKV video-editing page. You can rotate video, adjust 3D settings, crop video, add video effect, enhance video quality and add watermark mainly. Moreover, you can also choose “Video Enhance” in the main interface to upscale lower resolution video to higher resolution.

edit video

Step 3

Convert MKV to MP4 with FFmpeg alternative

Select “4K H.265/HEVC Video(*.mp4)” from the drop-down “Profile” menu. You can tap “Apply to All” besides to batch convert MKV files to MP4. Click “Browse” to select any folder to save converted MKV to MP4 video in “Destination”. It is also supported to merge MKV videos into one MKV file and then convert to MP4. Tap “Convert” button to start converting MKV videos to MP4 videos on PC or Mac in high quality.

convert video

You can choose FFmpeg to convert MKV to MP4 from the terminal. Or you can seek the easier solution to batch convert MKV to MP4 with the Video Converter Ultimate in ultrafast speed. Actually, the latter video converter is more suitable for most users, which has simplified all video conversion processes already.

Part 3: FAQs of using FFmpeg to convert MKV to MP4

Question 1. Why there is a lack of audio after FFmpeg MKV to MP4 conversion?

There are 2 reasons for explaining this problem.

&#10148 The input MKV files has the DTS audio. Though it is supported in MP4, it may do not work with your player. You will have to select the supported audio codec by your player from AC3, MP2, WAV1, WAV2, AAC, Vorbis, MP3 and Opus from FFmpeg conversion.

&#10148 The FFmpeg is old. You can download the latest FFmpeg to install the audio codec with improvements.

Question 2. How to fix subtitles loss after using FFmpeg to convert MKV to MP4?

There are 2 ways to fix FFmpeg not adding subtitles while converting MKV to MP4.

&#10148 Add the subtitle as a separate optional track, and it will need your MP4 player (e.g. VLC) to show the subtitle.

Add the following command into FFmpeg:

ffmpeg -i infile.mp4 -i -c copy -c:s mov_text outfile.mp4

&#10148 Add the subtitle as the hard-soft one.

1. Use the libass library to convert the subtitles to .ass format from .srt first by inputting the following command:

ffmpeg -i subtitles.ass

2. Add the subtitles using a video filter by inputting the following command:

ffmpeg -i mymovie.mp4 -vf ass=subtitles.ass mysubtitledmovie.mp4

Question 3. Which is the best? MP4 or MKV?

Compatibility: MP4 can be played by almost all players while MKV is supported by some devices.

File size: Commonly, MKV has a larger file size than MP4.

Audio track and subtitle support: MKV supports the selectable subtitles of ASS and SSA, and audio tracks, while MP4 does not support. When you want to rip DVD or Blu-ray, MKV is the best choice.

Question 4. How can I convert MKV to MP4 faster?

AnyMP4 Video Converter Ultimate supports hardware acceleration while converting MKV files. So, you just need to enable the acceleration option to change MKV to MP4 faster.

What do you think of this post?


Rating: 4.9 / 5 (172 Votes)

More Reading

Plex MKV Solution – A Complete Guide to Play MKV Videos in Plex Media Server

Will Plex play MKV files? Why you can’t play MKV within Plex Media Server? Just learn more details about how to playback the MKV files from the article.

Totally Free Way to Convert Protected DVD to AVI with Ultrafast Speed

Fail to rip copy protected DVDs? Just come here and get your best DVD to AVI freeware in 2019. You can convert DVD to AVI for free with any copy protection in minutes.

How to Convert DVD to Digital Formats, Like MP4, AVI, MP3 and More

What should be the best methods to convert DVD to digital formats, such as MP4, MP3 or AVI, which you can use for online stream? Here are 3 frequently used methods you should know.

7 Methods to Convert Videos to MP4 with Ease

When you have multiple video formats, what are the best methods to convert to MP4? Just learn more details about the solutions from the article.

Convert Video

M3U8 to MP4 AVI to MKV M2TS to MP4 HandBrake Convert AVI Convert iPhone Video to MP4 VR Video Converter MP4 to iMovie Video to GIF