Video Toolbox Multi-pass Encoding

本文档收集Multi-pass Encoding相关资料,因实时编码要求,故不采用此编码。

结论:Multi-pass Encoding虽然在码率与量化中取得均衡,达到最佳编码效果,然而,编码耗时是single pass encoding的两倍,不适用实时编码场合。

1、Multi-pass Encoding

Multi-pass encoding is a video encoding technique where the first encoding pass analyzes the video and logs down information which is then used in the second and subsequent passes, to adjust the bitrate/quantizer to achieve the maximum quality.
Examples of codecs that use multi-pass encoding are DivX, XviD, H.264 and MPEG-2.

2、Bitrate

Bitrate is the amount of digital data for a specific period of time. It is a property for both digital audio and video. Bitrate can be constant (CBR, every second of video uses up the same amount of space) or variable (VBR, each frame will use a different bitrate based on how much information the frame holds, thus producing better quality encodings).
For example, if a video file is said to have a bitrate of 800 Kbps, it means that for each second of the video, 800 kilobits is being used (either constant or an average). You can then use this information to work out the final size of the video.

2.1、Digital Measurements:

  • Bit - the most basic digital unit, either a 0 or a 1.
  • Byte - 8 bits
  • Kilobyte (kB or KB) - 1000 or 1024 bytes
  • Megabyte (MB) - 1000 kB or 1024 KB
  • Gigabyte (GB) - 1000 MB or 1024 MB

3、Quantizer

Quantizer is a term used in video compression to denote the compression factor of an image. The higher the quantizer value, the more compression is applied to the image.

4、What is two pass encoding?

Two pass encoding, also known as multi-pass encoding, is a video encoding strategy used to retain the best quality during conversion.

In the first pass of two-pass encoding, the input data from the source clip is analyzed and stored in a log file. In the second pass, the collected data from the first pass is used to achieve the best encoding quality. In video encoding, two-pass encoding is usually controlled by the average bitrate setting or by the bitrate range setting (minimal and maximal allowed bitrate) or by the target video file size setting. The best way to understand why this is used is to think of a movie — when there are shots that are totally, absolutely black, like scene changes, normal 1-pass CBR encoding uses the exact same amount of data to that part as it uses for complex action scene. But by using VBR and multi-pass, encoder “knows” that this piece is OK with lower bitrate and that bitrate can be then used for more complex scenes, thus creating better quality for those scenes that require more bitrate.

Two-pass encoding is almost twice slower than one-pass coding. So if you are short of time select one-pass solution.

参考与推荐阅读:

  • Multi-pass Encoding
  • Bitrate
  • Quantizer
  • What is two pass encoding?
  • Variable bitrate

你可能感兴趣的:(Video Toolbox Multi-pass Encoding)