Video Formats Information
Video Formats Information
Video Disc Formats
Video Disc Formats
Linux Video Programs Comparison
Linux Video Programs Comparison
Essential Linux Video Apps
Essential Linux Video Apps
Linux Powered DVD Production Guide
Linux DVD Production Guide
Video Camera Information Guide
Video Camera Information Guide
DVD Ripping With Mencoder
DVD Ripping With Mencoder
Back to Linux Information Pages
Linux Information Pages

Back to Video Main Page

Video Formats

There are a number of different video formats available for storing video. I will only go into those most commonly used.

A format is simply a container for audio and/or video information ("streams"). Like a bowl can contain water, milk, or soup, a format can contain audio, video, or other information streams (such as subtitles).
A codec is the material that goes inside of the format container. It is the milk, water, or soup in the bowl.
While the popularity of certain formats/codecs may vary based on what architecture/operating system used, this information is applicable regardless of the architecture or platform. It applies whether you are using a Dual G5 Macintosh with OS X (druel...), an SGI Octane with IRIX 6.5 (double druel...), or a meager PeeCee with Windoze, Linux, BeOS, FreeBSD, etc. With video, a format file usually contains some header information at the beginning, with information about the streams contained in it, and sometimes information about timing and other things.
Usually you can put any type of video and audio into any given format, but some are better than others for certain streams. For instance, a Quicktime file may contain Sorenson video and mp3 audio, or it may contain DV video and AAC audio or many other combinations. Some formats allow multiple streams inside the same file: like a DVD which has a 7 channel DTS sound stream in English, a stereo English sound stream, a stereo French sound stream, 2 subtitle tracks, and an MPEG-2 video stream.
When there is more than one stream in a file, the file is called a multiplexed file.


Here are the most commonly used video/audio file formats and codecs:


MPEG:
MPEG has been around since the early 1990s, and is very popular for many things. Although not very good for editing, MPEG files can contain multiple multiplexed audio and video streams. It performs best with MPEG video inside.
MPEG file extensions are: .mpg .mpeg .mpv .mpa .m1v .m2v .m1a .m2a .m4v .mp2 .mp3 .mp4a

Quicktime:
Quicktime is a very good format invented by Apple Computer Corp. It can contain and handle many different streams well, from Component Video to MPEG-4 for streaming, and is good for editing.
.mov .movie .mp4 .qt .quicktime

AVI:
AVI stands for Audio Video Interleave. I believe it was developed by Microsoft, and is good for many purposes. It is a versatile format and is widely used.
.avi

Ogg:
Ogg is a newer format developed by the good folks at Xiph.org. It performs better than AVI and takes up less space for the header and interleave information. Although it is usually paired with some form of MPEG-4 video and Vorbis audio, it is very versatile and can contain pretty much any format and multiple streams. An excellent all-around format for many uses.
.ogg .ogm

ASF:
Advanced Streaming Format was developed by Microsoft. It is pretty good for certain uses, like internet streaming, but it is not very well supported on multiple platforms. It can take most video and audio codecs, but usually contains Windows Media Video and Windows Media Audio.
.asf .asx .wmv .wma

NUV:
A good format for capturing, especially with lower-end systems. It also edits faily well. It can contain several different codecs, but was originally designed for nuppelvideo, which is similar to mjpeg.
.nuv .nv

Real:
Real Networks developed the Real file format to contain their audio and video codecs for internet streaming. It only contains Real codecs.
.rm .ra .ram

Matroska:
Matroska Video is a new format that has advanced subtitling capabilities and other enhancements. It can contain multiple streams with multiple forms of video, audio, and captioning. It is a very versatile format.
.mkv .matroska



Video Codecs

Codecs are the type of video contained in the format container.

RGB:
Also refered to as RawVideo. RGB stores video as a sequence of- you guessed it- uncompressed RGB images, one for each frame. RGB describes each frame by specifying for each pixel the amount of red,green,and blue it contains. This takes an incredible amount of space. For 24bpp D1 NTSC video (720x480 @ 29.97fps) RGB video takes up a whopping 29.63MB per-SECOND. One minute of video is nearly 2GB. Fortunately there are better ways of storing video, for those of you who don't yet have fast multi-terrabyte storage systems.

Component Video:
Also known as YCrCb, component video is uncompressed, but it uses YUV information to store the video instead of RGB. It is very good for high quality video work.

PNG:
Video composed of a series of PNG images. It is a very good codec for certain instances. PNG (Portable Network Graphics) is a very good image compression that is lossless (doesn't lose quality when compressed) and can store alpha information (transparency). Why would you want trsparency in video? Well, say you needed to overlay an object on a background. This is called compositing. You put your background video in one track in your editor, then you put your PNG video in another track. When you play the video, all of the alpha channel parts of the PNG sequence will be trasparent so that you can see the background video underneath.

MJPEG:
MJPEG stands for motion JPEG. A common codec in which each frame is compressed as a JPEG image. Quality can be varied just like a JPEG image file. There are two types of Motion JPEG, A and B. MJPEG gives fairly good compression with low CPU load.

LJPEG:
LJPEG is Lossless JPEG. The name is pretty much self-explanatory: JPEG video with settings to ensure that no quality is lost in the encoding.

ffv:
Ffmpeg's own lossless codec. It is used for capturing and ffmpeg internal streaming.

huffyuv:
Another lossless codec. It is usually used for high quality 4:2:2 studio video feeds. Also, some people use it for capturing analog video.

Nuppelvideo:
Nuppelvideo is sort of like JPEG video at up to 75% quality. Actually, it uses RTJPEG (Real-Time JPEG is a very fast type of JPEG compression, but at less quality than JPEG is capable of) and then compresses each frame individually with lzo compression (similar to zip). Also, instead of RTJPEG video, YUV can be put into a NUV container and the individual frames then zipped with lzo. This will use much more data space, but the video will be lossless, and be about 30-50% smaller than just plain YUV. This is very usefull for capturing from analog sources.

DVC:
Similar to MJPEG DVC "Digital Video Codec" is the standard for consumer and prosumer digital camcorders, although there are other digital formats used in some models, such as some consumer/prosumer HD cameras (MPEG-2). It is often referred to as just "DV" rather than DVC. There are a few different types of DVC, the most common being standard DV, which for NTSC is 720x480 pixels resolution at 29.97fps and 4:1:1 color sampling, and 720x576 pixels resolution at 25fps and 4:2:0 color sampling. The bitrate is 25Mbps, which makes the video take up about 3MB per second, plus audio. For more professional cameras, there are also the DVCPRO, DVCAM, DVCPRO50, and DVCPROHD (DV100) formats. The DVCPRO and DVCAM formats use the same DVC video codec, but better tape transport systems than regular DV cameras. Also DVCPRO gives an extrra low-bandwidth cue audio track. DVCPRO50 (or DV50) uses 2 DVC streams in parallel to give 4:2:2 color sampled video with a bitrate of 50Mbps. The video quality of DVCPRO50 is spectacular. DVCPROHD uses 4 DV streams in parallel to give 100Mbps 4:2:2 video at HD resolutions. DV video is similar in it's compression to JPEG, but better quality. The actual form of compression uses is called DCT. Any of the DV codecs are excellent for editing because each frame is compressed individually.

RealVideo:
Real Networks codecs used mainly for internet streaming. There are many different versions of RealVideo, the newer ones being MPEG-4 variants.

Indeo:
Codec developed by Intel. It is good for certain instances with particular types of video.

Sorenson Video:
Codec developed by Apple Corp. for streaming and other uses. Most Quicktime files you will find on the internet use Sorenson Video. It is a very good codec for many uses.

MPEG-1:
Video codec introduced in the early 1990s. Its compression works by only storing changes in the video as compared to the last frame, rather than storing each frame individually. Official resolutions for MPEG-1 video are 352x240 for NTSC and 352x288 for PAL, but many different resolutions can be used. It is used for many things including for video on VCDs and some DVDs.

MPEG-2:
An improvement on the MPEG-1 standard that allows higher quality video at larger resolutions with smaller file sizes than MPEG-1 can produce. Official resolutions are, for NTSC: 720x480, 704x480, 352x480, and 352x240; and for PAL: 720x576, 704x576, 352x576, and 320x288. It is used on SVCDs and DVDs, among other things.

MPEG-4:
Actually a modification of MPEG-1, MPEG-4 offers extremely good quality at lower bitrates than MPEG-2. ISO MPEG-4 is the standard implementation of the codec, but there are many different variants. Some of the different codecs based on MPEG-4 are: DivX, XviD, VP3, 3ivX, theora, Windows Media Video, and others. Also, there are several codecs that are almost MPEG-4, but not quite. These include MSMPEG-4 (versions 1, 2, and 3), DivX3, and others. Soon suport for MPEG-4 will probably be added to DVD players. There are a few models already, most of which are really embedded systems running Linux and MPlayer.
None of the MPEG codecs are particularly good for video editing (unless only I-frames are used), but they are excellent for playback.

h.264:
New codec that offers very good quality with small file sizes. It is also known as MPEG-4 part 10, and is expected to replace MPEG-4. Although it is a very good codec, with current compilers the encoding times are absolutely ridiculous. On my Athlon XP 2500+ system, I get about 10 frames per-MINUTE encoding speed. This is unacceptable (for me at least). But I'm sure that optimized encoders are already being developed that will make the times needed to encode h.264 video decrease to a reasonable length.


Audio Codecs

The folowing are some audio codecs that you will probably encounter while doing video encoding work.

PCM:
"Pulse Code Modulation" is standard uncompressed audio. It is found on CDs, some laserdiscs and DVDs, and many other mediums. On a computer, PCM audio is normally found in a WAV file.

AU:
The AU audio codec was developed by Sun Microsystems (I think). Like PCM, it is also uncompressed, but uses a different method of reproducing audio.

FLAC:
"Free Lossless Audio Codec" is a lossless compression form for audio usually used for archiving. When a FLAC file is decompressed back to PCM/WAV, it will be exactly the same, bit-for-bit, as the original WAV file that it was created from. The compression level is about 2.3 to 1.

AC-3:
Also known as "Dolby Digital", AC-3 is becoming the standard audio codec to accompany high quality video in the US. It is required on all standards-compliant US DVDs and is the audio codec chosen for ATSC digital TV. (ATSC = American Television Standard Committee. ATSC is the equivalent of NTSC for digital broadcast video.) AC-3 is rarely used alone without video.

DTS:
DTS is a very nice audio codec found on many DVDs. It is usually in a multichannel stream (6 channels or more) and produces very good quality audio, but needs high bitrates.

MPEG:
MPEG audio is by far the most familiar codec, partly due to the great success of MPEG-1 layer 3 audio (more commonly referred to as mp3). Like its video counterpart, it comes in several versions: MPEG-1 layer 2 and 3, MPEG-2 layer 2 and 3, and MPEG-2.5. The most useful for video is MPEG-1 layer 2.
MPEG audio offers great compression as compared to PCM, AU, and FLAC, but not as good as the newer audio codecs (AAC, WMA, Vorbis). In the area of compatibility, MPEG is the best because of its great popularity.

WMA:
Windows Media Audio is Microsoft's audio codec used with Windows Media Video and also for standalone audio. It offers the same quality audio as MP3, but at lower bitrates.

AAC:
"Advanced Audio Coding" is official MPEG-4 audio (but it is also sometimes used with MPEG-2). It is a great codec and is becoming very popular. The compression is excellent- better than MP3 or WMA.

Vorbis:
Usually found in OGG file formats, but can be put into other containers also. Vorbis audio is the best audio codec for most uses to date. It gives better compression than MPEG audio, WMA, and AAC. It is totally free and open-source, and is an excellent codec for nearly all uses.

RealAudio:
RealNetworks developed the RealAudio codec for internet streaming. There are many versions. This codec performs its job very well; listenable quality can be obtained with bitrates as low as 6.5 kbps or even less.


N1GG Homepage   Linux Information Pages   Linux Video  
Video Formats   Video Disc Formats   Linux Video Programs Comparison   Essential Linux Video Apps  
Linux DVD Production Guide   Encoding DVDs With Mencoder   Video Camera Guide  



N1GG Homepage   Linux Information Pages   Linux Video  
Photography   Silicon Graphics Computers   Music   Ham Radio  

Powered By Linux

Copyright ©2006 RT