Are you thinking about becoming a professional media server operator or user, but aren't sure which skills you need? In the fourth instalment of this guide, we continue to explore content for media playback with a look at still-image formats. From compressed/lossy image formats to uncompressed/lossless formats to the age-old question, when do you need uncompressed?
As always, the content is based on recommendations from the fine people of the Media Server Professionals (Facebook) group.
-
- Image/photo/still formats
- JPEG
- GIF
- PNG
- TARGA
- TIFF
- BMP
- PSD
- Uncompressed video playback & RAW
- How do media servers handle image sequences?
- What are the disk storage requirements for uncompressed material?
- Conclusion
Image/Photo/Still Formats
Before video, there was the still image… And just like video, there is a wide range of formats with different capabilities that media servers (should) support. The most common image formats are JPEG, GIF, PNG, TARGA (TGA), TIFF, BMP and PSD.
Some of these formats are compressed, some are not and some even have lossless compression. Compressed files will be significantly smaller than their uncompressed counterparts, and the compressed files will either have a lossy or lossless type of compression. Lossless compression will keep all the image information while being a tad smaller. When we talk about lossy compression, these file sizes can be significantly smaller, but this is achieved through discarding data from the image, resulting in visible difference in image quality (noise/artefacts).
There is a big chance that you will never settle on a single image format as they have different benefits compared to each other – it all depends on the task at hand. But knowing the difference is nice.
JPEG (JOINT PHOTOGRAPHIC EXPERTS GROUP)
The most-used image format today is by far JPEG – in an article from 2015, several billion pictures are produced every day according to the Joint Photographic Experts Group. This group developed the image format standard and introduced it in 1992. After its introduction it has become widely adopted and is used in almost every digital camera that has been made – also mobile phones. Hence the insane volume of images created daily.
JPEG is a lossy file format and the degree of compression can be adjusted. The JPEG compression is used in many image file formats, where JPEG/Exif is the format most cameras and phones use. JPEG/JFIF is the most common format used on the Internet. However, most people do not care/know about these differences and are all referred to as JPEG. JPEG supports 8 bits per channel (24 bits total) and there is probably no image application or media server that does not support JPEG.
Due to its compression algorithm, and lack of support for transparency channels, JPEG is not your ideal choice for line-art, etc.
In this example photo from Wiki, the contributor AzaToth has illustrated JPEG compression in a single photo. From max (left) to minimum (right).
PNG (pORTABLE NETWORK GRAPHICS)
Another very popular image format is the Portable Network Graphics or PNG. This format supports lossless data and was initially developed as a (highly) improved replacement for Graphics Interchange Format (GIF) that had challenges with patents and copyrights at the time.
The first version of the PNG file format was created in 1996 and became an ISO standard in 2004. PNG supports both 24 and 48-bit color depth, as well as compression and alpha-channel transparency, making it a very popular and versatile image format. If you are unsure of what 24/48 bit encompasses, have a look at my previous blog post where we did a deep dive into bit depths.
If we compare PNG with JPEG, the JPEG file will be smaller because of its lossy encoding, but with more artefacts and “noise” in the image – as you can see from the example.
GIF (Graphics Interchange Format)
GIF was developed by CompuServe in 1987 (CompuServe was one of the first providers of broadband services in the US) and quickly became a popular image format for Internet use because of its wide support in browsers, applications and operating systems.
GIF images use a lossless compression algorithm Lempel–Ziv–Welch (LZW)) that was patented in 1985 by Unisys. When a controversy about the license agreement between the parties escalated, PNG development started. In 2004 all patents expired, but GIF never really reclaimed its throne as the lossless image format for the web.
The image format supports up to 8 bits per pixel and has a very limited color-palette compared to any other format (a maximum of 256 per image). However, this can be extended to have 256 different colors per frame if you animate the GIF, but the GIF format is generally not suitable for photographs and images with gradients. It is, however, a great option for illustrations and images with simple animations and few colors.
TIFF (Tagged Image File Format)
TIFF has been preferred in the printing and publishing industries, as well as high-end photography, because of the image quality. TIFF files can be fully uncompressed or compressed using lossless compression.
TIFF was created by Aldus Corporation and it was initially specially developed for desktop publishing and print. The first version was launched in 1986, and the latest version is 6.0 which was released in 1992. Adobe acquired Aldus in 1994.
TIFF is a highly flexible format for handling images and data inside a single file. A TIFF file can be a container, holding a lossy JPEG image, vector-based clipping paths (outlines, crops) or a fully uncompressed image. The compression method is LZW and was also limited by the patents held until expiry in 2004.
TIFF files are excellent for storing files that you will later edit or modify since the file format does not introduce compression artifacts. TIFF files are a great option to the fully RAW files that some cameras support – this will be covered later in the article.
TGA (Truevision TGA or TARGA)
TGA is a graphics file format created by Truevision, Inc., and was initially the native format for TARGA and VISTA graphics cards for IBM-compatible PCs. TGA supports 24-bit depth, which is the same amount of color that you will find in JPEG, but it also supports transparency through an alpha-channel.
The image data can be stored uncompressed or with a lossless compression (RLE). Compared to JPEG, the file size of a TGA file will be larger because of the lossless compression.
With the limited bit-depths compared to TIFF, TGA file format has traditionally not been used for printed material but has been strong in the animation and video business – and still is.
BMP (Bitmap image file)
The BMP file format is an image format that was developed by Microsoft and was released with the first version of Microsoft Windows. The first version was very basic, and more functionality has been added since the introduction, as with all other image formats.
Today, BMP files are either uncompressed or compressed (lossless) through RLE encoding, the same method as TGA files. BMP supports 24 bits color and transparency through alpha channel (since Windows 95).
While many applications can read and save files in BMP format, the format has never gained widespread popularity compared to the other file formats.
PSD (Photoshop Document)
PSD is the native file format for Adobe Photoshop. The PSD file will store an image with all info about the options you have in Photoshop, such as layers, masks, text, clipping paths, etc. The PSD files are compressed lossless and support up to 32 bits per channel. This high bit-depth is known as High Dynamic Range (HDR).
As PSD is a native Adobe format, it has not gained widespread support in many applications or media servers.
Uncompressed Video Playback & RAW format
For most installations and live events, there is not a NEED to use uncompressed. But in some cases, it is a requirement. And then you need to understand what it is and how to do it.
As seen above, video compression in general is a challenge (numerous formats and settings) and it reduces image quality and introduces unwanted artifacts. Uncompressed is for the connoisseur and the high-end use cases. You can read more about uncompressed video in another article.
Uncompressed video should not be understood as RAW video coming directly from video cameras. RAW video can be uncompressed, but uncompressed video is not RAW. A mite confused? Let me help.
When you film something in a camera, light will hit the sensor and the sensor turns the light into a set of data. There is no video or image created yet, only lots of data created by the sensor. To help this turn into a video or photo, these data need to be processed and this is done by the camera’s image processor. Here you add features like ISO and all other image effects (vivid, color balance, etc). Now you have two sets of data.
One set is RAW (untouched) and one encoded (into a format).
Camera manufacturers such as RED, BlackMagic and Sony have RAW options, but they are not truly uncompressed. RED camera’s RAW is REDCODE and actually applies some compression; down to 3:1 which they claim is mathematically lossless or 5:1 or 8:1 which are visually lossless.
According to an article in HDvideoPro, they claim that ALEXA camera by ARRI outputs true uncompressed RAW data using their ARRIRAW format. You can read more about AIRRAW here.
How do media servers handle IMAGE SEQUENCES?
Media servers support playback of image sequences, where the individual images has not been exposed to any algorithm of compression. Each image will quite naturally become rather big and the need for large disk space is immense. Additionally, playing back video streams with uncompressed images requires the disk(s) in the media server to be able to shuffle a lot of data simultaneously. This is only achieved by building a RAID disk system (data is placed on many disks) or having a single, super-fast, disk – such as HGST SN260 Ultrastar disks which can read up to 6GB/s from ONE drive.
What are the disk storage requirements for uncompressed Material?
In the previous blog post we looked at some calculation examples of data requirements for different kinds of encoding types and frame rates. Just for the fun of it, let’s do the same with uncompressed material.
1080p resolution (1920x1080) and 10-minute videos:
TIFF 8-bit RGBA Uncompressed @ 30 frames per second – 139.05 GB data
TIFF 8-bit RGBA Uncompressed @ 50 frames per second – 231.74 GB data
TIFF 8-bit RGBA Uncompressed @ 60 frames per second – 278.09 GB data
TIFF 10-bit RGBA Uncompressed @ 30 frames per second – 173.81 GB data
TIFF 10-bit RGBA Uncompressed @ 50 frames per second – 289.68 GB data
TIFF 10-bit RGBA Uncompressed @ 60 frames per second – 347.61 GB data
If we then compare 1920 x 1080 @60 fps uncompressed (8-bit) with H.264 (most compression) and ProRes 4444 (least compression), we get the following:
The uncompressed file (278,09GB) is a staggering 575% larger than the ProRes file (48.39 GB) and an insane 1922% larger than the H.264 file.
Besides the requirements of disk storage and read-speed, another aspect of working with uncompressed is the content creation part (where you want to export your large resolution setup in uncompressed format). This takes time.
Since last minute change is a valid point, make sure that your media server is capable of doing this properly. This is NOT only true for uncompressed.
As you see, there are some major requirements for a system to play back uncompressed files. In addition to adding costs on the media server side, it will generally also increase cost on the production side. It’s a hefty amount of data to process and will require some pretty heavy rendering machines.
Conclusion (so far, again)
Whoa! There’s a lot to learn at every turn, that’s for sure. But reading about things will only get you so far. What you need to do is to get out there. Be pushy and make sure you get your bag of experience as packed as possible.
In my next blog post I will cover 3D files and provide an entry level glimpse at projection mapping using both 2D and 3D techniques.
Before wrapping up I want to thank the following people who contributed with great ideas in the forum post:
Patrick Campbell, Ian McClain, Ola Fredenlund, Matt Ardine, Marek Papke, Eric Gazzillo, Axel Sundbotten, Joe Bleasdale, Parker Langvardt, Alex Mysterio Mueller, Christopher John Bolton, Andy Bates, David Gillett, Charlie Cooper, Tom Bass, Fred Lang, Nhoj Yelnif, Hugh Davies-Webb, Marcus Bayer, Arran Vj-Air, Manny Conde , Joel Adria, Alex Oliszewski, Ruben Laine, Jan Huewel, Majid Younis, Ernst Ziller, Marco Pastuovic, Geoffrey Platt, Ted Pallas, Dale Rehbein, Michael Kohler, Joe Dunkley, John Bulver, Jack Banks, Stuart McGowan, Todd Neville Scrutchfield