Archived

This topic is now archived and is closed to further replies.

WMA File Format Specification

This topic is 5619 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone have or know where I can get the WMA File Format Specification? I need these so I can create my own Encoder/Decoder for the WMA format. I have search the net with no results, and checked MSDN and they just tell you how to use there SDK for it. I do not know why they would it would be so hard to find. Unless Microsoft does not want it beat MP3 in popularity, they are doing an injustice to themselves and others by not making this available so that it can be used on all platforms like MP3. Anyways any help on getting this would be great... Thanks, Aalst

Share this post


Link to post
Share on other sites
Do you actually need to use WMA, or do you just need to have source code to encode and decode compressed audio files on multiple platforms? If your situation is the latter, look up Ogg Vorbis (it''s undoubtably a better format than WMA, and arguably better than MP3). If it''s the former, sorry that I''m not much help.

Share this post


Link to post
Share on other sites
I want to take WMA across multiple platforms. So I need a document detailing the file specification, or source code example showing how to encode/decode WMA files, any any language.

I agree that OGG is a good format and the best part is that it is OpenSource and I hope it catches on someday, However, I do not agree that it is a better format. I have used numbers formats, and for audio WMA is the best. (I hate that Microsoft came out with it) It gives the same quality as an MP3 at half the bit rate. OGG can not do that, yet and I hope someday it can. What I have seen is that OGG is smaller that MP3 at a "equivalent" quality settings (since it uses VBR) by about 15%, but not 50% smaller yet as with WMA.

Don''t get me wrong all three formats (MP3, OGG, WMA) are great. Each has it''s pro''s and con''s.

Thanks for the suggestion, however I really want to take WMA cross-platform if I can. (Unless Microsoft has something to say about it)

Share this post


Link to post
Share on other sites
yeah, but you dont get sample accurate seeking in wma or mp3. also ogg support more then two channels.

as for actually decoding the wma, good luck. i do know like mp3, vqf, ogg, etc use a psychoaustic models to lose the frequencies that are not heard. so you get great compression like how jpeg removes high frequency visual data that ussually is not noticed.

thus most likly the data will be stored similarly to the other formats, and use a inverse direct cosine transformation. the problem is figuring out how the "packets" are stored. since its definatly packet/frame based since thats how asf works and its designed for streaming.

you WONT find any source code on how to decode or encode the wma format. if there was source code for it, players on other platforms would have been written. there is also no WMA specification you can look at, again if there was players would have been created already. currently players on linux use wine and the original ms codecs to playback wma. even the winamp plugin used the wma sdk.

ms is not doing themselves an injustice, they are saying "if you want to use our content use windows". most ppl run windows. thats a fact. most ppl who run linux systems either have a dual boot system or another pc that runs windows. thats another fact.

there is no point in supporting wma on other platforms. most content is in mp3. most wmas are "secure" content meant for only the pc that has the "rights" to it. there is no secure mp3 format. most secure digitally online bought music content is in the form of wma. thats what MS cares about. in fact the wma tools on windows will lock all wmas encoded to the pc that encodes them. the owner has to transfer the keys over for decryption. basically mp3 is only competion in the illegal music sharing arena. ms dont want that market, since there is no money in it. most games tend to use ogg because of mp3/wma liscencing issues.

on liscencing, real networks is being sued by MS for reversing WMA, and placing the format as one of the formats that real''s new server (dubbed Helix) can use. basically it support microsoft formats, real formats, quicktime, and macromedia formats. needless to say that if real is getting sued, so would you for releasing such software. unlike real however, you dont go the money to pay for lawyers and court costs.

you could start an open source project on sourceforge and try to build a team to reverse the format (since again there is no source code or file format sepcifications online).

basically if your asking for source code, i doubt you have the skills or determination it will take to write the decoder, let alone an encoder.

so since MS does have something to say about it (ie suing real) i suggest either devoting your time to more useful endevors or getting a team and making the project open source on sourceforge.

Share this post


Link to post
Share on other sites
A Person,

One, if you read the post correctly I am not asking for source code. I am asking for the file format specifications.

In my previos reply I mention source code examples. This is because I do not think anyone has the specs. Considering I asked for it in any language, I just want to see how the frames are stored. I know they are very similar to MP3, and use a form of ID3v2 like MP3. I do have the skills to write my own CODEC for it if I had the information.

Also the play is for it to be an open source project. However, I do not want to reverse eng. it. That is defentily crossing the line. I am planning on talking to Microsoft and asking their permission. They just ported Media player to Mac X (BSD) so they are already making WMA multi platform, I just want to take it to the next step.

Yes, WMA is a secure format, and you do not have to use those features. I have the DRM when I rip or convert to WMA. I would think the size would be important in transfers of the files.

Microsoft never sues first. They ask you to stop first, and then if you don''t they will sue. The exceptions are if you''re a big fish (like Real) and/or they think you crossed the line (like reverse engineer).

If if it is an OpenSource project, Microsoft will and has gone after them to stop what they are doing, and all the I have seen have done it. (Big example Virtual Dub)

Anyway this is getting of the subject of my orignal post.

Share this post


Link to post
Share on other sites
The thing about WMA having equal quality at half the bitrate of MP3 is a myth, and a rather outdated on. Many months ago, Microsoft released encodings of several audio files in WMA, MP3, RealAudio, and a couple of others. The WMA files were about half the size of the MP3.

What that doesn''t take into account, tho, was that the MP3 they released had each channel encoded separately, while the WMA used joint stereo. And the samples were chosen such that joint stereo would not cause appreciable quality loss.

WMA is a pretty good standard, but the "50% smaller" is deceptive advertising, bordering on a hoax.



Don''t listen to me. I''ve had too much coffee.

Share this post


Link to post
Share on other sites
Sneftel,

Well it is not a myth. I have over 4 GB of WMA''s. Each I have compaired againest MP3. I have ripped a CD to MP3@128 then to WMA@64 with all other settings equal. And the WMA sounded just like the MP3. I also used Microsoft Conversion tool and converted a MP3@128 to WMA@64 and to my surprise the WMA sound just like the MP3. The conversion is what surprised me because usually when you convert from one lossy format to another you end up lossing more, and the sound quality is usually noticably differnt.

So every MP3 I have converted I listen to each back and forth and I keep the one that sounds the best, and if they sound the same I keep the WMA. So far I have kept every WMA.

So I can confirm with by my own experience that it is not a myth. The one thing missing from WMA is VBR, which would make it better at about the same size, or smaller size at the same quality.

Regardless, in my opinion WMA is the best format out, it''s only down side is Microsoft. Don''t get me wrong I really do not like Microsoft, but they have become an neccary evil in my life.

MP3 has it own draw backs and that is that it has patents on it as well, however the licensing is easier to get.

This is where OGG is great, that it is OpenSource with no patents.

Regardless I am waiting to hear back from Microsoft on if I can get a License from them to make a cross-platform WMA Codec. If they so no, then that will be the end of it.

Althought there must be someone to use the OS X version of the Media Player to at least use it on Linux.

Adios...

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
OS X is unix based. (Darwin)

http://developer.apple.com

"Built upon an open source, UNIX-based core called Darwin, Mac OS X lays the groundwork for a new generation of developer innovation. "

I beleive all of their development tools are free. If you had a Mac, porting a OS X version of Windows Media Player to Linux should be easy.

Final Thought: Why re-write a CODEC? Why not find some way to load the CODEC cross-platform?

-James

Share this post


Link to post
Share on other sites
MS great business comes from control it houses over its technology. you did ask for source examples as if someone would have created a codec without writing down the format specs. the firt thing ppl do when they reverse engineer something is document the format so its easy to refer to when creating the codec. it also allows easier transfer of knowledge between ppl since the code may be in error, and it may be due to a bug in coding or file format misunderstandings.

any format information availible on the net will be from reversed engineering, thus even asking for it is naive. you dont want to reverse it, yet dont mind if someone else does?

if you truly want to open source a wma codc, the only way is by reversing the format and releasing the format and code yourself (or your team) under GPL. to me there is no point with wma. ogg is free of patents and opensource. ogg has even better quality then wma, the 64kbs file you create can be a 62kbs file in ogg with great quality. no matter what you do you have to deal with MS when dealing with WMA.

goto the ogg website and hear the difference. ogg reproduces significntly better then wma and no patent restrictions or MS to deal with. just because wma is easy to use because of MS tools dont means its better. give me one good reason its better then ogg besides the obvious "its support on all windows systems without installing software" or "it supports encrypted audio locked to a pc".

also the idea of loading the windows codec is already being done on x86 linux systems through wine.

also converting from one lossy format to another will lose quality. it wont sound better(unless you have rose colored speakers ), and the quality loss may be imprecetible (since like jpeg there is a decent number of generations that can be made before sound degration become apparent). what is the real reason behind such a blind faith for wma? vqf was around before wma and had the "half the bitrate at the same quality" feature as wma. ogg has it as well. what i dont get is why wma is better then other formats (for personal use). it has the negetive downside of liscencing and MS wanting to keep control over its own format.

plus if MS tells you to close shop or sue you in either case the project dies. sure it may live on through other developers like asf recorder, but the main project will be dead and it becomes underground thus only ppl using it will be those "in the know". most of those ppl will be using ogg anyways ince they are not afraid of using alternitive formats.

if you have the skills, then reverse the format and start a project. MS wont give you the OK, insteda they will produce there own closed source version in due time.

[edited by - a person on July 25, 2002 6:25:57 PM]

Share this post


Link to post
Share on other sites
A Person,

Well OGG does not have the same quality as MP3 at half the bit rate. I have tried it, and they make no claims to this fact. The best you get with them is with VBR and it is only about 15% smaller, however you can now do VBR with MP3 and it is the same as OGG then, just not all players can handle it yet.

I do not know where you get your claims that OGG is the same sound quality at half the bitrate of MP3. No place on there site do they make any such claims. Also as of OGG 1.0 they are completely VBR and have a quality scale from 1-10. They prefer you use this over the CBR. I would like you to rip a song from a CD to MP3@128, OGG@64 (with Version 1.0), WMA@64 with all other settings the same. You should notice that the WMA sounds the same as the MP3, but the OGG will sound worse.

I have done this. Also just because you can access Media Player via Wine, does not mean that people like to do that. Also for some reason you seem to assume that when I say cross-playform I mean on Linux. I mean all flavors of Linux, Unix, BeOS, OS/2, Mac OS 9 & 8, PalmOS, and any other platform I may have missed.

Wine is a bad way to get access to something that is on a windows platform. The best way would be to port it to Linux, and provide command line options for most if not all the features. Most Linux users do not hang out in a GUI. My Linux box does not even boot to a Windows Manager, it just go right to command line. I almost never even need to go into a Windows Manager. This is the same with most of the people I know who use Linux, and have for a long time.

Microsoft is the Evil Empire, however once in a while they hit on some technology that is really good. WMA is the only one to make the claims of 64 CBR being the same as 128 CBR on MP3. Also the claim is valid.

Regardless this will be my last post on this subject. Since we have gone way of this topic. If you want to continue this with others you can post a new topic about OGG vs MP3 vs WMA and go at it.

Adios...

Share this post


Link to post
Share on other sites
umm, just because someone makes a claim does not make it true no matter how large the corperation. goto the website (vorbis.com) and listen to the samples they have there. wmas are nothing special.

i do realzie you mean all flavors of OSs. i use linux for describtion since its the biggest alternative OS. its easier then type all of them out. i dont use X either. in fact i rarly even physically use my linux system instead i ssh into it. so i dont have much use for audio on it at all.

also its niave to think players dont support vbr mp3s. those that dont are not following the mpeg layer 3 specifcations. its that simple. mp3 from the start allowed vbr, some ppl were lazy and did not implement proper support for it since they did not see many mp3s using it. in fact mp3 can allow changes in not only bitrate per frame, but the sample rate as well. each frame is considered pretty much independent since its a stream. you should be able to take all your mp3s, remove the tags, and concatenate them. no matter teh bitrate or smaple rate the decoder should play the sound back correctly. dont blame faulty decoders by lazy ppl. sure mnay linux players all use the same decoder since its the "best" one for linux and they dont want to write their own decoder. so they have to deal with it not fully supporting the spec.

you apparently believe the MS hype, yet think they are evil. maybe i got better speakers, but i dont hear wma sounding better then ogg by any measure. though i guess real tests like classical music are not what you are using. if the original piece does not have a large dynamic range then the compressed version wont either thus you ownt notice the difference.

there is no point in comparing CBR since VBR allows better compression ratios. i know wma suports vbr (if not, yet another reason why its no better then ogg).

the problem with starting such a thread is that most ppl dont ahve the sound setup nor the hearing to judge the quality accuratly. also with ppl having some baisis (ir you with wma) they wont hear the difference if its close (i never said wma was far worse in quality, i merely said that the quality was no better or slightly worse then ogg). the main difference i hear is that the wma is slightly "softer" sounding (like vqfs) then ogg. ogg seems to have better response to attacks and notes are sharper. in some music this dont matter, in classical it does.

if you can defintivly say that wma is vastly superior then ogg then you did not really compare them. there is very little difference. i agree mp3 is far worse vs wma, vqf, and ogg. however wma is not vastly superior to ogg or vqf.

sure wine is a bad way to handle things. though its currently the only viable method beyond reversing the format yourslef and implementing a decoder hoping you did not miss a quirk in the format.

Share this post


Link to post
Share on other sites
Sound and Vision magazine did a non-biased study on wma, mp3 and real player file formats. basically what turned up was that wma does sound better at the same bitrate and is smaller in size, but not by the 50% margin that MS advertises as another poster mentioned. it was about 15-30% better depending on the type of sound. so if you can use any of the 3, use wma since it is the best.

Share this post


Link to post
Share on other sites
quote:
Original post by mediamaster40
Sound and Vision magazine did a non-biased study on wma, mp3 and real player file formats. basically what turned up was that wma does sound better at the same bitrate and is smaller in size, but not by the 50% margin that MS advertises as another poster mentioned. it was about 15-30% better depending on the type of sound. so if you can use any of the 3, use wma since it is the best.

That makes no mention of Ogg at all. It's not in dispute that MP3 isn't as nice as the competition. The real battle is between Ogg and WMA. Judge for yourself.

[edited by - Alimonster on July 25, 2002 8:37:47 PM]

Share this post


Link to post
Share on other sites
quote:
Original post by aalst
Well it is not a myth. I have over 4 GB of WMA's. Each I have compaired againest MP3. I have ripped a CD to MP3@128 then to WMA@64 with all other settings equal. And the WMA sounded just like the MP3. I also used Microsoft Conversion tool and converted a MP3@128 to WMA@64 and to my surprise the WMA sound just like the MP3. The conversion is what surprised me because usually when you convert from one lossy format to another you end up lossing more, and the sound quality is usually noticably differnt.

Of course it is not a myth. Everybody can test it, and everybody have it's own result. Prolonged listening might results in poorer hearing ability. (just kidding). Have you tried comparing the two-channel frequency/spectrum chart of both (oh, I don't know how it is called)?

Remember, smaller file size means less data being 'remembered', less data means less accuracy (for lossy compression). BUT the sound production hardware (speaker?) and measurement instruments (i.e. your ears ) might not be able to produce and detect the accuracy lost.


[EDIT] What type of WMA/MP3 sound you tested on? If it is just some gameboy-like tune... then MP3@128 and WMA@64 do not have much difference in quality.

[edited by - DerekSaw on July 25, 2002 9:37:51 PM]

Share this post


Link to post
Share on other sites
I''ve had a listen to those samples on the web page and compared them with the wav

Ogg with VBR : slight distortion on the ride like the WMA format

Ogg managed : slight distortion on the ride like the WMA format
MP3Pro : even flatter than the MP3Enc
WMA8 : slight distortion on the ride cymbol (sp?), much nicer treble
MP3Enc31 : missing alot of treble, sounds very flat

Based on my own ears, my SBLive running via the stereo and my wireless Technnics headphones I can detect no difference between the ogg and WMA samples, the managed ogg file was even slightly smaller than the WMA and vbr ogg files (go figure)

Based on that, I''d use ogg, because althought its sound reproduction was no better, one file was slightly smaller and another was only about 20k bigger and gave the same results as WMA, however as ogg is open and WMA is very much closed the advantage goes to ogg.
gg.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
See the slashdot comments too. Browse at 4 to get rid of the noise...

http://slashdot.org/articles/02/07/30/0328223.shtml?tid=141

Share this post


Link to post
Share on other sites