SumitBirla.com

Home » Writings » Describing Video

Describing Video

Video on the Internet is everywhere. From advertisements to YouTube and downloadable High Definition movies. For anyone who has ever tried to understand anything about the formats of video on the Internet, there is confusion galore. People speak of "performance" and picture quality in very vague terms. The more you try to understand and make comparisons of formats, the higher the stress levels and corresponding loss of hair.

Here I try to spell out the various attributes of digital video in simple terms. This should serve as a building block from which you can start your more advanced learning activities. Hope you are not too stressed at the end of this short artice.

Video consists of a series of pictures played back at a certain rate. This creates the illusion on a motion picture. The video can be accompanied with audio, but here we just focus on the video part. The following attribtued are necessary to completely describe video -

Dimensions

The number of pixels or dots on screen horizontally and vertically. So a size of 1280x720 has 1280 pixels across and 720 lines of these in each of the series of pictures. Each such picture is called a Frame. High definition video is generally 1280x720 or 1920x1080.

Framerate

The number of frames which are played back each second. Movies are typically 24fps where as television is broadcast at 30fps.

Interlaced/Progressive

Interlaced video is a left-over from CRT days when alternate lines of pixels used to be transmitted in each frame. So in essence, each frame of 1280x720 video would only contain 360 lines of pixels. Two frames would be necessary to draw an entire picture. This was done to save bandwidth. Interlaced video generally looks awful on high resolution computer monitors.

Bandwidth

This is the amount of data that can be pushed per second. Think of it as a measure how fat the network pipe is. Lets assume that a single pixel of information requires 3 bytes - one byte of red, one for blue and one for green. Using this assumption, let's calculate the amount of data required to display one second of video -

Our video is 1280x720, 30fps, progressive
data_rate = 1280 x 720 x 3 x 30 = 82,944,000 bytes/sec or 82MB/sec ~ 820Mbps.

As you can see, high definition video requires massive amount of bandwidth. In our test case above, it would require 820Mbps guaranteed bandwidth to play the video without interrupts. For reference, typical home networking using fast Ethernet can go only upto 100Mbps and in practice, one cannot reach that throughput. Generally, only much lower bandwidths are achievable. Plus, allocation is shared with your other regular network traffic. Typical "broadband" Internet connection are around 10Mbps - virtually impossible to send raw high definition video over it.

Encoding

In order to address the above problem, data compression is generally employed to reduce the amount of bandwidth necessary to deliver video over network or even in broadcast medium. The exact algorithm used for compression is called the video encoding. DVD's use an encoding called MPEG-2 where as the newer High Definition versions of it can use one of many encodings - MPEG-2, H.264/AVC and VC-1. Of these, H.264 appears to be gaining popularity on the Internet. It has high CPU requirements, however, to decode the video in realtime. But the bandwidth savings are amazing. Our test video above can be delivered at very high quality using only 5Mbps to 10Mbps bandwidth. This makes it feasible to play video over the Internet.

Bitrate

This is the average number of bits used per second of video. A 820Mbps bitrate can be reduced to 6000kbps (0.6MB/sec) after encoding it to MPEG-4. This implies that a minute of video would use up 0.6MB x 60 = 36MB of disk space. Generally, higher the bitrate for a given codec, the better the image quality. It is pointless to compare bitrate vs. image quality of videos which use different encodings. For example, the bitrate of an MPEG-2 encoded video has no correlation with the bitrate of an MPEG-4 video.

Container

When you see a file extension such as .avi, .mov or .wmv, it refers to the container format of the video and not the encoding. There is a common misconception that this is the "video format." AVI simply refers to the format of the container holding audio, video and subtitles streams. To confuse things, there are mpeg containers and also mpeg encoding. We just have to live with this for now. A new container format becoming heavily used in Matroska (.mkv) which is said to be very versatile, giving you the ability to embed audio/video streams, fonts and even chapter information in a single stream.

To reinforce our undestanding - video encoded in H.264/AVC can appear in files in extensions .avi, .mkv or others. If you are using Ubuntu, you can right-mouse-click on a video file and find the actual encoding.

Armed with the above vocabulary, you should now be in a position to ignore blog postings such as "dude, H.264 totally rocks on my 720p because it is only 5MB file" or "AVI format is so much better than MOV." If people do want to be psuedo-scientific, atleast pressure them into posting complete specs of video such as 1920x1080p,24fps,H.264,Matroska or similar. Picture quality will always be subjective and open to debate.

Good luck.