home *** CD-ROM | disk | FTP | other *** search
/ Computer Shopper 275 / DPCS0111DVD.ISO / Toolkit / Audio-Visual / VirtualDub / Source / VirtualDub-1.9.10-src.7z / src / helpfile / source / avi.lina < prev    next >
Encoding:
Text File  |  2009-09-14  |  3.8 KB  |  62 lines

  1. <lina:create file="avi.html" title="AVI technical issues">
  2.     <h2>Unsupported features</h2>
  3.     <p>
  4.         A non-zero <em>dwStart</em> value, which indicates that the starting time of the first sample in the stream
  5.         is later than time zero, is currently not supported. The value is ignored and streams are interpreted
  6.         as if they started at zero.
  7.     </p>
  8.     <p>
  9.         Videos with frames that have 256 colors or less (8-bit or lower) and which have mid-stream palette changes
  10.         will not decode properly; a warning is displayed on load and the palette changes are lost.
  11.     </p>
  12.  
  13.     <h2>Variable bit-rate (VBR) audio</h2>
  14.     <p>
  15.         Only partial read support is available for VBR audio, used most commonly with MPEG layer III (MP3) audio
  16.         streams. A warning is displayed on load; seeking and decoding will be correct, but the current version
  17.         of VirtualDub will not write an AVI file with VBR audio. The reason for this is that VBR encodings are not directly supported by
  18.         the format; it is implemented using an undocumented workaround and compatibility is spotty, with some
  19.         decoders unable to play the file correctly.
  20.     </p>
  21.     <p>
  22.         <em>dwSampleSize</em> in an AVI stream header indicates the sample size of a stream, independent
  23.         of the sizes of the chunks that those samples are stored in. Zero is a valid value indicating variable
  24.         sample size, and is commonly used for video streams. It cannot be used for audio streams, however, as
  25.         the Microsoft AVIFile and DirectShow parsers ignore <em>dwSampleSize</em> for those streams and use the
  26.         audio format's <em>nBlockAlign</em> value instead, which cannot be zero.
  27.     </p>
  28.     <p>
  29.         The essential feature of the popular encoding for VBR audio streams is an audio format whose <em>nBlockAlign</em>
  30.         value equals or exceeds the actual size of any sample in the stream. When this is the case, DirectShow's
  31.         AVI splitter rounds up the sizes when determining how many samples are in each chunk. For instance,
  32.         a single 152 byte sample might be written in an <em>01wb</em> chunk even though the <em>nBlockAlign</em> field
  33.         is 300. The parser is then able to accurately seek to any point in the audio stream between chunks.
  34.         One sample per chunk is not required; multiple samples can be aggregated, trading a coarser seek granularity
  35.         for lower header overhead. VirtualDub mimics the behavior of the AVI Splitter when interpreting VBR audio
  36.         streams.
  37.     </p>
  38.     <p>
  39.         1152 is commonly seen as the <em>nBlockAlign</em> and <em>dwScale</em> fields of a VBR MP3 audio stream,
  40.         which happens to be the number of PCM samples encoded in each frame of an MPEG-1 audio frame. This particular
  41.         value is not needed for VBR functionality, but it is convenient as it encodes the exact chunk rate of the
  42.         stream when paired with <em>dwRate</em> equal to the sampling rate. However, for this to work, a value of
  43.         576 would have to be used for MPEG-2 audio streams (sampling rates of 24KHz or less), and in addition,
  44.         a value of 1152 is not sufficient in all cases as certain configurations of MPEG audio can exceed 1152 bytes per
  45.         frame.
  46.     </p>
  47.     <p>
  48.         On load, VirtualDub will automatically reinterpret the <em>nBlockAlign</em> of a VBR MP3 stream as the standard
  49.         value of 1, for greater decoder compatibility.
  50.     </p>
  51.     <p>
  52.         The AVIFile library in versions of Windows, at least up through Windows XP, is not compatible with this
  53.         method of VBR encoding. Since it rounds down instead of up when computing the number of samples per chunk,
  54.         it will not see any samples at all in most VBR-encoded audio streams and be completely unable to read any
  55.         audio from the AVI file.
  56.     </p>
  57.     <p>
  58.         It is highly recommended that the tradeoffs of flexibility versus compatibility be considered when deciding
  59.         whether to use or support creation of VBR streams in AVI.
  60.     </p>
  61. </lina:create>
  62.