Tuesday, 12 February 2013

4K codecs - the good, the big and the ugly. Part 2

The first part of this blog looked at the file sizes of a 1 second 4K video clip using various QuickTime codecs. This part looks at the image quality of the codecs that use an efficient lossy compression system. Some codecs can compress an image and uncompress it without any loss of information (lossless compression), but these produce extremely large file sizes and I have left them out of this test as they should, in theory, show no difference to the original.   

The codecs compared here are GoPro's Cineform, Avid's DNxHD, MJPEG A, MJPEG B, MPEG 4 and Photo JPEG. Here is the table of file sizes for the various versions I made:


File sizes of 4K 1 second clip
Here is the link to the 1 second clip at HD 1920x1080 size in the MPEG 4 codec at 90%.

I made 2 JPEG (100%) stills of the first frame of the clip. One is the full size 4K image and the other is a 640x360 pixel crop with the image zoomed up to 200%. The cropped image is the top of the tower with the crane by the side. All the images are shown below, but I also made a stack of the crops in Photoshop and sliced out the layers for a comparison. 


Quality of various codecs 90% quality. 200% zoom and cropped
I haven't included MJPEGB here because it is no different from MJPEGA, but both MJPEGs show a large variation in the original colour, lifting the gamma significantly. All the other codecs were consistent and matched the uncompressed version.


The original purpose of this test was to see if the Avid DNxHD codec was suitable for 4K use but when I saw how poor the quality was I looked at all the other codecs to see what was wrong. You can see from the sliced picture how blurred the image of the crane has become, but the MPEG4 version is as sharp as the Photo JPEG image below. I was surprised when I looked at the file size how much DNxHD was compressing the image because I hadn't seen such degradation when editing high definition material and the file size is larger than MPEG4. I rendered out this clip in 1920x1080 with the codecs again set to 90% quality. The DNxHD clip was 44 MB in size and the MPEG4 was only 14 MB in size.



To be precise the HD version of the DNxHD codec was 44,808 KB in size which is exactly the size of the 4K version, which gave the solution. The DNxHD codec is only designed for the 1920x1080 video space and when the image dimension goes beyond that the pixels are duplicated (or more) to fill in the gaps, hence why it is blurred and the file size doesn't increase.

I think this is a mistake and Avid should limit the dimension the codec can produce, like H.264 does. Or it should ignore file size and produce a similar quality of image that the other codecs show here. I assume Avid will come up with a native 4K codec very soon which can be used in the next generation of cameras such as the Blackmagic Design Cinema Camera and their edit tools.

Meanwhile the best solution for moving 4K videos around the web appears to be MPEG 4 because it scales well, reproduces the original colour and is the smallest of all the options. However I hope that the GoPro Cineform codec becomes more widely used (and free) as it is robust and platform agnostic. And of course we wait for the launch of H.265 which is likely to be the choice of the broadcast world.

For videographers producing 4K clips the only solution is to use a lossless codec 

Here are the JPEG images of all the test clips. Please download them to compare.


Cineform 90%
Cineform 90% crop with 200% zoom
Avid DNxHD 90%


Avid DNxHD 90% crop with 200% zoom
MPEG A 90%
MPEG A 90% crop with 200% zoom
MPEG 4 90%
MPEG 4 90% crop with 200% zoom
Photo JPEG 90%
Photo JPEG 90% crop with 200% zoom

No comments:

Post a Comment