Sounds promising

Discuss Max, an open source CD audio extractor and audio converter.
Post Reply
Mike1
Posts: 201
Joined: Thu Sep 21, 2006 3:55 pm

Sounds promising

Post by Mike1 » Tue Oct 30, 2007 2:52 pm

According to a poster at Hydrogen Audio, Core Audio in Leopard has gained a "true VBR" mode:
The command line for the true VBR mode is as follows:

afconvert -f m4af -d aac -s 3 -u vbrq 127

In VBR mode (-s 3), bitrate option (-b) is ignored because the mode is configured by sound quality which is set by "-u vbrq <sound_quality>" where <sound_quality>: 0-127. Note that the ABR and VBR modes are new features supported in Leopard. CBR and VBR_Constrained modes were in previous Mac OS X.
http://www.hydrogenaudio.org/forums/ind ... opic=58273

It seems to work. I tried encoding a few AIFF files and then converting them to see what I got. Lost the tags, of course, but it does look to be giving what the poster says: the bit-rates of my resulting files did seem to be varying in accordance with the complexity of the source material.

The disadvantage is the option is not exposed in iTunes' GUI.

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Sounds promising

Post by sbooth » Tue Oct 30, 2007 10:23 pm

Yes, there are now three values for bitrate control in Leopard. The documentation in the Core Audio header (AudioCodec.h) states:

Code: Select all

/*!
	@enum			kAudioCodecPropertyBitRateControlMode
 
	@discussion		Constants defining various bit rate control modes
					to be used with kAudioCodecPropertyBitRateControlMode.
					These modes are only applicable to encoders that can produce
					variable packet sizes, such as AAC.

	@constant		kAudioCodecBitRateControlMode_Constant
						The encoder maintains a constant bit rate suitable for use over a transmission 
						channel when decoding in real-time with a fixed end-to-end audio delay.  
						Note that while a constant bit rate is maintained in this mode, the number of bits 
						allocated to encode each fixed length of audio data may be variable 
						(ie. packet sizes are variable).
						E.g., MP3 and MPEG-AAC use a bit reservoir mechanism to meet that constraint.
	@constant		kAudioCodecBitRateControlMode_LongTermAverage
						 The provided target bit rate is achieved over a long term average
						 (typically after the first 1000 packets). This mode is similar to 
						 kAudioCodecBitRateControlMode_Constant in the sense that the 
						 target bit rate will be maintained in a long term average. However, it does not 
						 provide constant delay when using constant bit rate transmission. This mode offers 
						 a better sound quality than kAudioCodecBitRateControlMode_Constant 
						 can, that is, a more efficient encoding is performed. 
	@constant		kAudioCodecBitRateControlMode_VariableConstrained
						Encoder dynamically allocates the bit resources according to the characteristics
						of the underlying signal. However, some constraints are applied in order to limit 
						the variation of the bit rate.
	@constant		kAudioCodecBitRateControlMode_Variable
						Similar to the VBR constrained mode, however the packet size is virtually unconstrained.
						The coding process targets constant sound quality. This mode usually provides 
						the best tradeoff between quality and bit rate.
*/

matkam
Posts: 2
Joined: Fri Nov 09, 2007 11:09 pm

Re: Sounds promising

Post by matkam » Thu Nov 15, 2007 7:53 am

I'm looking forward to seeing this in Max. Using those command line tools does not cut it, mainly because the tags are lost.

ozmosis82
Posts: 8
Joined: Thu Nov 15, 2007 6:22 pm
Location: Edmonton, Canada

Re: Sounds promising

Post by ozmosis82 » Thu Nov 15, 2007 6:25 pm

Does the current unstable release of Max allow for the use of the new VBR mode?

User avatar
sbooth
Site Admin
Posts: 2445
Joined: Fri Dec 23, 2005 7:45 am
Location: USA
Contact:

Re: Sounds promising

Post by sbooth » Fri Nov 16, 2007 6:45 am

ozmosis82 wrote:Does the current unstable release of Max allow for the use of the new VBR mode?
No, and I'm not sure that the next release version will either. I'm working on a new interface to Core Audio's encoders but it isn't finished yet.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests