Tuesday, February 23, 2010

Compression software types

Compression software falls into roughly 4 groups based on the intended users.

Type 1 - This is the 'we do it all for you' software. This type usually costs between $20 and $100. With this type of software, all you usually set is bitrate, output size, path and filename. This type of software is sold (often for a very low price) to people who don't want to know anything about compression. There is little incentive for the authors to optimize quality, so quality generally suffers. This type of software generally uses cheaper, lower quality codecs. Since there are so few options, this type of software is generally very easy to use.

Type 2 - This type is a step up from Type 1. This type usually costs between $50 and $200. This type gives you some settings like 2 pass encoding, CBR/VBR encoding, and so forth, but doesn't give you a lot of settings. This type of software is aimed at people who have to deliver compressed output, but who don't compress as a primary task (video editors, producers, and so forth), but who care somewhat about quality and file size. The quality of this type of software is generally better than Type 1, but cannot be tweaked very much. Any presets provided are generally fairly good. This type of software generally uses moderately priced, good quality codecs. Ease of use is still an important selling point, so this type is generally fairly easy to use. Adobe Media Encoder and Compressor fall into this type.

Type 3 - This type is the software generally used by compression experts. This type usually costs between $200 and $1,000. This type gives you a lot of settings for every type of compression, comes with a lot of pretty good presets, and includes functions for related tasks like deinterlacing, reverse telecine, noise reduction, batch processing, etc. Since output quality is the primary selling point of this type of software, you can get very high quality. This type of software generally uses higher priced, very good quality codecs, and may offer a choice of codecs for the same output format. On the flip side, since there are so many options, and since ease of use is at best secondary, this type of software is generally hard to use, although there are exceptions. Telestream Episode and Sorenson Squeeze are this type.

Type 4 - This is the 'we give you enough rope to hang yourself' type. This type usually costs more than $1,000. This type is usually aimed towards high-volume production companies that need a render farm to output massive quantities of compressed video. You can change any imaginable setting of each supported type of compression, and there are features to support many types of workflow. Since you can adjust all parameters, you can get excellent results if (and only if) you know what to set. This type of software generally offers the best codecs. This type of software is generally designed to be set up by someone who knows a lot about compression, and generally is very hard to use outside of using already set up workflows. Some examples of this type are Rhozet Carbon Coder, Inlet Fathom, and Telestream Flip Factory.

Note that these are general categories, and not meant to be exclusive. Some software may fall between categories, or may fit into more than one category.

Of special note is ffmpeg and x264, which fall into type 4 in options, quality and difficulty to use, but is available for free. There are front ends for ffmpeg, which generally fall into types 1 or 2.

Saturday, January 23, 2010

Compressing for streaming - Moderate speed broadband

Video compressed for moderate speed broadband (600 kbps) can look surprisingly good.
You can use 400kbps for video and 64-96kbps for audio. This permits 480x360 or 640x480 video that looks pretty good. Music sounds good.
Pauses and other streaming issues will be rare unless the line is shared among multiple users.

For download video, I recommend 700kbps for video and 96-160kbps for stereo audio. This will allow 640x480 looking excellent or 1280x720 looking OK. Music will sound very good to excellent.

Friday, January 22, 2010

Compressing for streaming - Slow broadband

Compressing for slow broadband (150 kbps or so) is much easier than compressing for dialup.
You can expect to get halfway decent video and acceptable audio.
Pauses and other streaming problems will be less common than on dialup.
I would recommend 100kbps for video and 22kbps for audio.
this will give you 320x240 video and decent mono audio.


For download video, I recommend 250 kbps for video and 56kbps for audio.
This permits 400x300 video and very good mono audio or decent stereo.
If the audio is speech recorded in stereo, I would recommend stereo. If the audio is primarily music, I would recommend mono audio.

Tuesday, January 19, 2010

compression for streaming - dialup users

Trying to compress video for dialup users is almost impossible. Whatever you do, the quality will be poor. You might even want to avoid trying and just target people with broadband.
You have almost no bandwidth to use (50 kbps max, and usually less than 40)
In order to provide even barely acceptable video, you have to encode for the best connections, and assume that the connection will stay above 40 kbps.
At 40 kbps, you only have 32 kbps for video and 8 kbps for audio.
In regards to video, this will allow you only 200x150 resolution or lower, and quality will be poor even at that small postage-stamp-like size.
In regards to audio, you will have to use mono audio, and speech will sound acceptable, but music will suffer.
With streaming video or progressive download, expect users to suffer from pauses and other streaming problems.

For download video, you can encode to a higher rate, as the video will not be watched until the download finishes.
I would recommend 100 kbps for video and 22 kbps for audio. This allows 320x240 resolution video and higher quality mono audio - speech will sound good, and music acceptable.

Friday, July 3, 2009

Quality Control for Web Video

Web video need to balance quality and size - you can't afford the bandwidth to make your video look perfect, so you have to accept some loss in quality. On the other hand, you don't want the loss in quality to be distracting to the viewers of the video.
When checking quality, you have to look closely at the video, and that can lead to your paying attention to artifacts that won't be noticed by the people watching your video, and possibly missing other artifacts that don't look as bad to you, but which are distracting when actually watching the video.

My method for identifying problems and knowing when I have fixed them is this:
First, I watch the compressed video straight through without pausing. I remember what distracts my attention from the video, and take notes.
I use these notes when working on fixing problems. I concentrate on those areas that distracted me the most. Although I might try to improve other artifacts that I see when working on problems, I make sure these artifacts are visible when playing at full speed.
When I think I have fixed the problems, I watch the fixed video again without pausing, trying to watch the way the expected audience would. If I don't see any problems watching like this, then the video quality should be acceptable.

Tuesday, May 12, 2009

VP6 Maximum Quantizer - the real meaning

This setting is sometimes called Minimum Quality.

This limits the amount of difference from the original frame that is allowed. The lower the Max Quantizer (or the higher the Minimum Quality) setting, the closer the compressed frame will be to the original. This will often increase the percieved quality of the video by preventing keyframes from being encoded poorly (which would lead to the video quality dropping for a long period of time).

This setting will override other settings in the VP6 codec, and can cause the video size to increase substantially, potentially causing the bitrate to go significantly above the target bitrate. To help keep the bitrate from going too high for good streaming, you should lower the target bitrate and increase the variability of VBR encoding when increasing this parameter - doing this will allow the codec to save bandwidth in other areas of the video so the keyframe looks good and the average bitrate stays reasonable.

When encoding HD video with this setting set for higher quality, you will sometimes get timeouts on the encode leading to every frame being encoded as a keyframe. To avoid this, encode on a fast machine and avoid any bottlenecks during encoding and encode (sample bottlenecks are USB hard drives and running other programs that use the CPU or hard drive.)


Technical terms - this setting actually controls the maxumum # of the Discrete Cosine Transform coefficients that can be dropped, and has a range from 0 (keep all coefficients) to 64 (allow the codec to discard all coefficients).
When this setting is called Minimum Quality, the meaning is inverted and the range is 0 (equivalent to 64) to 100 (equivalent to 0)

Friday, March 20, 2009

CBR and VBR - the real meaning

CBR stands for Constant Bit rate. What this actually means is that the bitrate doesn't vary much over time. Very few codecs can guarantee exact constant bitrates, so there is almost always some variation.

VBR stands for Variable Bit rate. This means that the bitrate is allowed to vary to a larger amount to maintain better quality over the entire clip.


CBR is useful when streaming video over a severely bandwidth-constrained channels that can maintain fixed speeds, like dialup internet, ISDN, Broadcast television, or Cable or Satellite TV Channels.

VBR is useful when providing video over connections that work better with overall lower speed and occasional spikes of high speed, like broadband internet.


CBR tends to waste space on easy-to-compress sections of video and lose quality on hard-to-compress sections.

VBR tends to produce better quality at any given average data rate.


I generally recommend VBR unless CBR is required for technical reasons.