Skip to content

Instantly share code, notes, and snippets.

@ahyield
Last active October 18, 2015 04:27
Show Gist options
  • Select an option

  • Save ahyield/e7ecbdf257952e95dcce to your computer and use it in GitHub Desktop.

Select an option

Save ahyield/e7ecbdf257952e95dcce to your computer and use it in GitHub Desktop.
Enlightenment with أحماه.
Have you ever wondered, what is a movie file ?
Movie files have a few basic components.
First, the file itself is called a container, and the type of container determines where the information
in the file goes. Examples of containers are AVI and Quicktime. Next, you have a bunch of streams; for example,
you usually have an audio stream and a video stream.
(A "stream" is just a fancy word for "a succession of data elements made available over time".)
The data elements in a stream are called frames. Each stream is encoded by a different kind of codec.
The codec defines how the actual data is COded and DECoded - hence the name CODEC. Examples of codecs are DivX and MP3.
Packets are then read from the stream. Packets are pieces of data that can contain bits of data
that are decoded into raw frames that we can finally manipulate for our application.
For our purposes, each packet contains complete frames, or multiple frames in the case of audio.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment