• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to configure AudioConverter to write VBR?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to configure AudioConverter to write VBR?


  • Subject: Re: How to configure AudioConverter to write VBR?
  • From: William Stewart <email@hidden>
  • Date: Mon, 9 Feb 2009 10:55:48 -0800


On Feb 8, 2009, at 4:42 PM, Jens Alfke wrote:

I'm getting more and more confused, turning the various knobs available to me and comparing the results.

I did a test at 96kbps, because that's about the point where the compression artifacts really start to become obvious to my ears. But it's the numbers, not the subjective quality, that don't make sense.

96k, CBR, medium quality: QT Player reports 93.16kbps. Fair enough.
96k, VBR, medium quality: 93.39kbps, and that value doesn't change as I play through the file.
96k, VBR, highest quality: 177.3kbps(!), again constant during the file. And as expected, this file is nearly twice as large as the others.

Depends which quality setting:

CodecQuality
- this takes a value from 0 to 127 - there are three real values here that we use and you can see this in the UI as "Faster, Better, Best", which currently map to kAudioConverterQuality_Low, kAudioConverterQuality_Medium, kAudioConverterQuality_High (the kAudioCodecQuality_XXX settings are the same property)


kAudioConverterQuality_Low
- focus is on speed of execution, so it uses more Float32 operations, excludes some more complex evaluations
kAudioConverterQuality_Medium
- compromise with still a use of Float32 (where there could theoretically be a loss of signal to noise ratio). Generally we consider this suitable for 16 bit source
kAudioConverterQuality_High
- if Float32 could lead to a loss of precision, it is not used (double is instead). No compromise on the complexity of the algorithm. Suitable for 24 bit source


These settings are applicable regardless of the specific bit rate strategy that is being used and have NO effect on the size of the AAC packet, just on internal settings and decisions that are made. It is the same notion for instance, for a sample rate converter - where this property is also used and affects the performance/quality axis


Bit Rate Strategy is one of 4:
CBR (Constant Bit Rate) - this maintains a constant bits per second rate in relation to time, so for a constrained network style transmission this is ideal. This does NOT mean that every AAC packet is the same size
ABR (Average Bit Rate) - a more relaxed version of CBR (for instance, it won't pad out silence packets), but overall it still aims for an average size within a small margin of error of the target bit rate
Constrained VBR - this provides a range of bit rate to aim for, so if the material is complex more bits can be used, if the material is simple more bits are used


The above three are all constrained in one way or another to trade off quality versus size, where the size is a significant target in the overall encoding process. The fourth strategy is VBR
VBR (Variable Bit Rate) - here the encoder's decisions are guided solely by a collection of quality measurements. Size of output is only limited by the standard requirements of the bit stream (min/max size for a given AAC packet). You will get variable sized files, but over a large collection of files, a given VBR setting will provide an average file size, however it is really (to my mind at least) a general misnomer to think about size as having a direct relevance with VBR, but it can be used as a rough hint/guide


kAudioCodecPropertySoundQualityForVBR
- this sets the basic parameters that a VBR strategy will use to make decisions about the number of bits to use with any given material. So, the results you see above are consistent with the different quality settings the VBR mode is being targeted towards. This property is ONLY applicable to VBR mode (where there is also NO target bit rate value - the bit rate property is ignored in this mode, as this property is ignored in the above 3)


Shouldn't it be the bit-rate setting that fundamentally sets the file-size? I would expect VBR to improve audio quality without significant effect on size,

AAC is a variable bit rate codec; even in CBR mode it is generating packets that represent the same time period (1024 samples) but different byte sizes. The bit rate strategy is describing to the encoder the basic constraints (size or quality) it should observe when making its decisions.


and "high-quality" to slow down the encoding process and improve audio quality,

it does

again without much effect on file size.

it won't

But I must be wrong … so how does it really work?

I thought we had a tech note on this, if we don't, we should :)

Bill

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to configure AudioConverter to write VBR?
      • From: Jens Alfke <email@hidden>
References: 
 >How to configure AudioConverter to write VBR? (From: Jens Alfke <email@hidden>)
 >Re: How to configure AudioConverter to write VBR? (From: Stephen Davis <email@hidden>)
 >Re: How to configure AudioConverter to write VBR? (From: Jens Alfke <email@hidden>)
 >Re: How to configure AudioConverter to write VBR? (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Sound from scratch
  • Next by Date: Re: Creating audio files
  • Previous by thread: Re: How to configure AudioConverter to write VBR?
  • Next by thread: Re: How to configure AudioConverter to write VBR?
  • Index(es):
    • Date
    • Thread