<p>I don't know an incredible amount about video codecs, so I'll explain my top two and why I use them.</p>

<p>The MP4 format is designed to take up a small amount of space, this makes it good for sharing online and recording on devices with limited storage. The drawback is that you lose an extensive amount of quality, especially in particularly dark footage.  The mpeg format is also proprietary, meaning if you edit on Linux you have to buy the codec.</p>

<p>AVI is a very nice format. It isn't proprietary and there is very little loss in quality. This means AVI files can be very large, but I always use the format whenever it's feasible because of the quality.</p>

CC BY-SA 3.0
2014-10-23T01:42:34.433Z
You described two containers that can have any format of video.  You could, in fact, have an AVI that uses an h.264 video stream and an MP4 file that has a super high quality stream in it.  Also, much of the MPEG stuff can be used for free as long as it isn't commercial software, but commercial software has to license.
AJ Henderson
CC BY-SA 3.0
2014-10-23T00:15:00.357Z
2014-10-23T00:15:00.357Z
KC McLaughlin
<p>File formats are essentially wrappers, a container of sorts. The video information is encoded in a codec (Coder/Decoder). Some file formats only work with certain codecs. This is due (in part) to corporate/organizational pissing contests (or format wars - remember dvd+ vs. dvd -?). Codecs come with varying degrees of compression. The more compressed a codec is, the smaller your files will be, but they will also potentially be losing information, in the same way that a RAW file saves everything from CCD, and JPEG compresses the file by dropping repeated information. Also, most pro level NLEs (like Final Cut Pro (not FCPX)) play nicer with codecs that are less compressed. The more compressed it is the more the computer has to work to decode and re-enconde the information when you make changes (moving on the time line, cutting, adding effects etc.)</p>

<p>Recommendations:
For recording and editing (HD), pick a low compression, high quality codec such as DVCProHD, AVCHD, Apple ProRes.</p>

<p>To export for sharing I recommend H.264. It is supported nearly universally and is very good quality with relatively small files. BluRay videos are actually encoded in an ultra high quality H.264</p>

<p>One other note: if your camcorder saves files in a weird format (ie. not mov, mpeg, mp4), you will need to use a transfer process in your NLE. Be sure to save the ENTIRE folder structure from your memory card, not just the mts, mxf, or whatever files.</p>

<p>More tips: if you're not sure what codec a file is in, you can open it in QuickTime and hit cmd+i to open the inspector window. It will have all the codec information there.
Additionally, on Windows there is a small utility called G-SPOT which can show you what codec are you using on that file etc.</p>

CC BY-SA 3.0
2011-09-09T13:15:36.313Z
So there are two variables -- file format and codec? Sounds like the codec is more important than the file format. Right?
Hugh
CC BY-SA 3.0
2011-09-09T13:44:20.183Z
That's right. Some codecs only go in certain file formats (eg. ProRes will always be a mov), but some span multiple types (eg. H.264 can be mov, mp4, m4v). While some players can occasionally be finicky about file format, they're more finicky about codecs.
Drew P
CC BY-SA 3.0
2011-09-16T09:56:54.920Z
Actually, no. It depends what you want to do with the video. If you only want to compress it and store it in the minimum space then codec is most important. If you want to play it back real time with random access, synchronized sound and other bells and whistles then format is more important.
koan
CC BY-SA 3.0
2011-09-09T12:43:13.840Z
2011-10-20T14:42:34.170Z
2011-10-20T14:42:34.170Z
Drew P
<p>In digital video, there are all these different kinds of files: m4v, mov, mkv, mts, mp4, mpeg, and a host of others, and I can't seem to find a clear answer as to what each is good for.</p>

<p>(By contrast, when you're taking still pictures, you have two choices: JPG or RAW; with JPG, you basically know what the file contains, and with RAW, it's going to vary by camera manufacturer. I know it's a little more complicated than that, but it's nothing like the explosion of options available in digital video.)</p>

<p>Furthermore, it seems like the video's file extension doesn't tell you what's inside the file. From what I understand, a .mov file (for example) could contain just about anything.</p>

<p>Then there is this whole thing about h.264, AIC, ProRes, iFrame, AVCHD, DV, HDV -- at least I think those all belong to the same category, but I'm probably mistaken.</p>

<p>Can anyone help me understand all the different variables that are in play here so that I can make intelligent choices about what I do with the files coming off my camcorder?</p>

CC BY-SA 3.0
2014-10-23T04:00:41.733Z
There are way more formats for stills than just JPG and RAW.  Gif, Tiff, PSD, PNG, and PICT are just a few that come to mind.  Also, I don't really think RAW is an actual, codified, formalized format anyway.  That's maybe what your Canon camera calls it, but it's probably a DNG, EXR, CineformRaw, or something.  Point is, image storage and compression is complicated.  Increase that complexity by adding a temporal dimension and an aural one, and you've got a slew of codecs, containers, and other options (delivery method, e.g.) to consider.  Each is best for different purposes.
Jason Conrad
<file-formats>
How to make sense of video file formats?
Hugh
# How to make sense of video file formats?

(Asked by: username_0 on 2011-09-09)

In digital video, there are all these different kinds of files: m4v, mov, mkv, mts, mp4, mpeg, and a host of others, and I can't seem to find a clear answer as to what each is good for.

(By contrast, when you're taking still pictures, you have two choices: JPG or RAW; with JPG, you basically know what the file contains, and with RAW, it's going to vary by camera manufacturer. I know it's a little more complicated than that, but it's nothing like the explosion of options available in digital video.)

Furthermore, it seems like the video's file extension doesn't tell you what's inside the file. From what I understand, a .mov file (for example) could contain just about anything.

Then there is this whole thing about h.264, AIC, ProRes, iFrame, AVCHD, DV, HDV -- at least I think those all belong to the same category, but I'm probably mistaken.

Can anyone help me understand all the different variables that are in play here so that I can make intelligent choices about what I do with the files coming off my camcorder?

**Tags:** file-formats

> **Comments:**
> **username_1**: There are way more formats for stills than just JPG and RAW.  Gif, Tiff, PSD, PNG, and PICT are just a few that come to mind.  Also, I don't really think RAW is an actual, codified, formalized format anyway.  That's maybe what your Canon camera calls it, but it's probably a DNG, EXR, CineformRaw, or something.  Point is, image storage and compression is complicated.  Increase that complexity by adding a temporal dimension and an aural one, and you've got a slew of codecs, containers, and other options (delivery method, e.g.) to consider.  Each is best for different purposes.  

---

## 2 answers

### Answer by username_4 on 2011-09-09. Score: 8 | Accepted answer

File formats are essentially wrappers, a container of sorts. The video information is encoded in a codec (Coder/Decoder). Some file formats only work with certain codecs. This is due (in part) to corporate/organizational pissing contests (or format wars - remember dvd+ vs. dvd -?). Codecs come with varying degrees of compression. The more compressed a codec is, the smaller your files will be, but they will also potentially be losing information, in the same way that a RAW file saves everything from CCD, and JPEG compresses the file by dropping repeated information. Also, most pro level NLEs (like Final Cut Pro (not FCPX)) play nicer with codecs that are less compressed. The more compressed it is the more the computer has to work to decode and re-enconde the information when you make changes (moving on the time line, cutting, adding effects etc.)

Recommendations:
For recording and editing (HD), pick a low compression, high quality codec such as DVCProHD, AVCHD, Apple ProRes.

To export for sharing I recommend H.264. It is supported nearly universally and is very good quality with relatively small files. BluRay videos are actually encoded in an ultra high quality H.264

One other note: if your camcorder saves files in a weird format (ie. not mov, mpeg, mp4), you will need to use a transfer process in your NLE. Be sure to save the ENTIRE folder structure from your memory card, not just the mts, mxf, or whatever files.

More tips: if you're not sure what codec a file is in, you can open it in QuickTime and hit cmd+i to open the inspector window. It will have all the codec information there.
Additionally, on Windows there is a small utility called G-SPOT which can show you what codec are you using on that file etc.

> **Comments:**
> **username_0**: So there are two variables -- file format and codec? Sounds like the codec is more important than the file format. Right?  
> **username_4**: That's right. Some codecs only go in certain file formats (eg. ProRes will always be a mov), but some span multiple types (eg. H.264 can be mov, mp4, m4v). While some players can occasionally be finicky about file format, they're more finicky about codecs.  
> **username_5**: Actually, no. It depends what you want to do with the video. If you only want to compress it and store it in the minimum space then codec is most important. If you want to play it back real time with random access, synchronized sound and other bells and whistles then format is more important.  

---

### Answer by username_2 on 2014-10-23. Score: -1

I don't know an incredible amount about video codecs, so I'll explain my top two and why I use them.

The MP4 format is designed to take up a small amount of space, this makes it good for sharing online and recording on devices with limited storage. The drawback is that you lose an extensive amount of quality, especially in particularly dark footage. The mpeg format is also proprietary, meaning if you edit on Linux you have to buy the codec.

AVI is a very nice format. It isn't proprietary and there is very little loss in quality. This means AVI files can be very large, but I always use the format whenever it's feasible because of the quality.

> **Comments:**
> **username_3**: You described two containers that can have any format of video.  You could, in fact, have an AVI that uses an h.264 video stream and an MP4 file that has a super high quality stream in it.  Also, much of the MPEG stuff can be used for free as long as it isn't commercial software, but commercial software has to license.  

---

