FFMPEG An Intermediate Guide/General

From Wikibooks, open books for an open world
Jump to: navigation, search

This section covers general video information and references.

Variable vs. Constant Bit Rate[edit]

To understand the difference between constant and variable bit rate one needs to understand how video is compressed. Video is tracks small chunks of video over as they move across the screen, till it changes enough to need to store another image. Take a persons eyes in an interview, unless they closed or the lighting changes significantly, they stay repetitively constant. You can see this in overly compressed video were some areas become flat squares of blended colour.

Constant bitrate works by taking a the bitrate, normally x number of kilobytes per second and spreading it fairly evenly over all the frames of video. This is normally quicker to encode this gives your video a very predictable size. Unfortunately it tends to use more disk space to store and fast motion or scene changes tend to cause break up or drop in quality.

Variable Bitrate as it use an average amount of bits per second but looks at the footage and adjust the amount depending on how much the footage changes in the frame, so a scene change or sudden motion will use a higher bitrate. While an average scene will use a lower bitrate. This can be set in advance as your low bitrate, high bitrate and average bite rate. This normally takes longer to encode and works best with two pass encoding but results in smaller files and smoother quality of video.

Two-pass encoding is used with variable bitrate to help the encoder know what's coming and improve the use of variable bitrate. The first time it encodes the video it place markers that help it know what's coming, this means that the second time it runs through it is much more efficient in spreading the bitrate to were it is most needed. There are tricks to speed up this process.

See also: Wikipedia article on variable bitrate