Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: WMA bitrate equivalency (Read 13481 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

WMA bitrate equivalency

Hello everyone. I'm working on developing a table of suggested audio settings for conversion to WMA. Reason being to save as much space and bitrate as possible while still preserving quality in a video transcode from .avi to .wmv

The two codecs that I would like to focus on at this point are AC3 and MP3.

The files are being converted using the WMA 9 Std, or Pro codec, depending upon video choice. The choices are limited to these because the video files must be playable on the XBox 360 and Zune devices.

I am fairly confident that I can come up with suitable values for MP3 conversion, but I am pretty lost when it comes to AC3. Any guidance that you could offer would be great!

Thank You in advance!
Just an average nerd!

WMA bitrate equivalency

Reply #1
Take a look at the ABX tests in the wiki. Should help you out.
EAC>1)fb2k>LAME3.99 -V 0 --vbr-new>WMP12 2)MAC-Extra High

WMA bitrate equivalency

Reply #2
Thanks for the tip...alot of useful information there.

There doesn't seem to be a whole lot of info on AC3 bitrates however.

Is the compression about as effective as MP3 (could I use the same guidelines safely)?
Just an average nerd!

WMA bitrate equivalency

Reply #3
Also the bit about transcoding.

As for your actual idea of a bitrate table, I suggest you look at the results of the various listening tests that have been done here at HA, both large public tests and personal tests done by individuals like guruboolez. You may be able to get a good line for a sort of "equivalent performance" curve. And it will be curvy -- mp3 performance drops off steeply below 96kbps, while WMA std sort of runs out of juice above midrange bitrates.

WMA bitrate equivalency

Reply #4
I don't really get your question, because if you do a transcode, you must live with what you get (from the source-video).
Films contain many dialogues. That's the reason MP3 with 128kbits is often good enough.
AC3 is technically inferior to MP3. I would go with 192kbits on stereo-sources, but do ABX tests to find the bitrate that fits your hearing capabilities.

WMA bitrate equivalency

Reply #5
AC3 is technically inferior to MP3.


Question of curiosity: on what information are you basing that statement? Not being combative, just curious.
EAC>1)fb2k>LAME3.99 -V 0 --vbr-new>WMP12 2)MAC-Extra High

WMA bitrate equivalency

Reply #6
There doesn't seem to be a whole lot of info on AC3 bitrates however.
Is the compression about as effective as MP3 (could I use the same guidelines safely)?
Not at all. AC3 is a high-bitrate codec. It is terrible at any sort of low bitrate like mp3, wma, ogg, aac, etc use. On the other hand for it's intended purpose of high bitrates it works well and has high / transparent quality. (It also requires little decoding power, which was important back in '92, and has other special attributes from it's design for films.) So it really can't be compared.

I think the only way to deal with AC3 is to treat it as a more-or-less lossless source. If your users are transcoding from audio on DVD movies this is the normal method. Since AC3 is rarely used for anything else that should be fine.

WMA bitrate equivalency

Reply #7
Quote
Question of curiosity: on what information are you basing that statement? Not being combative, just curious.


Afaik, coding of the quantized filterbank values is only done on an exponent-mantissa basis
and not as opposed to MP3 with a huffman coder for example. Another thing which
comes to my mind is the lack of a good psychoacoustic model in the open-source implementions of this standard.

WMA bitrate equivalency

Reply #8
Allow me to clarify my intentions a bit.

The table will be used in application programming for a standalone video-converter to WMV. Just today we have standardized on WMA 9 Pro because it is supported by both XBox 360 and Zune video. Many source files are .avi's encoded with MP3 and AC3 audio streams. For MP3, there is ample test evidence in the HA wiki to develop a set of suggested bitrate-to-bitrate items. I am much more unfamiliar with AC3 audio, hence the inquiry.

As an example....

I have a file with AC3 stereo audio at 48Khz, 160kbps bitrate. When the transcoding application analyzes the audio-stream, the intention is that it will automatically pick WMA 9 Pro settings that will neither waste bitrate, or lose quality. I know that 5.1 AC3 directly from DVD is to be treated as lossless, but many files that I (and others) have in their libraries were created with stereo channels and non-standard bitrates.

My first instinct with the afformentioned file is to go with an ABR of around 130kbps, but I want the applications assumptions to be based on fact, not my educated guess.

If there are listening tests with AC3 at varying bitrates compared to WMA 9 Pro, please point me to them and it should be all I need. If not, please provide me with your opinions on the subject so that I can refine my own.

Thanks!

EDIT:
Upon completion of a stable beta with the audio bugs worked out, I will post a link to the application for all of you to critique/use as you wish. The purpose of the app is to easily transcode video files into XBox 360 and Zune compatible formats with as little user input as possible...this is designed for beginners who do not have the knowledge to choose proper audio/video settings relative to source...they just want their video's to work on their devices.
Just an average nerd!

WMA bitrate equivalency

Reply #9
AC3 is technically inferior to MP3.


Question of curiosity: on what information are you basing that statement? Not being combative, just curious.


Let's see MP3 - 576 line filterbank, but with bizzare aliasing problems.
AC3 - 256/512 line filterbank, with wierd "frequency resolution" hacks
MP3 - Awful stereo coding
AC3 - not sure about stereo coding

At least it's not AC2 and the silly backward-adaptive "perceptual model".

I'm not defending the assertion, note, I see it as more of a 5 of one, a bit less than half a dozen ...
-----
J. D. (jj) Johnston

WMA bitrate equivalency

Reply #10
Let's see MP3 - 576 line filterbank, but with bizzare aliasing problems.
AC3 - 256/512 line filterbank, with wierd "frequency resolution" hacks
MP3 - Awful stereo coding
AC3 - not sure about stereo coding

Correction: AC3 uses a 256-line-filterbank with a 512 sample window. (A frame consists of 6 "audioblocks" with each 256 samples => 1536 samples/frame. Scalefactors can be shared among several frequency lines and audioblocks)
Granted: Its swtiching to 2x128 coeffs is weird (haven't tried it) and possibly rather futile due to both sub-blocks sharing the same scalefactor and quantizer.

Like pest I would have mentioned AC3's quantization part and (non-existing) entropy coding to be technically inferior to what is done in MP3 and AAC. However, AC3 uses a rather unique hybrid backward/forward adaptive bit allocation method. This makes a comparison between AC3 and MP3 difficult, actually. I remember reading somewhere (it might be as well the AC3 specification) that due to this structure the side informations that are needed by the decoder are quite compact. At the very least it's plausible. Also it's probable that this specific design lowers the need for variable-length codes for spectral coefficients (their distribution per quantizer might be flat). So, the absence of VLCs alone is not a big argument here. Whether MP3 is more efficient representing a signal with the same SMR than AC3 is to be tested. Given the known facts about both formats (specifications are available*) my intuition tells me that MP3 is probably slightly more efficient in terms of needed bits for the same SMR. Maybe something like 160kbit MP3 = 192 kbit AC3 -- but don't take my word for it. 

Regarding stereo coding: I'm not sure anymore but I think that what AC3 does is somewhere between the MP3/AAC stragegy. L/R, M/S (they call it "matrixing") plus intensity stereo (they call it "coupling") for a certain frequency region and selective channels with a per channel selective polarity (like AAC if I recall correctly).

MP3 and "bizzare frequency aliasing problems"?
I think you're exaggerating a bit here. It's been a while since I tested the hybrid filterbank for how well this alias reduction works. But if I recall correctly it didn't look that bad.

BTW: I tried to do a format comparison -- not an encoder comparison. These are two different things. It's possible that the "equivalence" I estimated is off due to different encoder implementation qualities.

*: Unfortunately I don't have access to a "WMA Pro" specification. So the only things we can do is testing the available encoders via ABXing.

regards,
Sebastian

WMA bitrate equivalency

Reply #11
Correction: AC3 uses a 256-line-filterbank with a 512 sample window. (A frame consists of 6 "audioblocks" with each 256 samples => 1536 samples/frame. Scalefactors can be shared among several frequency lines and audioblocks)
Granted: Its swtiching to 2x128 coeffs is weird (haven't tried it) and possibly rather futile due to both sub-blocks sharing the same scalefactor and quantizer.

Hmm. Memory is getting old,then, but I'd swear I've seen a paper on obtaining 512 line frequency resolution somewhere.
Quote
Regarding stereo coding: I'm not sure anymore but I think that what AC3 does is somewhere between the MP3/AAC stragegy. L/R, M/S (they call it "matrixing") plus intensity stereo (they call it "coupling") for a certain frequency region and selective channels with a per channel selective polarity (like AAC if I recall correctly).

I'm not aware of AC3's stereo coding strategy. More like AAC would be good, but AAC is effectively the AT&T PAC strategy with added intensity coding.
Quote
MP3 and "bizzare frequency aliasing problems"?
I think you're exaggerating a bit here. It's been a while since I tested the hybrid filterbank for how well this alias reduction works. But if I recall correctly it didn't look that bad.

Eats bits, though. Either you deal with the bits being eaten, or you do get some odd stuff happening. Perhaps new twiddle factors would be better for the aliasing correction?
Quote
BTW: I tried to do a format comparison -- not an encoder comparison. These are two different things.


Indeed, I'm not wanting to evaluate individual ENcoders, either.
-----
J. D. (jj) Johnston

WMA bitrate equivalency

Reply #12
So does anyone have guidance with regards to AC3 to WMA 9 Pro? If the MP3 comparison holds, should I assume that WMA 9 Pro, converting from 192kbps AC3 stereo, would perform well at an ABR of about 160kbps?
Just an average nerd!

WMA bitrate equivalency

Reply #13
I have a file with AC3 stereo audio at 48Khz, 160kbps bitrate. When the transcoding application analyzes the audio-stream, the intention is that it will automatically pick WMA 9 Pro settings that will neither waste bitrate, or lose quality.
Transcoding will involve loss of quality no matter what. Even if your source is low quality, transcoding will only make it worse.

Quote
EDIT:
Upon completion of a stable beta with the audio bugs worked out, I will post a link to the application for all of you to critique/use as you wish. The purpose of the app is to easily transcode video files into XBox 360 and Zune compatible formats with as little user input as possible...this is designed for beginners who do not have the knowledge to choose proper audio/video settings relative to source...they just want their video's to work on their devices.

OK, in that case I think you're going at this the wrong way. The most critical thing about picking bitrates for this sort of conversion is the size of the resulting file. "Equivalent quality" is a silly way to do the transcode, especially when the result is guaranteed to be of lower quality. If you really want to make it simple, just have it preserve the same file size as the input file.

If you wanted to be really useful, you could make "same size" be the default, and have two other options "smaller than original" and "maximum quality", with like a radio select. The smaller one could have a box for what percent smaller. Maximum quality would just always encode with settings that are generally transparent for the video dimensions and number of audio channels. (Probably about 150 kbps for wma std audio, 130 kbps for wma pro audio, and .18 bits per pixel per frame for the best wma video codec.)

WMA bitrate equivalency

Reply #14
As many have pointed out, transcoding creates quality loss. I know this, but in some circumstances, you have to do the best possible and just bite the bullet on transcoding.

There will be file-size options, but I see no reason to waste disk space and bitrate if a smaller size audio stream will handle the "best transcoded" quality. If I can save a few MB of disk space, why not go for it?

I agree that for stereo sources, WMA 9 Pro at 130kbps seems like it's pretty much transparent. What would the transparent 5.1 bitrate setting be? Any guesses?
Just an average nerd!

WMA bitrate equivalency

Reply #15
I agree that for stereo sources, WMA 9 Pro at 130kbps seems like it's pretty much transparent.


For what reason are you using the 4 years old WMA 9 Pro in your tests? It's outdated due to Windows Media Player 11 having introduced the format's successor, WMA 10 Pro. Since v10 is backwards compatible to v9, the XBox 360 and Zune won't cause any problems playing it back.

Besides, don't get confused about the command line settings of the Windows Media encoder. Some line like "-silent -a_codec WMA9PRO -a_mode 2 -a_setting Q50_44_2_24" will actually encode to WMA 10 Pro with Windows Media Player 11 installed on your machine, despite the "WMA9PRO" being mentioned in the settings.