Slashdot Mirror


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."

30 of 245 comments (clear)

  1. Interesting. by FreeLinux · · Score: 4, Informative

    Also interesting is the ad I just saw for Helix(RealPlayer) and their version of Open Source code. Here's the link.

  2. How long before... by meringuoid · · Score: 4, Interesting

    ...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.
    1. Re:How long before... by Anonymous Coward · · Score: 4, Interesting

      It's been previously established that ignoring is not the same as circumventing.

    2. Re:How long before... by rodbegbie · · Score: 5, Informative

      As far as I can tell, this code doesn't deal well with protected WMA content. Attempts to convert some of the 30-day-licensed WMA files available to download from winamp.com proved fruitless.

      I do not claim, however, to know what the hell I'm doing. This was just my first attempt.

      Anyone know any differently?

      rOD.

      --
      Rod Begbie done this, and he's not
    3. Re:How long before... by Reality+Master+101 · · Score: 5, Insightful

      How long before... ...MS decide this is illegal and start suing?

      How about sometime after Microsoft actually uses a lawsuit as a weapon? Microsoft has zero history of suing people who write lookalikes of their software (Samba, WINE, That NT-workalike project, etc).

      Apparently, you're thinking of Apple who really is truly evil when it comes to suing people.

      --
      Sometimes it's best to just let stupid people be stupid.
    4. Re:How long before... by NanoGator · · Score: 5, Interesting

      "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...
      "


      Anybody remember when VirtualDub could work on .ASF files...?

      Here is a short blurb talking about it.

      --
      "Derp de derp."
    5. Re:How long before... by FreeUser · · Score: 5, Interesting

      How long before... ...MS decide this is illegal and start suing?

      How about sometime after Microsoft actually uses a lawsuit as a weapon? Microsoft has zero history of suing people who write lookalikes of their software (Samba, WINE, That NT-workalike project, etc).


      Well, that is true only to a point. In fairness to Microsoft, they haven't filed any such lawsuits, but they have used the threat of lawsuits on more than one occasion, and while they haven't dealt with look-and-feel per se, they have dealt with other equally inane things, like file format compatability. Certainly Microsoft has reserved the option to (mis)use lawsuits strategicly against Free Software in the internal Halloween documents leaked a few years ago.

      Apparently, you're thinking of Apple who really is truly evil when it comes to suing people.

      Both are evil, in different ways. However, I believe you are correct in pointing out that Apple is the one which went beyond mere intimidation, to actually filing (and losing) lawsuits based upon mimicknig look-and-feel.

      Which is why, much as I like some of Apple's products (and will almost certainly make Apple my next laptop), I am also at pains to point out that anyone switching from Windows to Apple is simply trading one Master for another, and who is to say that the kinder Master today will be the kinder Master next year?

      Of course, with Palladium on the horizon, we may well find ourselves in the extraordinarilly ironic situation where we need to buy a non-Intel, non-AMD (e.g. Apple PowerPC) system just to be able to dual-boot into Linux. I suspect instead most of the Asian hardware companies will ship with two BIOSes, so that a simple jumper or firmware setting can completely eliminate Palladium, but who can ever be certain in these unusual times?

      --
      The Future of Human Evolution: Autonomy
  3. Is this REALLY a good thing? by GnomeKing · · Score: 5, Interesting

    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?

    1. Re:Is this REALLY a good thing? by benwaggoner · · Score: 5, Informative

      Do note this is only the audio codec. While there are already decoders for the older MS MPEG-4vX codecs, most .wmv files will use the Windows Media Video codec, which AFAIK don't have any kind of open source solution.

      This is mainly useful for playing .wma files.

    2. Re:Is this REALLY a good thing? by GauteL · · Score: 5, Insightful

      I'm sorry if this post comes out as a flame, but repeat after me:
      "Creating a compatible interpreter is not the same as pirating software"

      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.

      I do not know how often people post things like this. RIAA attacked and closed Napster because they created a trading ground for mp3s. WINE and ffmpeg is creating an implementation of the Win32-api and WMA-decoder respectively.

      There are however TWO ways that this WMA-decoder might be illegal:
      1. It might be breaking the DMCA, by reverse-engineering or by circumventing DRM. I do not know if this might apply though.
      2. It might be a breach of some software patent in WMA.

      It has _nothing_ to do with the napster situation however.

    3. Re:Is this REALLY a good thing? by colinleroy · · Score: 5, Insightful

      IANAL, but there are laws in France (where ffmeg's main developer lives) that allow reverse-engineering programs to achieve interoperability, when no other ways (like documentation) can be used. RIAA and DMCA and such are non-valid in France, too. Given that and the fact that WMA is 100% undocumented, i guess Microsoft can't do much about this.

      --
      blah
    4. Re:Is this REALLY a good thing? by benwb · · Score: 4, Funny

      You get audited every year for the rest of your life for being "too smart for your own good."

    5. Re:Is this REALLY a good thing? by Rich0 · · Score: 5, Funny
      1. It might be breaking the DMCA, by reverse-engineering or by circumventing DRM. I do not know if this might apply though.
      Simple fix:

      In config.h:
      #DEFINE DMCA_COMPLIANT

      In drm.c:
      #include "config.h" ...
      #ifdef DMCA_COMPLIANT
      if (DRM_enabled && DRM_no_rights) dontplay;
      #endif

      In FAQ.txt
      75. Can I comment out the #define DMCA_COMPLIANT flag?

      Nope - you can't do that. It would make you a VERY BAD person...

      Gotta love open source... As distributed it is completely DMCA compliant and DRM enabled.
  4. Quality "Enhancements" by __Maad__ · · Score: 5, Interesting

    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
    1. Re:Quality "Enhancements" by __Maad__ · · Score: 5, Informative

      Actually no.. I suggest you read up on dynamics before you just knee-jerk like that.

      Adding compression is along the lines of adding an effect, it has nothing to do with perceptual coding. Compression doesn't always make music sound better. It can result in a muddy mix, or, sometimes, outright destroy a mix. Sure it makes pop rock sound better, and really loud and overpowering like FM radio.. But it's a little annoying when the volume on your Mozart or selected ambient works 2 is pumping up and down with every single sound. The subtlety in the original mix is lost. Other perceptually coded formats leave this component of the audio alone, and let the original producer decide what sounds right.

      --
      Maciek

      --
      -- Maciek
  5. Re:How does this relate to Divx? by Clue4All · · Score: 5, Informative

    Very simple. DivX uses an audio codec to encode audio. A large number of DivX files use mp3 for audio (ogg is also possible, though not many players support it), and the rest use wma. Now, you won't need the /usr/lib/win32 directory full of Microsoft DLL's in order to play those Invader Zim episodes encoded using wma audio, assuming players take up this code. You could always re-encode them into mp3 audio at a greater loss of quality, but I like this solution better.

    --

    Is your browser retarded?
  6. Liability? by m0i · · Score: 5, Interesting

    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?
  7. The Many Flavors of WMA by benwaggoner · · Score: 5, Informative

    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.

    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 .wma files out there today, although that percentage might start dropping as WMA9 Pro gets traction. It is certainly a welcome effort!

  8. That's a Dec by nickovs · · Score: 4, Funny

    "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?
  9. Uggg... by Junta · · Score: 5, Insightful

    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...

    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). .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?

    --
    XML is like violence. If it doesn't solve the problem, use more.
  10. Why All this talk about DRM/DMCA? by MoThugz · · Score: 5, Informative

    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.

  11. Isn't the WMA format patented? by Anonymous Coward · · Score: 5, Interesting

    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?

  12. DivX Not Hacked MS Codec by puppetman · · Score: 4, Informative

    Only DivX 3.11 was a hacked Microsoft coded.

    4.0 and onwards were developed from scratch.

  13. Patent problems with this? by FattMattP · · Score: 5, Interesting

    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
  14. Re:Truly great! by gowen · · Score: 5, Insightful
    For future stuff yes, but for stuff alreay encoded this is magic code
    Plus, WMA has been pushed hard for embedded devices, and changing the codec to make old decoders non-operational -- especially not-easily-updatable firmware -- would make them extremely unpopular with music hardware vendors.
    --
    Athletic Scholarships to universities make as much sense as academic scholarships to sports teams.
  15. stable interfaces by den_erpel · · Score: 4, Interesting

    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 :(

    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 :X Oh well, that's what makes life (and coding) interesting of course ;) -and trying to capture possible problems with m4 macros >:)-

    --
    Genius doesn't work on an assembly line basis. You can't simply say, "Today I will be brilliant."
  16. Re:Why not MIT X license instead of GPL? by Eric+Seppanen · · Score: 4, Insightful

    The key difference is that it would be a good thing for the Ogg Vorbis format to spread and become as widely used as possible. Nobody really wants to sees WMA become any more popular; it's best to just offer basic functionality for *nix systems that wouldn't otherwise have it. It's a tight balance: trying to make the free system better without giving any more power to the secret format gods.

    --
    314-15-9265
  17. Re:How does this relate to Divx? by FooBarWidget · · Score: 5, Informative

    DivX has nothing to do with WMA. DivX is a video codec, WMA is an audio codec.
    DivX ;-) (with the smiley, also known als DivX 3.11) was a hacked version of MSMPEG4v3 (there were also hacked versions of MSMPEG4v2 around, but they aren't called DivX and are incompatible with v3). Although MS calls it "MPEG4vX", they are really incompatible with MPEG 4.

    AVI has also nothing to do with DivX and WMA, it's just a container format. It just happens that some AVI files contain DivX video and WMA audio, but it may just as well be Indeo video with MP3 audio or whatever. You can put video and audio made in almost any codec in an AVI container.
    Because DivX and WMA have nothing to do with AVI, you can, for example, also create Ogg files that contain DivX video with MP3 audio, Theora video with WMA audio, etc.

    AVI is old, very old, and it should be replaced. No error detection, not streamable, difficult to support VBR codecs, etc. I hope one day, people will just stop encoding AVI files and switch to Ogg for MCF instead.

  18. Re:Question: Why WMA? by Brett+Glass · · Score: 4, Insightful
    The answer to this question is simple. Many streaming media sites use Windows Media because the server is given away for free and does not limit the number of streams you can serve (unlike RealNetworks' products, where you pay by the number of streams). Webcasters, already squeezed by huge fees from the RIAA, unions, etc., don't want to pay high prices for the streaming software. So, they go with Microsoft's free server. And you, if you want to listen to their programming, must have a CODEC that lets you listen to a Windows Media stream.

    As mentioned elsewhere in this topic, the fact that the CODEC mentioned here is licensed under the LGPL is likely to prevent its use in players for some operating systems, which is a shame. Whether or not we like Microsoft or Windows Media, I think you'll agree that all authors of players, and all end users, should be able to play streams that are encoded in that format.

  19. Most complete grabber? We're in big trouble then. by Trogre · · Score: 4, Insightful

    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