Convert MKV video to MP4 via Terminal

Converting MKV video is super fast via terminal. This can be done on Linux or Mac.

Install ffmpeg

sudo apt-get install ffmpeg
OR
sudo brew install ffmpeg

Example:

To convert video.mkv to video.mp4 use the command below:

ffmpeg -i video.mkv -vcodec copy -acodec copy video.mp4

This 183MB file took less than 20 seconds to convert.screen-shot-2016-09-22-at-22-13-42

This 183MB file took less than 20 seconds to convert.

Tip: To convert all the mkv files in current directory, run a simple loop in terminal:

for i in *mkv; do ffmpeg -i $i -vcodec copy -acodec copy $i.mp4; done
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s