Video file anatomy

The article A look into YouTube’s video file anatomy  by YouTube Engineering experts, provides a nice overview of what makes up a video file & how it has evolved -

A video file contains the video and audio data wrapped up in some container format and associated with metadata that describes the nature of the content in some way.

The video and audio data is typically compressed using a codec and of course the data itself comes in a variety of resolutions, frame rates, sample rates and channels (in the case of audio).

Without compression we would not be able to stream media over the internet..

There are three main components of media files today: the container, the compressed bitstream itself and finally metadata

The bitstream (called the video and audio “essence”) contains the actual audio and video media in a compressed form. It will also contain information about the size of the pictures and start and end of frames so that the codec knows how to decode the picture data in the right way. 

The “container” refers to the additional information that helps the decoder work out when a video frame is to be played, and when the audio data should be played relative to the frame. 

The container often also holds an index to the start of certain frames in the bitstream. This makes it easier for a player system to allow users to “seek” or “fast forward” through the contents. 

The container will also hold information about the file content itself like the author, and other kinds of “metadata” that could be useful for a rights holder or “menu” on a player for instance. 

So the bitstream contains the actual picture and audio, but the container lets the player know how that content should be played.

Standardization of containers and codecs was vital for the digital video industry to take off as it did in the late 1990s.

In 2011, MP4 (.mp4), Audio Video Interleave (.avi), Flash Video (.flv), Advanced Systems Format (.asf) and MPEG Transport Stream (.ts) were more equally distributed than they are now. But over the years MP4 has overtaken them all to become the most common ingest container format.

H.264 is the dominant video  codec while Advanced Audio (AAC) codec, PCM, WMA and MP3 are popular audio codecs

Educational material including slide shows have low frame rates of 15fps and lower

..most video capture today especially on mobile devices still defaults to 25 or 30fps.

Comments