---
title: 'How To Batch Convert mkv files to mp4 using FFmpeg - Step by Step Tutorial'
source: 'https://youtube.com/watch?v=3p6Wb5eshuo'
video_id: '3p6Wb5eshuo'
date: 2026-06-14
duration_sec: 240
---

# How To Batch Convert mkv files to mp4 using FFmpeg - Step by Step Tutorial

> Source: [How To Batch Convert mkv files to mp4 using FFmpeg - Step by Step Tutorial](https://youtube.com/watch?v=3p6Wb5eshuo)

## Summary

This tutorial demonstrates how to batch convert MKV files to MP4 using FFmpeg without re-encoding, preserving quality. It covers navigating to the folder in command prompt, using a for loop to process multiple files, and cleaning up filenames.

### Key Points

- **Introduction and Prerequisites** [00:00] — The video covers batch converting MKV to MP4 with same quality using FFmpeg. Ensure FFmpeg is installed.
- **Navigating to the Folder** [00:20] — Open command prompt (cmd), use 'cd desktop' then 'cd mkv' to reach the folder containing MKV files.
- **Single File Conversion Command** [01:06] — Command: ffmpeg -i file.mkv -c copy file.mp4. This copies streams without re-encoding.
- **Batch Conversion with For Loop** [01:43] — Use 'for -r %f in (*.mkv) do ffmpeg -i %f -c copy %~nf.mp4' to convert all MKV files recursively.
- **Cleaning Up Filenames** [02:45] — Use '%~nf' to remove the .mkv extension, resulting in clean .mp4 filenames.
- **Execution and Results** [03:01] — Press Enter to run the loop. MKV files are copied to MP4; originals remain. Conversion is fast for files around 100-400 MB.

### Conclusion

Batch converting MKV to MP4 with FFmpeg is straightforward using a for loop and the -c copy flag to avoid re-encoding. The process preserves quality and is efficient for multiple files.

## Transcript

welcome to the learning zone today we're
gonna be batch converting mkv files to
mp4 files with the same exact quality
and it will not take that long but make
sure you have ffmpeg installed on your
computer if you don't have it already
installed on your computer i have a
tutorial on how to do that you can click
the link right above but first what
we're going to do is navigate to your
command prompt so you can do that by
going into the windows search bar at the
bottom typing in cmd and the command
prompt will show up and you can click on
that so now that we have our command
prompt open what we are going to do is
navigate to the directory that has all
of our mkv files so i have a folder on
my desktop called mkv and so we're going
to go there by typing in cd desktop
and what that cd does is tells it what
directory to go to so cd desktop and it
goes to the desktop and now we need to
go to our mkv folder see the mkv and now
we are in the mkv folder on our desktop
if you need to go back you do cd dot dot
and it'll go back a directory so cd mkb
so now we are where all of our files are
at and what we can do if we just want to
convert one is do ffmpeg
dash i
and then the file name file dot mkv make
sure to have the mkv in it
dash c
copy so basically this is just moving it
from the mkv container to the mp4
container it's not re-encoding or doing
anything like that we're just moving
containers and it will be basically the
same file size basically the same file
but in dot mp4
and then file.mp4 you can name it
whatever you want just make sure you
have the dot mp4 and then that is just
for one however we want to batch convert
we want to do a whole series of them
but what we want to do is a for loop so
we're going to do four
dash r and this will look recursively in
all of the subfolders so if you have a
bunch of folders within these folders um
it will also convert all of those
and then for the files
in
with the name
dot mkv
dot
mkv
and we're going to tell it what to do so
for all the files that are mkv files do
ffmpeg pretty much what we did before
dash i
and then this is going to be the file
name percent f
so the file
dash c
copy which is what we did before
and then what we want to do
is the new file dot mp4 so we can do
percent f dot mp4
just like that however we also want to
clean it up a little bit by getting rid
of the dot mkv at the end so
if we just did it like this it'll be
mkv.mp4 which is a little messy looking
so we're going to do
tilde n
to get rid of that mkv at the end so
it'll now just say mp4 now if you're
doing this within a batch already you
can do percent percent f and then for
everything instead of percent f and
it'll do the same exact thing
but this should get you what you need so
now we're going to hit enter and it'll
go through and convert all of our mkv's
to mp4s it will leave all the mkvs don't
worry it's just copying them over you
can delete them later if you'd like and
just like that i think that was about
seven or so files that we converted from
mkv to mp4 they were all somewhere
around 100 to 400 megabytes big
so if you have larger files it'll
probably take a little bit longer so
thank you for james mac white on github
for sort of this example i kind of went
through that if you also need that for
mac i will leave that in the description
that's slightly different and if you
have any issues for example if you have
like a different audio type free mkv
file that mp4 doesn't support you may
have to convert it over but if you click
the link in the description it kind of
goes over all of those different
solutions so make sure to check that out
if you have any problems and if you have
any other problems in general you can
let me know in the comments and i'll try
my best to help thank you so much for
watching make sure to leave a like and
subscribe for more videos like these in
the future if you have any suggestions
for future videos let me know as well
thank you for watching i'll see you next
time this is the learning zone
