Kirk
Guest
|
Posted:
Mon Jan 02, 2006 1:30 am Post subject:
problem writing WMA using WMA Pro codec (24-bit) |
|
|
using the WM Format SDK, i'm attempting to write a WMA file with the
following specs:
- WMA 9.1 Pro, 440Kbps, 48Khz, 2 channel, 24 bit (see the first
encoder profile below)
the file is written out successfully (no errors), but the properties
show a length of 33 sec, even though i've written 30 sec of audio.
also, the file plays out purely as static/noise.
if i write out a file using these specs, i get a correct file (30 sec):
- WMA 9.1, 192Kbps, 48Khz, 2 channel, 16 bit (see the second encoder
profile below)
when writing out both files, i can see that last sample time is the
same, and it's writing the same number of samples. (1474560) in the
16-bit case, 4 bytes/sample, and in the 24-bit case, it's writing 6
bytes/sample.
i've written the same 24-bit source data out as a .wav, and it plays
out perfectly, so i know the source data is correct. (and this data
gets dithered down to 16-bit when using the WMA 9.1. codec, and
generates a correct file.)
the properties of the WMA Pro file say the correct bits/sample, sample
rate and codec, and the file plays correctly - but is just all
noise/static.
seems like there could be one of two issues:
- the input properties are set incorrectly on the writer
- the output encoding profile is set wrong
but, i've verified that the input properties are set to PCM, 48Khz, 24
bit, 2 channel, and the encoding profile is set to what's shown below.
any ideas would be much appreciated!
thanks,
Kirk
--------------------------
WMA Pro:
<profile version="589824"
storageformat="1"
name="8acee8a0-67ea-4afe-ad6c-f6dd1981aa40"
description=""
minpacketsize="32768">
<streamconfig
majortype="{73647561-0000-0010-8000-00AA00389B71}"
streamnumber="1"
streamname="Audio Stream"
inputname="Audio409"
bitrate="440016"
bufferwindow="-1"
reliabletransport="0"
decodercomplexity=""
rfc1766langid="en-us"
subtype="{00000162-0000-0010-8000-00AA00389B71}"
bfixedsizesamples="1"
btemporalcompression="0"
lsamplesize="18774">
<waveformatex wFormatTag="354"
nChannels="2"
nSamplesPerSec="48000"
nAvgBytesPerSec="55002"
nBlockAlign="18774"
wBitsPerSample="24"
codecdata="1800030000000000000000000000E0000000"/>
</wmmediatype>
</streamconfig>
</profile>
WMA:
<profile version="589824"
storageformat="1"
name="aeacab86-f565-4666-a832-469999d1da7d"
description=""
minpacketsize="32768">
<streamconfig
majortype="{73647561-0000-0010-8000-00AA00389B71}"
streamnumber="1"
streamname="Audio Stream"
inputname="Audio409"
bitrate="192000"
bufferwindow="-1"
reliabletransport="0"
decodercomplexity=""
rfc1766langid="en-us"
subtype="{00000161-0000-0010-8000-00AA00389B71}"
bfixedsizesamples="1"
btemporalcompression="0"
lsamplesize="8192">
<waveformatex wFormatTag="353"
nChannels="2"
nSamplesPerSec="48000"
nAvgBytesPerSec="24000"
nBlockAlign="8192"
wBitsPerSample="16"
codecdata="008800000F0000800000"/>
</wmmediatype>
</streamconfig>
</profile>
|
|
nistvan_ro
Joined: 03 Oct 2005
Posts: 16
Location: Brasov, RO
|
Posted:
Wed Jan 04, 2006 12:28 pm Post subject:
Re: problem writing WMA using WMA Pro codec (24-bit) |
|
|
| Kirk wrote: | | using the WM Format SDK, i'm attempting to write a WMA file |
Hi Kirk!
I am also interested in writing WMA files from WAV files. Can you help me with some example code on how to do this? I have an application which is cutting a large WAV file in smaller chunks, and after that it is supposed to compress the chunks in WMA. I have the WMF SDK, but it's a bit hard for me to understand all the ins-and-outs of it.
I'd appreciate some help,
cheers, Istvan |
|