Saturday, October 4, 2014


A video file usually contains video track, audio tracks. Individual track can have meta data (video aspect ratio, audio language etc), and containers can also have metadata (video title, poster, episode numbers etc)

Video container formats define how to store things, not what kind of data is stored. There are lost of video container formats, some most popular formats are MPEG-4 (.mp4, m4v), Ogg (.ogv, Ogg Theora), WebM (.webm), Flash Video (.flv), Audio Video Interleave (.avi).

When we watch a video, video player (e.g. VLC) usually does several things at once:
  1. Interpret the container format to find out video and audio tracks, and how they are stored within the file for decoding process
  2. Decode the video stream and display a series of images (frames) on the screen
  3. Decode the audio stream and send the sound to speakers
Video codec (a combination of words coder and decoder) is an algorithm to encode video stream. Video player decodes the video stream according to video codec. There are lossy and lossless video codecs. There are many video codecs (like video containers), and most popular are H.264 (patent encumbered), Theora (royalty-free and not patent-encumbered), and VP8 (royalty-free not encumbered by any patents).

As to audio codecs, MP3 (patent encumbered), AAC (Advanced Audio Coding, patent-encumbered) and Vorbis (not patent encumbered) are most popular for Web audio.

Firefogg for encoding Ogg video, ffmpeg2theora for batch encoding Ogg videos
HandBrake for encoding H.264 video
ffmpeg for encoding WebM video
LAME project is the free encoder for MP3
FAAC library is the open source (mencoder and ffmpeg)
OggConvert, ffmpege, aoTuV and libvorbis (QuickTime component on Mac, DirectShow filter on Windows)

No comments:

Post a Comment