Two-pass encoding

from Wikipedia, the free encyclopedia

Two-pass encoding is a compression method that encodes an audio or video file in two passes. In the first run, an analysis takes place in order to usethe specified storage capacity optimallyin the second run when using a variable data rate (VBR).

motivation

Compression methods in which the multimedia material is compressed within a single pass ( one-pass encoding , live streaming ) has the disadvantage that the distribution of complexity in the material over time is not known. H. the compression rates to be achieved are unknown. There are two methods the encoder can handle, both with one significant disadvantage.

In the first variant, a quality is specified that the encoder fulfills, regardless of the compression rate achieved. This process is also known as variable bit rate encoding (VBR). This has the disadvantage that the total amount of data achieved can be arbitrary, that is to say a storage medium of a fixed size, such as a data CD, is not fully used or is not sufficient at all.

Therefore, in the second procedure, the encoder is given a fixed amount of data per time segment (second or frame). B. 680 MB as CD volume can be achieved. This procedure is also known as constant bit rate encoding (CBR). The disadvantage of this approach is that the quality achieved does not remain constant. With CBR, this results from the fact that z. For example, in the case of video material, simple video scenes (dark or with little movement) are given too much space and complex video scenes (quick changes) too little space - unlike what is necessary for consistent quality.

Procedure

The two-pass procedure combines the advantages of the two single-pass procedures. The amount of data per time segment is not determined in advance, but decided after analyzing the entire material. The encoder determines in a first compression run, the optimal data rate for each time slot and stores this information from temporary. The compression result (e.g. the compressed video) itself is not saved.

In the second run, the encoder uses this information in order to achieve constant quality with a given target amount of data.

This method can be expanded as an iterative procedure with more than two runs (multi-pass), with which an even better homogenization of the quality over time or a more precise target data volume can be achieved.

Advantages:

  • The best possible average quality is achieved through the optimal use of the available storage space (such as a CD-ROM ).

Disadvantage:

  • About twice the processing time is required as with one-pass encoding .
  • This procedure cannot be used with audio / video data broadcast live , as the important second pass can only be carried out when all data is available (i.e. at the end of the broadcast).

history

In the video sector , Nandub was one of the first video compression programs to master this technology, known there as Smart Bitrate Control (SBC).

literature

  • Florian Plag, Roland Riempp: Interactive video on the Internet with Flash: conception and production . Springer Verlag, Berlin / Heidelberg 2007, ISBN 978-3-540-37894-5 .
  • Lisa Larson, Renee Costantini: Flash Video for Professionals . John Wiley & Sons, Indianapolis 2007, ISBN 978-0-470-13113-8 .
  • Ian David Aronson: DV Filmmaking. From start to finish. 1st edition. O'Reilly Media, Sebastopol 2006, ISBN 0-596-00848-1 .
  • Chris Seibold: Big Book of Apple Hacks. 1st edition. O'Reilly Media, Sebastopol 2008, ISBN 978-0-596-52982-6 .
  • Tobias Künkel: Streaming Media. Technologies - Standards - Applications. John Wiley & Sons, Indianapolis 2007, ISBN 978-0-470-84724-4 .