PDA

View Full Version : Converting 24-bit WMA9


joeljkp
12th August 2005, 22:31
I'm looking for something that will convert a WMV video with 2-channel 24-bit WMA9 audio.

I've tried Stoik Video Converter 2 and Bink Video, but they only seem to be able to convert to 44.1/16-bit stereo. I've also tried mplayer on Linux, but it has the same problem.

I'm converting to HuffYUV/PCM in AVI for a later conversion to something else.

Any ideas?

DarkFoon
13th August 2005, 01:57
avisynth can help, it supports multichannel audio with 32-bit floating point precision internally.
just use directshowsource() with the fps=xx argument (replace xx with the actual framerate of the video)
load the script into virtualdub and use "Save WAV"
voila!

You can also use avisynth to avoid having to convert to huffyuv/pcm if you are going to convert to something else later. It'll save you disk space and time. Unless you absolutely need an AVI file.

Mug Funky
13th August 2005, 07:38
24 bits in a lossy file? i always thought one could decode a lossy file into whatever precision you want. of course it wouldn't increase quality, or even be noticable over 16 bits.

or is this WMA lossless?

[edit]

darkfoon: wouldn't avisynth's internal 32 bit be converted to 16-bit when you try to export it?

DarkFoon
13th August 2005, 07:43
apparently, wma9 is a little different. I haven't done much research on the format, but in the WMA9 professional codec, it makes a clear distinction between between 16- and 24-bit modes. Perhaps it uses smaller blocks to accomodate for the larger bit precision per sample. Hmmm, that makes no sense... well neither does Microsoft in general :P

OT: I like your description, Mug Funky ;)

DarkFoon
13th August 2005, 09:45
@ Mug funky
I do not think so.
A simple experiment:

wavsource("nebel.wav")
convertaudioto24bit()
ssrc(48000,false)

"nebel.wav" is 16-bit, 44.100 hz
lets see if it outputs to 24bit.
hmmm, aparently, VDub's Save WAV automatically selects 16 bit output.... I'm going to try again.

... testing...

Hmmm, odd.
When I apply the filters to the colorbars audio (as opposed to the nebel wav, I used in the above example) and then load my script, the Save WAV function saved the wav in every bit format that I bothered to test converting it to (except float, because I see no reason to test that). But with the nebel audio, it was 16bit for no reason. I'm just going to chalk that up to human error, as I am very tired.

So, yeah, I just tested my own theory, and it works.
Actually, its kinda funny: I forgot that I needed a video stream, because I tried to load a script with only the example above, and it wouldn't work. So I used colorbars(64,64) as a quick fix.

Please forgive my goofy nature and incoherence. I am tired as of posting this. I'm going to sleep after this.
Also, please forgive my typos.


+++++EDIT+++++

A little more experimentation confirms the "human error" that I had above. It works just fine for the nebel wav as well as the colorbars (I knew I messed something up)
It outputs any bit format you specify, except float, which it outputs as 16-bit (probably a default somewhere)

I realize we were talking about slightly different things. Yes, you are right, float does become 16-bit, but I figure the audio from directshowsource will be outputted at the correct bit-depth. The user can make sure it happens the right way by specifying convertaudioto24bit(), if its already in that format, it won't hurt it, and it just makes sure that the output knows what bit-depth to use.

joeljkp
13th August 2005, 18:02
24 bits in a lossy file? i always thought one could decode a lossy file into whatever precision you want. of course it wouldn't increase quality, or even be noticable over 16 bits.

or is this WMA lossless?

It's this clip (http://www.projectoffset.com/downloads.html). And yeah, I believe you're right, it decodes to 16-bit by default, though it does have a 24-bit decode option. I'm trying to create an equivalent file in a different format, though, so I'd like to keep the 24-bit-ness.

mic
13th August 2005, 19:59
Grabbed the clip, & the audio is 44/24 (lossy) 2-pass vbr, one of the winmedia audio 9.1 pro profiles. Can strip the audio itself using MS Winmedia Stream Editor to get a .wma file, but that's about as far as I can get keeping the 24 bit part. Someone more fluent in BeSweet might list commands to convert this to something else maintaining 24 bit, but everything I tried (several audio apps and utils) assumed the orig audio was standard 44/16 and created a 44/16 intermediate to work with.

That said, Vegas will open the wma &/or wmv file, and list the audio properly. The question is, if you were to convert the audio to some other format, would Vegas 1st convert it to 44/16 (like Soundforge) before encoding?

joeljkp
14th August 2005, 01:00
Read this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmcodecs/htm/usinghighdefinitionaudio.asp) and this (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmcodecs/htm/g_wszwmachiresoutput.asp).

It seems pretty straightforward, but I don't know how to see or edit the value of that property.

Any ideas?

mic
14th August 2005, 05:40
OK, you're talking about wavformatextensible, however it's spelled. 1st link doesn't say much, but the second link gives a hint. Next step is to try and open the file in CoolEdit or as it's now called, Audition I think. Only other program I'm aware of that will handle this format generally well is Audacity, and it choked big time when I tried it earlier.

If you do get it to open in Audition/CE, check the structure of the temp files it saves when the file is opened. If they are 24 bit, think you're cool. If they're 16 bit like with Sound Forge, think it might be working on those 16 bit temp files instead of your 24 bit wma.

DarkFoon
14th August 2005, 14:28
In WAVlab (I know this is a totally different thing) There is a setting where you can specify the bit-depth of temporary files, there might be that type of option in Audition/CE (but I have never used those, so I wouldn't know).
I suppose that if you set it to 24-bit, that would solve the problem, but like I said, I have never seen those apps, so I could totally be wrong.