Friday, February 20, 2009

Encoding Profile - the real meaning

Many codecs have 'profiles' - these are collections of allowed settings to encode for limited power devices like cellphones, MP3 players, and set-top boxes. For example, iPods with h.264 capability support the Baseline h.264 profile only.

Generally, higher level profiles require more memory and CPU power to decode, and produce better quality.

My general recommendation is to find the lowest common denominator of the devices you are compressing for and use that if they are similar in capability. If some of the devices are much less powerful than others, you might want to make 2 or 3 versions, one for the lower power devices, and another higher quality for the higher power devices. 


Saturday, February 14, 2009

Initial Buffer Fullness - the real meaning

When using a VBV buffer, this specifies how full the buffer should be at the start of the video file. 

This has an effect on the quality of the first section of the video, but shouldn't have any effect after one or two buffer lengths into the video.

Tuesday, February 10, 2009

VBV Buffer size - the real meaning

This sets how large (in seconds) to set the Video buffer. The compression will be done so that the average bitrate over the VBV buffer is the requested bitrate.

This method of handling variable bitrates for streaming is not necessarily optimal, since the maximum size of the VBV buffer is smaller than most hard-to-compress sections of video, and there is a playback delay proportional to the size of the VBV. This also leads to wasting space in easy-to-compress areas, as the video size will be increased to fill the buffer.

Sunday, February 8, 2009

Force Block Refresh Every x seconds - the real meaning

This makes sure that every part of the video is refreshed at least once during the interval.

This limits the amount of time before the video recovers from a dropped packet.

This is useful for live video or if there is packet loss, but can hurt quality slightly.

If this is set higher than the maximum keyframe interval, it will have no effect, as keyframes always refresh the entire frame.


Wednesday, February 4, 2009

Packet Size Limit - the real meaning

This is also known as Streaming Packet size

This is used to limit the size of each video packet to reduce fragmentation.

Larger packets have less overhead, but if the packet is larger than the network packet size, the packet will be fragmented - split into multiple pieces, then reassembled on the playing computer.


Fragmented packets will have little effect on playback unless one of the fragments is lost - and with broadband streaming, players may even be able to recover from lost packets.



Tuesday, February 3, 2009

Deinterlacing - The real meaning

This is a complex subject, and there are many aspects. I will try to explain the important parts as simply as I can.


Field order

This is whether the lower (even lines) or upper (odd lines) field comes first in the frame.

DV cameras are almost all Lower field first (there are some exceptions with PAL video), while most other codecs use Upper Field first.

If you get this wrong, the output video may look jerky


Deinterlace methods

Weave - this is also called None - keep both interlaced fields in the frame. The resulting video may have horizontal 'comb' artifacts.

Discard even field, discard odd field - use only 1/2 the height and resize. This loses some details and some motion from the original footage, but eliminates the comb artifacts.

Resize by duplicate - results in blocky edges.

Resize by linear interpolate - smooths blocky edges.

Resize Bicubic - restores some of the details with a better guess, but takes longer.

Resize Lanczos - does a better guess than Bicubic, but takes even longer.

Edge Detect - Same as discard and interpolate, but tries to detect edges to interpolate along.

Blend - average the 2 fields - this blurs the motion to some extent.

Smooth Blend - does a lowpass filter on the blend to smooth the image, losing fine details.

Bob - Double frame rate, resize each field to full height. This maintains all the motion from the original footage, but loses some details.

Motion Compensation - analyze motion in the movie and recreate progressive frames based on analysis of the objects - this is the best method, although it takes significantly longer.

Double frame rate - improves quality by maintaining all original information from the interlaced video.


Interlace Detection - also known as Deinterlace Type.

Deinterlace all - apply deinterlace to all frames, even those that aren't interlaced.

Deinterlace interlaced - The program will try to detect interlaced frames, and deinterlace only those frames that are interlaced.

Deinterlace moving - The program will try to isolate moving areas of frames, and deinterlace the moving areas of frames only.


Monday, February 2, 2009

Auto key frames - the real meaning

This is also called Auto key frame on scene change.


This allows the encoder to insert a key frame when the scene changes. You may have to set a threshold setting of how much change must exist before the encoder inserts a key frame.

Allowing this generally improves the quality of the video, and is highly recommended.


Sunday, February 1, 2009

Compression Speed vs. quality - the real meaning

This controls how much time the encoder puts into getting a better file.


The Specific tradeoffs of time and quality depend on the codec.

I recommend setting this close to the highest quality setting unless

you have to compress video in realtime or are under a tight deadline.