The best video format

So you are recording some videos, or maybe you only want to store some on your desktop computer, or in your mobile phone. Perhaps you want to publish videos online on the Internet, or you want to share some with your friends. You can always use online tools as YouTube, Facebook Video, or you can share some video using Whatsapp or Snapchat without worrying about the video format or its quality. This is OK for most users.

But if on the other hand, you are worried about the video format, or its quality -why does this video have so poor quality when before it had optimal quality?- or its size -how can I reduce the size of this video without reducing the image quality?- or its playability -why doesn't this video play online when I can play it in my desktop computer?- continue reading and you will find some answers to these questions.

First of all we are talking about digital video and the ways we use to store, and play it on digital files. In this article we are not talking about cameras or tapes or other type of disks... We are talking about file extensions and file formats.

There is a big difference between the different formats and what you can achieve with each one. This is because almost all videos are stored compressed using different methods. Each of these methods are very particular and they are not compatible between them.

So we have a video file. This video file has a format. Almost all the times we can know its format looking at the file extension which can be avi, asf, mkv, mp4, webm... These files are what we call Containers because they usually contain one video and one audio stream, but they can contain multiple streams of each type and they can also contain another data such as subtitles. Those streams are created using codecs through a process that we call encoding. If we want to play those streams we need a program that supports -or understands- those encoded streams and can decode them. We have many different video codecs and audio codecs, but for now, we will talk about the container files. So what video formats can we use?

AVI

Audio Video Interleaved or AVI is a multimedia container format from Microsoft. It is one of the most popular formats out there as it was introduced more than 20 years ago. It is a format widely supported that can have multiple streams, and it supports almost any codec with some limitations. It also has some limitations that make it a worse decision when compared to other modern formats.
Video Codecs Supported: almost any
Audio Codecs Supported: almost any
Not supported By: it can have multiple problems depending on the codecs used.

MOV

QuickTime File Format uses .mov or .qt extensions. Like AVI format it can use many codecs that can make doubt the user about which program to use.
Video Codecs Supported: Many
Audio Codecs Supported: AAC, MP3, and others
Not supported By: it can have problems with open-source software or similars like Firefox web browser.

MP4

MPEG-4 Part 14 or MP4 is a multimedia container format that usually uses MPEG-4 Part 10 (H.264) encoded streams as video stream and Advanced Audio Coding streams as audio streams.
Video Codecs Supported: H.264, MPEG-2, MPEG-1
Audio Codecs Supported: AAC, MP3, and others
Not supported By: it can have problems with open-source software or similars like Firefox web browser.

3GPP and 3GPP2

It is a format similar to MP4 but it was designed for mobile phones. It was designed to use some codecs specific for mobile phones but it can use more modern codecs now. It can uses the same codecs as MP4 with some limitations (less limitations in 3GPP2)
Video Codecs Supported: H.263, H.264
Audio Codecs Supported: AMR-NB, AAC, and others
Not supported By: it can have problems with open-source software or similars like Firefox web browser.

MKV

MKV file format or Matroska is a container format using open standars. It can hold unlimited number of streams in one file, and can use almost any encoded stream (it is very flexible).
Video Codecs Supported: almost any
Audio Codecs Supported: almost any
Not supported By: it can have problems with iOS devices

WEBM

WEBM is actually a profile from Matroska container file. It is specifically using VP8 or VP9 codecs for video streams and Vorbis or Opus codecs for audio streams.
Video Codecs Supported: VP8, VP9
Audio Codecs Supported: Vorbis, Opus
Not supported By: it can have problems with iOS devices or some Windows players that does not support them natively.

There are lots of other file types as FLV, ASF, WMV, MPG, or GIF (yes, there are animated GIFs don't you know?) but I think they are used less and they have not the same popularity or importance than the ones we have talked about.

Which is the best file type

Well, in fact depending on the use that you are going to give to the video the answer should not be always the same. It depends on what you are looking for, but I can say that choosing the right video and audio codecs is also important than the file type, and can be more important.

The most important thing on file types is that you and your users support them so you can play the videos and work with them. As we have said, the differences on quality, size and performance will be mainly determined by the codecs used.

I would suggest that you use a modern container like MP4, MKV or WEBM (I usually work with them) and have in mind that the main issue will be if the device playing them supports them or not.

It is very common, especially when working with online videos, that you store the videos in various formats at the same time. You can have a video in mp4 and webm formats (or in mp4 and mkv) so the software trying to play the video will play the supported file (as you can find that some web browsers can play one file type but not the other)

    Did you find this article helpful?