Formats and CodecsWhats the difference between a format and a codec?
You can think of formats as a wrappers binding audio and video together eg. .MOV, .AVI, .WMV However a codec is how the video is encoded, the language of the video. Full quality, unaltered video is known as RAW or Uncompressed and will produce large file sizes. This is then encoded into a codec that is more suitable for the task at hand. This then begs the question what are our needs? this will depend on what the video will be used for: |
|
- If it is going up on the web we are going to want it to have a small file size and be easy to download with a format that everyone will be able to read. To get small file sizes we will generally need to lower the quality.
- If we are going to edit the footage we will want to to keep the footage full raster so our non-linerar editing system can quickly process the footage as we work with it.
- What platform are we working with Mac, Windows, Linux, Mobile operating systems, etc?
- What software are we working with? some software have very strict criteria, where others accept multiple formats.
- What platform is our final product designed for DVD, BluRay, Type/size of screen etc
- If we want to maintain full quality throughout editing but be able edit in a fast and agile way we may have to work with proxy files. This means working with a small file version of the original and swapping in the uncompressed file when we have completed the edit and are ready for the final export/render.
Lossy v Full Raster
Lossy referes to a codec that compresses video so you loose detail and quality in sacrifice for smaller file sizes. This is something you need to weigh up file size v quality of footage this is often dictated by the means the video will be watched ie web, dvd, blue-ray etc
H.264 is an example of a lossy format. It does this by grouping images together and recording the differences in each pixel and removing all the other data (GOP - group of pictures). This has been adopted as a standard format to share video in a higher quality with relative lower files size. However due to the GOP being used it makes it a resource intensive format to edit with. This is because as you make edits it has to un-package the GOP make the edit and repackage the GOP requiring a lot of processing.
ProRes is a native format for editing in Final Cut and is full raster meaning it stores each frame individual and represents each pixel. This retains a lot of data and provides a optimised format with a detailed image to edit with. Although not uncompressed it is very hard to see any loss in quality.
Lossy referes to a codec that compresses video so you loose detail and quality in sacrifice for smaller file sizes. This is something you need to weigh up file size v quality of footage this is often dictated by the means the video will be watched ie web, dvd, blue-ray etc
H.264 is an example of a lossy format. It does this by grouping images together and recording the differences in each pixel and removing all the other data (GOP - group of pictures). This has been adopted as a standard format to share video in a higher quality with relative lower files size. However due to the GOP being used it makes it a resource intensive format to edit with. This is because as you make edits it has to un-package the GOP make the edit and repackage the GOP requiring a lot of processing.
ProRes is a native format for editing in Final Cut and is full raster meaning it stores each frame individual and represents each pixel. This retains a lot of data and provides a optimised format with a detailed image to edit with. Although not uncompressed it is very hard to see any loss in quality.
Colour Space
When looking at colour space, you use a ratio to expressing the colour subsampling. You may have heard these numbers: 4:4:4, or 4:2:2, or 4:1:1. Take a look at the bellow images representing a 4x4 matrix of pixels. Here black means luma or Y value, blue means blue difference or Cb value and red means red difference or Cr value.
4:4:4 every pixel has a Y, Cb and Cr value -> every 4 pixels has 4 Cb and 4 Cr = 4:4:4
4:2:2 does not not have a full set of data but -> every 4 pixels has 2 Cb and 2 Cr = 4:2:2
4:1:1 has even less data with only -> 1 Cb and 1 Cr in every 4 pixels = 4:1:1
The human eye does a much better job of distinguishing brightness ie luma than colour with moving image making the brightness more important than the colour. Which in hand means you can chop out a lot of colour data and your average viewer will not notice. Computer software can use the colour values from neighbouring pixels to make averages and fill in the missing colour values.
The better the colouring sample the larger the video file will be. The small the file the lower the quality or the hard the graphics card needs to work to guess intermediate values. You will notice the difference when completing task that involve colour like chromakeying and fine colour grading.
Read more at Adobe Blogs
When looking at colour space, you use a ratio to expressing the colour subsampling. You may have heard these numbers: 4:4:4, or 4:2:2, or 4:1:1. Take a look at the bellow images representing a 4x4 matrix of pixels. Here black means luma or Y value, blue means blue difference or Cb value and red means red difference or Cr value.
4:4:4 every pixel has a Y, Cb and Cr value -> every 4 pixels has 4 Cb and 4 Cr = 4:4:4
4:2:2 does not not have a full set of data but -> every 4 pixels has 2 Cb and 2 Cr = 4:2:2
4:1:1 has even less data with only -> 1 Cb and 1 Cr in every 4 pixels = 4:1:1
The human eye does a much better job of distinguishing brightness ie luma than colour with moving image making the brightness more important than the colour. Which in hand means you can chop out a lot of colour data and your average viewer will not notice. Computer software can use the colour values from neighbouring pixels to make averages and fill in the missing colour values.
The better the colouring sample the larger the video file will be. The small the file the lower the quality or the hard the graphics card needs to work to guess intermediate values. You will notice the difference when completing task that involve colour like chromakeying and fine colour grading.
Read more at Adobe Blogs
Resolution
The resolution refers to the screen/frame size in pixels here are some standard resolutions in video.
Click here to view more on resolutions explained by Vimeo. |
|
Interlaces v Progressive
You may have seen resolution with a postfix of 'i' or 'p' these stand for Interlaced or Progressive. i.e. 1080i or 1080p These are the two ways of scanning an moving image :
Interlaced scan refers to one of two common methods for "painting" a video image on an electronic display screen by scanning or displaying each line or row of pixels. This technique uses two fields to create a frame. One field contains all the odd lines in the image, the other contains all the even lines of the image. A PAL-based television set display, for example, scans 50 fields every second (25 odd and 25 even). The two sets of 25 fields work together to create a full frame. |
|
The term Progressive scanning, a newer technology is a way of displaying , storing or transmitting moving images. Like interlaced footage video signals are generated using horizontal lines. In the progressive scan all lines of each frame are drawn in sequence. Thus sending twice the data as compared to the interlaced scan.
PAL v NTSC
PAL (Phase Alternating Line)
PAL is an analogue television colour encoding system used in broadcast television systems in many countries and most of Europe.
NTSC (National Television Standards Committee)
NTSC is the analog television system that is used in most of North America, parts of South America (except Brazil, Argentina, Uruguay, and French Guiana), Myanmar, South Korea, Taiwan, Japan, the Philippines, and some Pacific island nations and territories.
PAL (Phase Alternating Line)
PAL is an analogue television colour encoding system used in broadcast television systems in many countries and most of Europe.
- 50 hz refresh rate
- 720x576
- 25fps
NTSC (National Television Standards Committee)
NTSC is the analog television system that is used in most of North America, parts of South America (except Brazil, Argentina, Uruguay, and French Guiana), Myanmar, South Korea, Taiwan, Japan, the Philippines, and some Pacific island nations and territories.
- 60 hz refresh rate
- 720x480
- 30fps
Bit rates
In computing, bit rate is the number of bits (peaces of data) that are conveyed or processed per unit of time. Within video this controls both the visual quality of the video and its resulting file size. In most video editors, this is measured of kilobits per second (kbps)
We can then set "Target bit rates" for controlling the quality and file size for example here is a link to Vimeo's compression guide lines and it recommends 2000kbps for SD footage and 5000kbps for 720 HD and 10000kbps for 1080 HD.
You can work out a bit rate for uncompressed video by calculating the size of the frame how many frames there are per second giving you how much data per second is needed.
Formula - http://en.wikipedia.org/wiki/Uncompressed_video
Uncompressed data rate = colour depths * vertical resolution * horizontal resolution * refresh frequency
Bit rate Calculator This website can be used to calculate uncompressed bit rates giving you a gage on expected file sizes.
In computing, bit rate is the number of bits (peaces of data) that are conveyed or processed per unit of time. Within video this controls both the visual quality of the video and its resulting file size. In most video editors, this is measured of kilobits per second (kbps)
We can then set "Target bit rates" for controlling the quality and file size for example here is a link to Vimeo's compression guide lines and it recommends 2000kbps for SD footage and 5000kbps for 720 HD and 10000kbps for 1080 HD.
You can work out a bit rate for uncompressed video by calculating the size of the frame how many frames there are per second giving you how much data per second is needed.
Formula - http://en.wikipedia.org/wiki/Uncompressed_video
Uncompressed data rate = colour depths * vertical resolution * horizontal resolution * refresh frequency
- 24bit @ 1080i @ 30fps :24*1920*1080*30=1.39Gbps.
- 24bit @ 1080p @ 60fps :24*1920*1080*60=2.78Gbps.
Bit rate Calculator This website can be used to calculate uncompressed bit rates giving you a gage on expected file sizes.