Help - Search - Members - Calendar
Full Version: Need A Wma Lossless Decoder For Streaming
Hydrogenaudio Forums > Lossless Audio Compression > Lossless / Other Codecs
Superlexx
hello, I am looking for a command line WMA lossless decoder for my netjukebox that can decode to stdout. I've found a decoder on the MS's site (wmal2pcm.exe), but it only decodes to a file sad.gif
jth
You might try the slimserver's wmadec:

wmadec
Superlexx
wmadec produces data that isn't really useful :/. If I run
CODE
wmadec -o test.wav test.wma
, then the resulting file test.wav cannot be played in foobar2000 or winamp and cannot be encoded by oggenc sad.gif. It can be "opened" in wavelab, but it offers a "special file format" dialog, which then makes a mono wave that sounds ok.
jth
It would have been more helpful if I included some options:

try

wmadec -o test.wav -r 44100 -b 16 -n 2 test.wma
Superlexx
with your options it's the same (the parameters are default anyway). Do you have a link to the wmadec sources?
jth
yes, the sources are here
Superlexx
OK thx, I'll take a look at them
jth
I just saw a bug report about wmadec - that all the output is in mono. This seems to be related to some recent changes. Apparently an an older version of wmadec works fine for one person. Maybe you can give that a try? Sorry for the trouble.
Superlexx
this version works better, wavelab reads the output as raw data and it's stereo then. But the output .wav file is rather raw data than PCM WAV, it's missing the header (lame and oggenc fail to compress it correctly). I'll try to modify the source so that the headers get attached (just copy them from a real .wav file or maybe take code from LAME).

EDIT: I've modded wmadec to accept -w as a parameter and write the wave header when set (code taken from LAME), here is a link for those who are interested: http://home.arcor.de/superlexx/files/wmadec.zip . It contains the new wmadec.cpp and the binary.
WaldoMonster
Thanks (again) Superlexx wink.gif
UncleJohnsBand
I have been using the GBPVR video/music center along with the hauppage MVP 1000 for accessing the content over the network.

One piece that is missing is the ability to stream WMA since it needs to be converted to MP3.

From reading this post it sounds as though wmadec will decode the wma file and we could then using something like LAME to create the MP3. Is this correctg?

Also....it wasn't clear in the post as to if there was in fact a bug in wmadec that was only producing mono output. Was the altered code you provided above a fix for this problem?
Superlexx
My modification is based on the 0.5.3 branch that didn't have the mono bug

Wmadec can decode the WMA for LAME encoding like "wmadec -w input.wma | lame - -"
UncleJohnsBand
Thanks Superlexx.....I am checking with one of the plugin developers fof GBPVR to see if this can be integrated into the My Music plugin.
UncleJohnsBand
QUOTE (Superlexx @ Mar 9 2005, 05:23 AM)
My modification is based on the 0.5.3 branch that didn't have the mono bug

Wmadec can decode the WMA for LAME encoding like "wmadec -w input.wma | lame - -"
*


I am trying to run wmadec and I keep getting the following error message:

Opening stream failed with error code 0x80070002

What would a valid command line look like if I have a file named test.wma?

Thanks.
Superlexx
CODE
D:\bin\codec>wmadec -w test.wma | lame - test.mp3
LAME version 3.96 MMX  (http://www.mp3dev.org/)
CPU features: MMX (ASM used), 3DNow! (ASM used), SSE
Using polyphase lowpass filter, transition band: 17249 Hz - 17782 Hz
Encoding <stdin> to test.mp3
Encoding as 44.1 kHz 128 kbps j-stereo MPEG-1 Layer III (11x) qval=3
If you use "-" instead of "test.mp3", lame will output into stdout instead of a file.
UncleJohnsBand
Thanks.....I hate to say it but my only error was not to use the correct name of my input file.....I was using the song title as the name when in fact it was actually named 02 trackname.wma.... tongue.gif
Superlexx
Hi,

I've updated wmadec so it can passthrough the length of decoded data, it must be provided like "wmadec -l 12345 test.wma | ..." where 12345 is length in bytes. Then the length will be written into the WAV header, making tools that hang in the pipe work better.

download (sources and the binary)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.