ffmpeg: Free Software's WMA decoder
mmu_man writes "This morning, after the usual spams, I got this from the ffmpeg-devel mailing list:
Here it is, something we waited for long. Now we have a FreeSoftware (LGPL) WMA (Windows Media Audio) decoder. WMA is the highly proprietary audio codec M$ is pushing along with its user-locking tools like DRM. this will free us from the ugly DLL hacks required to play DivX until now.
Note there isn't any encoder yet, but who would like to encode into WMA while we have better and more open solutions?
With this new codec, ffmpeg really proves itself as the most complete audio/video grabbing, convertion and streaming solution, for Linux, but also FreeBSD, Windows and even BeOS. Note ffmpeg codecs are used in a lot of other FreeSoftware projects, like mplayer."
"Blessed are the poor in threshold: for theirs is the Kingdom of the Page-Lengthening and Page-Widening Posts.
"Blessed are they that mourn the death of *BSD: for they shall be comforted with an ultradense Linux server from VA Linux, now sold by California Digital Corporation.
"Blessed are the posters of smug one-liners: for they shall inherit an Account Capped at 50.
"Blessed are they which do hunger and thirst after The First Post: for they shall have the Third or Fourth Post.
"Blessed are the karma whores: for they shall obtain "Score: 5, Insightful".
"Blessed are those who dismiss out-of-hand: for they shall fail to see the Point of the Original Post.
"Blessed are those who seek to associate themselves with the latest techno-fad: for they shall be called 3L33T for at least Another Half Hour.
"Blessed are they which are persecuted for their own self-righteousness' sake: for theirs is the Kingdom of "Ask Slashdot".
"Blessed are the over-eager, who believe that Open Source is a social movement heralding the rise of a new generation: for they shall not realize that There Are No Sacred Cows.
"Blessed are ye, when men shall revile you, and persecute you, and shall say all manner of evil against you falsely, for the sake of your Favorite Operating System.
"Rejoice, and be exceeding glad: for great is your reward in Heaven: for so persecuted they the prophets which were before you.
THIS IS THE WORD OF THE LORD
Also interesting is the ad I just saw for Helix(RealPlayer) and their version of Open Source code. Here's the link.
Helix just came out a few days ago, and already, it's not the best. Woohoo!
"And we have seen and do testify that the Father sent the Son to be the Savior of the World"
1 John 4:14
Woohoo! One less reason to use Windows
1p}{ 1 sp34k |33+ +|-|e|\| p30p13 \/\/il| 8e i/\/\pr3553|)
"A piece of GPL software called Media Player"
Oh, I forgot. Media Player runs under Linux, right?
...MS decide this is illegal and start suing? I mean, clearly there's the whole DMCA thing. Does this decoder ignore MS's DRM system? I would have read the article, but I don't speak C...
Real Daleks don't climb stairs - they level the building.
Sure, I'm all in favour of being able to play more movies on my linux system - even though I'm unlikely to own (m)any wmv movies...
But my question is how legal is this?
What is to stop MS attacking open source in the same way as RIAA attacked - and closed - napster?
yes, yes, one is a concept, the other is a program - but RIAA wants to make ANY file sharing program which is similar to napster illegal, and their certainly making progress toward that goal...
If a percentage of open source developers ignore the law - such as a percentage of napster users did - whats going to happen in the future?
I remember someone mentioning in an earier discussion that the WMA encoder fooled many people into thinking their encoded audio sounded "better" by applying a compressor/dynamics (6:1 ratio was it?), leaving the dynamic range 'squished' and making music sound louder (which isn't really "better"). Can anybody confirm this?
If an open version of a WMA encoder is released, it would be interesting to see how it would perform versus the MS encoder in this respect.
--
Maciek
-- Maciek
Could someone explain what WMA has to do with Divx?
A big advanage this offers is the ability to now hear content from scores of websites that selected WMA as their audio format of choice - all without needing Media Player.
Did I mention I dislike that program?
That what was all this school was for... to teach us how to solve our own problems. -- janeowit
Unfortunately, how long will it be before MS "improves" WMA encoding now? I think it is an unsafe target decoding MS files as they can change everything and you are back to development.
However, with MS new licensing and the fact that most tools are fairly robust. You might grab share if you can record and playback. Though with examples like Star Office I wonder how much grabbing you would do.
WMA is the highly proprietary audio codec M$ is pushing...
How long before M$ decides to file a suit against the developers of such to get their code locked down and buried? Bets, anyone?
Be excellent to each other. And... PARTY ON, DUDES!
Every time there's a Microsoft-related story on /., I think of this comic. It would do many of you well to read it, and reflect upon it...
- 07 -22
http://www.penny-arcade.com/view.php3?date=2002
It just has a new brother. Similar projects can exist without rendering others obsolete, that is one of the beauties of open source.
Kindness is the language which the deaf can hear and the blind can see. - Mark Twain
Does this decode the latest version of WMA files? What does it do about/with the DRM component of such files? And in consideration of this, will MS use the DCMA (or some "you must have agreed to the EULA not to reverse engineer if you've ever downloaded a WMA file in your life" argument) to shut this effort down?
Is this licensed from Microsoft? If not they can pull this as being a violation of several things. Though id imagine they will wait until more people use it, so its harder to switch to another format, thus moving a few more towards Windows solutions.
---- Booth was a patriot ----
Note there isn't any encoder yet, but who would like to encode into WMA while we have better and more open solutions?
I don't get it, on one hand the poster is trumpeting the availability of the WMA codec and on the other hand he's wondering why anyone would want WMA in the first place ? If WMA is so redundant/inferior as he suggests, then why does ANYONE need WMA or hacked/reverse engineered WMA codecs ? Why would this thread be interesting at all ?
If WMA availability is interesting, then as far as I'm concerned this means that the ability to encode WMA must be desirable to at least some people, as well.
the silenced black helicopters of M$'s strike team starting to lift off with balmer leaning out the side of the lead one doing the monkey dance to inspire his Crack Team of Black Ops Lawyers to victory in the inevitable DCMA suit they will bring against this project
the key word is propreitary
Comment removed based on user account deletion
Can this source code be subjected to DMCA?
Can its author be sued for reverse engineering?
Is it planned that DRM features will be added at some point, or the above applies..
have you been defaced today?
This is presumably a decoder compatible with the classic "WMA" codec. This bitstream was locked down with WMA2, although they have made progressive enhancements to the encoder all the way through WMA9. It's really a very good codec for stereo 44.1 16-bit kinds of applications.
.wma files out there today, although that percentage might start dropping as WMA9 Pro gets traction. It is certainly a welcome effort!
Not that there are two NEW WMA codecs introduced in Windows Media 9 that aren't backwards compatible.
WMA 9 Professional aims for higher bitrates (48-768 Kbps) and multichannel (stereo with matrixed support or six discreet channels). And it can do deeper than 16-bit. If the old WMA was a competitor to MP3, WMA9Pro is a competitor to AC-3/Dolby Digital. And like WMA v. MP3, it has about a 50% advantage on compression efficiency.
There is also WMA9 Voice, which is a really good narrowband codec. Despite its name, it does a surprisingly good job with music as well. It operates from 4-20 Kbps.
WMA9 Voice is replacing the ACELP.net voice codec, which Microsoft licensed binary code for, but doesn't have the source code. Thus they couldn't get it for MacOS X or PocketPC.
Anyway, this decoder should handle 95% of the
My video compression blog
"With this new codec, ffmpeg really proves itself"
:-)
Surely this is a "dec", not a "codec". A codec is a Coder/Decoder, and what they've got here is just a Decoder
If intelligent life is too complex to evolve on its own, who designed God?
this will free us from the ugly DLL hacks required to play DivX until now.
For the teensy-tiny almost insignificant minority of DivX files w/ WMA audio. Typically DivX (films especially) are encoded w/ mp3 audio.
We're long since divorced from using the win32 DLL's to play DivX files, which are most often mp3 audio -- hell we've even had at least 3 NATIVE alternatives for mpeg4 video (ffmpeg/libavcodec, divx4linux, xvid). In the rare case that WMA audio is in a file (think REALLY out of touch media site creating this thing the MS way), this does save us from using the win32 codecs.
By licensing the CODEC under the LGPL, the authors are preventing Microsoft's competitors from publishing improved versions that might give BillG a run for his money. If Microsoft is to face some real competition, it's best to empower its competitors. Why not use an MIT-ish license, as does Ogg Vorbis?
... that this is just the opening shot of a file format (a la M$ Word) or application-checking scheme (a la AIM) war between M$ and this app's developers. Even if you can force everyone to use your file format, you can't TRULY own the space until everyone has to use your app to read the file as well.
Laws affecting technology will always be bad until enough techies become lawyers.
What "GPL" is that? The Goatse Public License? It certainly isn't the GNU Public License. Crap like Windows Media Player would never be released under a sane license like the real GPL.
i want an open source video app for win98
C_O_N_V_E_R_S_I_O_N
conversion!! Yay!
adafdgfl fnklsfkw kdnelwk kjn bkdebkldla bdkwbnkwe
That was classic intercourse!
Is it just me or is that decoder an order of magnitude smaller in terms of LoC than mp3/Vorbis decoders?
Sorry to be picky but it's a decoder not an encoder/decoder (codec). Mark
I presume this is a sign that .avi files with wma or ABR mp3 tracks, or maybe ac3 tracks are pretty much entrenched now in terms of market? First mp3 becomes entrenched and now this? .avi is a poor container format (vbr prohibited, for example). DivX is decent, but not really a 'standard'. It may be MPEG-4 compatible/complete (I have no idea), but the FourCC code on those files is 'DIVX', and that represents a non-standard approach. Of course, the FourCC is only relevant in .avi and something easily faked in alternative encoders, but it just irks me...
.Ogg container over .avi, or quicktime, or, best yet, the official standard container format of MPEG-4 (which, if not identical, is highly similar to quicktime 6 and/or the .divx format (does anyone use that at all?). Was there an audio MPEG-4 codec to go with the video and container, or would Vorbis audio be the best option?
And CBR mp3 audio... ick... maybe it replicates the bug and plays VBR mp3 audio, but still, doesn't mp3 only support two channels?
I would love to see the proliferation of something much more elegant. Say 'MPG4' FourCC (if you must).
XML is like violence. If it doesn't solve the problem, use more.
How long do you think it will take for MS to change the codec and force everyone to update their media player to support it. Kinda works to their (MS's) advantage.
Don't get me wrong. I still think its a great accomplishment.
The project from what I see is mostly (if not all) done by non-Americans. So the DMCA does not apply to these people, nor to more than 99% of the countries in the world.
Sure, it's hosted on sourceforge servers, which I assume is located in the US, but hosting can be obtained elsewhere just as easily.
So quit naysaying and just accept the fact that not every open source project is an attempt to defile MS's (or the American legal system's) supremacy.
Welley Corporation - SLM Scammers
I'm sure I remember a /. article from someone who was closed down by Microsoft (read: sent threatening letters) for attempting to produce a WMA decoder. The argument then was that the WMA format was covered by various patents.
What's to stop the same thing happening to this one?
It should be pointed out that if this library uses software patents which charge royalties it is technically NOT Free Software.
were you expecting to see a sig here? perhaps you'd rather see the inside of an ambulance!
Only DivX 3.11 was a hacked Microsoft coded.
4.0 and onwards were developed from scratch.
Where GPL means Geekless, Proprietary, Licensed
There are LOTS of radio stations out there whose streaming version is WMA only...how easy will this be to make usable by xmms so that I don't need a Windows box to listen to said stations?
Are they sure that this isn't covered by a patent? I remember almost two years ago that VirtualDub had to remove support for ASF files because Microsoft had a patent on some part of it. The VirtualDub guys just removed support rather than fight MS. I hope this doesn't turn out to be the same situation.
Prevent email address forgery. Publish SPF records for y
A while ago I was going to switch all my WMAs over to MP3 format (Acid doesn't like WMAs as input), but when I went into Nero (which can decode/encode multiple files with one command) it said that it's not allowed to decode WMA files - something about Microsoft saying it's bad.
Have any of you seen this?
I [may] disapprove of what you say, but I will defend to the death your right to say it.
The only pitty is that there are no real stable interfaces to the library, which makes a lot of projects to statically link the libraries :(
:X Oh well, that's what makes life (and coding) interesting of course ;) -and trying to capture possible problems with m4 macros >:)-
We changed the upstream sources a bit to provide libavcodec and libavformat as shlibs and started using dynamic linking.
As long as ppl use the sources provided with the debs and compile, no problem, but it's hacking time again when someone gets a CVS release
Genius doesn't work on an assembly line basis. You can't simply say, "Today I will be brilliant."
This means that creating WINE is not the same as trading mp3s, and it's not the same as creating a trading ground for mp3s. They are not even closely related.
Repeat after me: DeCSS, kid in jail.
Hell, I agree with you, but the fact is that we have to stop thinking logically and start previewing how they will try to abuse us.
I'm afraid that a free WMA decoder promotes Microsoft standards, instead of promoting the use of open standards.
I think it would actually be better to never make anything else than OGG decoders to conquer the push from software giants.
Also, would be nice if you linked up to www.xvid.org, that also is free.
Height: 38U, Weight: 0 Newtons, Eyes: #0000FF, OS: Gray Matter 1.0 (Alpha)
I think that's even worse. Is it difficult being slightly out of sync with the country? I can see it being convenient and pleasant inside the confines of Indiana, but whenever you have to call someone or whatever, it might be irritating.
I don't want to start a flame war there but did you know that:
* FFmpeg was started by a french group (maybe just a french guy)
* DivX was invented by a french guy
* another beautiful player, VideoLAN, is made by a French group
As the french say, "we might not have petrol in France, but we have ideas".
Artaxerxes
I'm just curious as to why people use WMA. I bought a MP3 player a few months ago that supports WMA. Care to guess how many times I've played WMA files on it? (Enjoy your donut :) )
Since I have little experience with it, are there really any advantages WMA has over MP3 or Ogg? Or is it just another necessary evil that Microsoft is trying to force on users? Do websites use it because they think it can't be "stolen?" Seems like most of the sites I frequent who need a "secure" stream use Real media.
Anyway, what I want to know is, will WMA become a dominant standard (thru M$'s normal guerilla tatics) or will it keep floating around out there with the other second-string formats? I would noramlly guess the latter, but this new decoder makes me ponder. Would WMA without DRM be better than current formats?
Correct. The bitstream was locked down with WMA2, so WMA9 encoded content will play back just fine to that decoder, and presumably the new open source version of it.
My video compression blog
With all the discussion of is this or isn't this a patent/lawsuit problem, it seems an important question is being missed. How did they make the (co)dec? The article itself doesn't mention it and short of digging into their dev site, I don't know how to figure that out. Anyone involved with the project care to share?
I can think of two very different ways to get at it. Try and dig the decoder out of MS code or give it a bunch of training files and tweak the decoder until it sounded right. (ouch that sounds like a painful project) If the latter, then I don't really see how there could be any sort of lawsuit issues, unless there's a EULA problem (can't use WMP in developing competing software or something). It's a bit reminiscent of the Samba approach. Also, without a encoder, (IANAL) you shouldn't run into problems even if the wma format itself is patented.
I wonder if someone will make a XMMS plugin to play wma files now. That would be cool. I gave in to the darkside awhile back when I purchased a 64 Meg portable music player -- and converted a bunch of my CD's to WMA for size VS. performance reasons (a 64K WMA sounded better to me than a 64K mp3). THe only problem being now I have 4 CD's worth of WMA's that are only playable on Windows -- and I don't have a windows partition anyomore. So at least for me -- this sounds like a good thing.
(+1 Funny) only if I laugh out loud.
Xine: http://xine.sourceforge.net/
Well, actually, that makes 99,47916 % of the world... ;-)
Which also means 95,387877 % of the world's population.
check this and this
Animoog.org
Microsoft was successful in preventing an implementation of the ASF file format from being used by virtualdub. This seems to be a parallel issue, since both ASF and WMA are patented.
----------------- "I have a bone to pick, and a few to break." - Refused -------------------
.wmv and .wma "continaers" allow for and (finally) support VBR encoding. Were not trying to compare current Linux tech to 10 yro MS tech again are we?
Since encoding using Vorbis for audio was mentioned in the article, anyone use Vorbis for their audio tracks? I've been ripping using .avi with mp3 audio for my DVD collection, and have wanted to use Vorbis one way or the other. When I tried to substitute vorbis audio into the avi instead of the 'throw away' mp3 track I generate (using mencoder), the result won't play under anything I've got. When I used ogmtools to try to merge the .ogg audio and .avi video into an ogg container, it plays, but doesn't keep a/v sync. I don't care about how few people can play it, so long as *I* can play it and have it look and sound good....
The ideal for me would be to have a single container with MPEG-4 video, Vorbis Audio, and, if at all possible, embedded subtitles in some form or fashion as a separate overlay track/text.... That can be produced in Linux...
XML is like violence. If it doesn't solve the problem, use more.
That depends on what you mean by "lookalikes".
The wheel is turning, but the hamster is dead.
The best way to deal with Microsoft and the people who go along with them is to not do business with them. If someone only wants to offer content encoded with WMA, then I don't want to do business with them.
Just show some self-control and free will.
Capitalism works !
You are, in fact, able to use LGPL ('lesser'/new version) code in a commercial, closed source, application.
Here is the evidence:
This verbiage describes that you can link a LGPL library with a "work that uses the library" (i.e. your proprietary code), given that you clearly refer to the copyright of said library and its license in your program. Also described, are five actions, one of which must be undertaken with distribution of the combined work. These actions are designed to guarantee the 'unbundling' of the LGPL work from your proprietary work, such that all the rights of the LGPL granted to a user of the LGPLd code are preserved when used with your work.
Here, the requirements for distributions of an executable containing LGPL code is clarifed to indicate that you are required to include all files and data needed to recombine the LGPL library with the rest of a proprietary executable. This means, simply, that a distributor of such executable (LGPL+Proprietary code) is required to make it easy to recombine the LGPL library with their executable. With modern linkers & object management utilities (hell, even old linkers & object management can do this), all you need is a partially stripped .o or .a file.
This paragraph ALSO states that you do not need to distribute components that are distributed with major (2nd important note:this is not the same as 'core') components of the operating system, unless such a component is or is attached to the executable. This excuses you from having to distribute a complete compiler toolchain with your LGPL+Proprietary executable. Make sure to note that this also does not specify licenses/combinations under which those major components are distributed. It is enough that such components are readily available. The LGPL would be a document several times longer if it had to specify each exemption here. (compiler, binutils etc.)
This paragraph states that the requirements of this Section may contradict with the requirements of other licensed code in your software. Most (closed-source) software licenses say that you can restribute the object code for their libraries if they are compiled into your application. For dynamically linked libraries, this is simple. For statically linked libraries, you can do your due diligence in upholding your requirements to the owner of licensed code with, once again, judicious use of strip.
I believe this covers each of your primary objections to use of the LGPL, including your claims that to meet the obligations of the LGPL would be a death setence (read: trivial reverse engineering) of your software.
It is true that the LGPL requires one to perform some contortions to distribute closed-source software that uses LGPL code, but it does not require you to open your software. The only requirement is that you preserve the rights that the LGPL grants to LGPLd code.
Does this answer your worries about the use of the LGPL?
Moderators, what are you smoking?
:)
Parent is barely interesting, AND offtopic.
This is a flamebait, not a troll. And offtopic as well. Moderate accordingly.
My local Unix Users Group has been using this encoder to stream our meetings over the web (in asf format) for months. It works really well, but the only stream we've gotten to work is asf. Mpeg and others don't work on the client side.
Winamp Plugin.
Using this library to build a standalone WMA decoder plugin that doesn't use the system libraries (and hence, isn't obnoxious about where it will output too) would be really really nice, especially after MS told Nullsoft to cripple their system library one.
ffmpeg is great for video streams, and even sound streams. Just don't try doing both at once.
I have had *zero* luck trying to get the audio track to sync with the video, even at insanely low resolutions (eg half PAL) with no frame drop. Different combinations of different codecs make little difference it seems.
The FAQ even says so:
4) I get audio/video synchro problems when grabbing.
Currently, the grabbing stuff does not handle synchronisation
correctly. You are free to correct it. It is planned to fix it ASAP
So IMHO, ffmpeg as it stands is completely useless as an audiovisual grabber.
"Nine times out of ten, starting a fire is not the best way to solve the problem." - my wife
I'd give you a hug and a kiss, but you know. ;)
Just one question, what kind of commercial or other redistribution licenses surround WMA? Do Microsoft have any patents or such, or any Thompson like asking as to pay for selling a decoder or using a decoder in commercial software, or were they 100% free on this? (Yes, I know, nothing from Microsoft is truely free.)
Slashdot - Where else can you get the highest score, be labelled informative and yet, still be totally wrong? (;-]
ffmpeg still can't get audio sync right when re-encoding the output of a long lavrec encoding session. On the things I've tried it for the video frame rate is about 4% out. I know I could probably fix it with the right tool (avifix?) but I just can't be bothered (to do so again...)
Linux still sucks as a video editing platform (said by someone who's used nothing else for the last 5 years).
What an excellent advance! I've been using Mplayer to play WMA audio as well as streaming WMA/ASF Audio for quite some time now. Even though it has the "ugly DLL hacks", it works nicely, but I would much rather see a plugin (perhaps using the new piece of code) so that everyone can enjoy it with XMMS. Is there already an XMMS input plugin already available that allows the playback of WMA audio (preferrably using the new code that is free from WINE/DLL hacks) and possibly WMA streaming audio (mms:// and http://?).
If there is no encoder, it's not a codec, it's just a dec. Some literacy, please.
http://about.me/paultenny
Are they sure that this isn't covered by a patent? I remember almost two years ago that VirtualDub had to remove support for ASF files because Microsoft had a patent on some part of it. The VirtualDub guys just removed support rather than fight MS. I hope this doesn't turn out to be the same situation.
Let's hope the developer who did the WMA portion of the code lives outside of the United States and is not an American citizen. Then MS could basically take their patent and shove it, and the ffmpeg stuff can simply have a compile time option to leave out patented code, a la PGP.
Of course, no one in the United States *cough* would ever compile the patented code. That would be illegal.
The Future of Human Evolution: Autonomy
The EU is in the process of giving in to the mega--multi-euro film&music industry as well.
INFOSOC in English
That'll be the end of legal reverse engineering in the EU as well.
-- From Denmark
You want FFMPEGREC from the nvrec package for that. Perfect A/V sync, with ffmpeg power/speed (all ffmpeg codecs seem to be supported)
Wenn also die KDE-Arbeit nochmal gemacht wird bei GNOME, hat das die
Entwicklungszeit für ein freies Desktop-System verkürzt. Hast Du auch
irgendwo die passende Algebra zu der Rechnung?
-- Sascha Ziemann in de.comp.os.unix.linux.misc
- this post brought to you by the Automated Last Post Generator...