Step by step tutorial: convert MKV to AVI

Video conversion

MKV It is a video file format that we have already talked about several times on the LxA blog. If you are a user of video download websites, surely you have come across this type of file with an .mkv extension. Certainly in recent years it has become very popular and more and more videos are being found in this format, since it has some advantages, as we will now comment on.

But MKV is not always the best format in terms of compatibility. If you have a tablet, smartphone, Android TV, PC, etc., you will not have much problem, since there are many apps or players that support MKV formats, such as the fantastic Kodi multimedia center that we have also talked about a lot. The problem is when we work with an embedded or embedded system that is somewhat more limited, such as some TVs, optical players, etc., which usually only support MPEG or AVI and that is when the conversion becomes practical.

What is MKV?

MKV logo

MKV or Matroska is an open video container format, the files in this format can have different extensions, but the most popular is .mkv (also .mks, mka, .mk3d,…) as we have mentioned before. It serves as a universal format to store audiovisual and multimedia content such as subtitles in several languages, etc., so do not confuse it with a video codec (something that also I tried in LxA, the difference between container, format, and codec).

In addition, MKV allows you to obtain similar characteristics to other closed containers like MP4, AVI, etc., but totally open source under the GNU LGPL license:
  • It can contain one or more video and audio tracks.
  • Possibility of VFR (Variable Framerate).
  • Advanced functions for subtitles.
  • Possibility of several chapters and menus in the same file.
  • Good features for streaming.

Y as it is not a codec, the content can be encoded in various audio and video codecs, and has been carefully designed to offer backward compatibility, durability and extension to ensure a very promising future. However, it is not free of disadvantages:

  • Compatibility, is one of the main impediments to wanting to convert MKV to AVI or other format. As I said, embedded or embedded player devices such as some TVs, mp3 players, portable mp4 players, optical BD, DVD players, etc., most likely will not support it.
  • El size MKV file size is sometimes quite large, several gigabytes, which makes it difficult to be optimal for mobile devices that do not have high storage capacities. Another of the scenarios where it is interesting to move to another format.

In any case, there are many alternatives to convert.

What is AVI?

AVI logo

Developed by Microsoft in 1992, AVI (Audio Video Interleave) is also an audio and video container format like MKV, but more primitive and with great shortcomings compared to MKV. One of them is that it is a proprietary format, and also that it was created a long time ago and therefore it was not designed with some of the current needs in mind. As MKV it can use various types of codec to encode the content like DivX, Xvid, MP3, AC3, etc.

But despite all the disadvantages and problems that we can get out of the AVI format, it has such a great and important advantage that it almost makes all the disadvantages obviate. I speak of compatibilitySince being a Microsoft format, it has spread a lot and has taken on such extreme popularity that almost all the players and devices that we find are going to support it. Therefore, if they recognize it, it means that it is almost a universal format and we will not have problems.

Go from MKV to AVI

MKV to AVI logos converter

If you find yourself in that urgent need to transform an MKV file into AVI either to play on a device that does not accept it or on a mobile device where we want to save some space by reducing the file, the best thing is that convert MKV to AVI with these steps.

The first thing will be to find a tool to help us convert. To convert MKV to AVI there are several alternatives in our Linux distro. One of my favorites is to install (if we don't already have it) the package ffmpeg which is very powerful and flexible. Although you might prefer mencoder or winff, in any case they are all lightweight tools and work from the console. Choose the tool that you like the most, and install it from the repositories or App Store of your distro. I prefer to use mencoder and ffmpeg for this, therefore I will show you the steps to follow with these two ...

Conversion with ffmpeg

Now that we have them installed, we can do it with one or the other indifferently. For example, if you want to do it using the powerful ffmpeg multimedia swiss army knife, the command to execute will be:

<br data-mce-bogus="1">

ffmpeg -i nombre_video.mkv -codec copy nombre_video.avi<br data-mce-bogus="1">

With this we have managed to go from MKV to AVI keeping the same codec that had the original file, since we have put copy in that option. If we wanted to change it, we could have specified another codec from those available (see man ffmpeg). And if you want to be more specific for the same or different audio and video codecs, you could take a look at these examples that I show you:

ffmpeg -i nombre_video.mkv -vcodec copy -acodec copy nombre_video.avi
ffmpeg -i nombre_video.mkv -vcodec mpeg4 -acodec mp3 nombre_video.avi

La loss during conversion will be minimal. Once the process is finished we will have our AVI file created in the directory where we are working.

Conversion with mencoder

Although mencoder is a good tool, I prefer ffmpeg, but to taste the colors. That is why I will also describe the procedure. Once installed, I recommend that you use man mencoder to see all the options, since like the previous one it has many options and is quite complex. But to give you an example to transfer MKV to AVI, the command to execute is:

mencoder nombre_video.mkv -ovc xvid -oac mp3lame -lameopts abr:br=192 -xvidencopts pass=2:bitrate=-700000 -o nombre_video.avi

As you can see, here we have added codec Xvid video, and MP3 for audio, with a specific bitrate, as you can see in the options ...

I hope this tutorial on converting between MKV and AVI has helped you, and you know, don't forget to leave your comments, suggestions, or doubts ...


Leave a Comment

Your email address will not be published. Required fields are marked with *

*

*

  1. Responsible for the data: AB Internet Networks 2008 SL
  2. Purpose of the data: Control SPAM, comment management.
  3. Legitimation: Your consent
  4. Communication of the data: The data will not be communicated to third parties except by legal obligation.
  5. Data storage: Database hosted by Occentus Networks (EU)
  6. Rights: At any time you can limit, recover and delete your information.

  1.   wcd6 said

    It is inconsistent to say that the open source MKV codec has its compatibility disadvantage.

    The specifications of it can be studied by anyone who wants to develop hardware that interprets it. If the hardware developer decides not to support it, it is he who is deciding to make hardware incompatible with the format, then, it is the developer who is creating hardware with the disadvantage of compatibility towards the format, since the format is not the one that is preventing that the hardware is compatible.

    1.    Isaac said

      Sure, but what I mean is that with an MKV, if you have televisions in your home with a USB connection to connect some type of storage medium, or an SD card, or DVD players that can read multimedia files, portable players, etc. ., most likely they are not compatible with MKV no matter how open it is. That's what I mean by the compatibility problem ...

      The same happens with, for example, ext4 and FAT or NTFS ... which one has more compatibility? Well, it's obvious ... whether we like it or not.