The Source for Java Technology Collaboration
User: Password:



Jonathan Simon

Jonathan Simon's Blog

Sun's MP3 Plugin released!

Posted by jonathansimon on November 11, 2004 at 04:19 PM | Comments (17)

Got an email from the former JavaSound team (i.e. Florian) mentioning that Sun finally got their acts together and released an MP3 plugin.

Apparently, it works with JMF as well as JavaSound. Apprently, this was blessed by Sun as they solved whatever legal issues were pressing.

http://java.sun.com/products/java-media/jmf/mp3/download.html

Rock on! Granted I don't think this should have happened in the first place, but that's a whole nother blog. Meanwhile I expect to see alot of hip MP3 apps coming out!


Bookmark blog post: del.icio.us del.icio.us Digg Digg DZone DZone Furl Furl Reddit Reddit
Comments
Comments are listed in date ascending order (oldest first) | Post Comment

  • Do you know what its benefits over JavaLayer are? Also I don't think "alot of hip MP3 apps" will be coming out, if anyone wanted to make a hip MP3 application for the past few years, they could've used JavaLayer.

    Posted by: keithkml on November 11, 2004 at 07:12 PM

  • Do you actually have it working? When I try to install it, I'm getting[tonberry:~] cadamson% java com.sun.media.codec.audio.mp3.JavaDecoder
    java.lang.reflect.InvocationTargetException
    Registered succesfully...and JMF is still barfing up:Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo,
    LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
    Failed to realize: com.sun.media.PlaybackEngine@12dd76
    Error: Unable to realize com.sun.media.PlaybackEngine@12dd76
    Failed to realize: input media not supported: mpeglayer3 audio

    Posted by: invalidname on November 12, 2004 at 12:48 PM

  • I've got the same result with invalidname:
    java.lang.reflect.InvocationTargetException
    Registered succesfully

    Afer I run java com.sun.media.codec.audio.mp3.JavaDecoder

    What's wrong with that?

    Posted by: jaredhsieh on November 12, 2004 at 05:15 PM

  • I can't believe it . I just spend a week of my free time writing a jmf codec to wrap around javalayer...
    If only they had released it last week it could have saved me A LOT of time. Well looking back it wasn't that hard the main part being to create an InputStream that you can feed bytes to. However if this plugin isn't quite working right now I'd be glad to publish my code. It was a very educational tough to write a plugin, It made me learnt (the hard way) a lot about JMF.

    Posted by: sat1196 on November 13, 2004 at 09:31 AM

  • I think it's very important to note that Florian followed his announcement up with a reply to someone saying:

    As far as I know, Sun will not include MP3 support into the JRE, mostly because it would require a separate license to click through during installation.

    You should also note that there is no provision in the licensing of the plugin allowing you to distribute it. In fact, it very specifcally states several times that it is only granted for "internal use".
    I believe this means that, should you want to distribute an MP3-playing app that uses this plugin, every user will have to download the plugin from java.sun.com in the standard non-user-friendly manner. Hurrah.

    Personally, I'm hoping they put OGG Vorbis support in the JRE. : )

    Posted by: grlea on November 14, 2004 at 04:18 PM

  • This mp3 plugin can not work on the Mac OS X platform. :-(
    It can not support playing mp3 on JMF, either.
    Further more, it won't detect the STOP event for the LineListener, which I tried for a whole day, for an urgent project... Finally I changed back to my original mp3 plugin, MP3SPI, and it just works... really wasting lots of unnecessary time to test it.
    Maybe it is better to say so if it supports ONLY on a certain platform.

    Posted by: jaredhsieh on November 15, 2004 at 05:03 AM

  • OK.

    Apparently, Sun botched again. My appologies for not testing before posting, but I like to disseminate this information quickly.

    From the feedback, this definitely looks ridiculous... Single platform support is a joke. And making users download the plugin separately is a sure way to unsure people won't use it.

    The fight continues...

    Posted by: jonathansimon on November 15, 2004 at 06:47 AM

  • It API works fine, but not with all MP#. Some files works, some others not, even with JMStudio.

    Posted by: dmvermes on November 16, 2004 at 08:28 AM

  • As I pointed out, the way this has been released is far from ideal - in fact, it's almost useless.

    However, I really don't think we should be saying "Sun botched again" on this one.

    From the little I understand, the restrictions on the (patented) MP3 technology are rather harsh, and I think Sun has probably had to work quite hard to even get themselves to a point where they can release this plugin in the manner they have. So I, for one, am willing to forgive them for the state of this at the moment, as I suspect it's probably not their fault.

    Now, we know (urrr... assume?) Sun aren't stupid. Everyone under 60 knows how popular MP3 is and I'm sure Sun know that it would be a huge boost to Java on the Desktop if they can get MP3 support into the JRE. Whether it's possible to eventually broker a deal to do this remains to be seen, but this plugin shows that they're obviously putting some resources into moving in that direction, which I think is great.

    Posted by: grlea on November 16, 2004 at 03:26 PM

  • Just to let you know that JLayer (former JavaLayer) supports MPEG1/2/2.5 Layer1,2,3. MP3SPI, based on JLayer, is a JavaSound 1.3+ plugin that provides ID3v1 + ID3v2 + SHOUTcast meta-data support. Next release is planned for January 2005 under LGPL (instead of GPL).

    The SUN plugin seems to support MPEG2 Layer 3 only.

    -- JavaZOOM Team

    Posted by: javazoom on November 19, 2004 at 09:03 AM

  • You've had some points, Sun's plugin is not perfect:

    indeed, the plugin needs to be downloaded separately from java.sun.com
    it doesn't support all flavors of MPEG audio layers
    it does not parse id3 tags and the like


    But, consider these facts:

    for Java Sound, it was tested extensively on thousands of random mp3 files
    for Java Sound, it was designed to be 100% compatible with MP3SPI (for example it works with jlGUI)
    for JMF, it is the exact same plugin that used to ship with JMF, so apps that used the old JMF plugin should work the same
    Sun's plugin is twice as efficient as javalayer, processor usage is half of javalayer
    Sun's plugin is legal.

    Posted by: bomers on November 23, 2004 at 10:57 AM

  • Oh, regarding jaredhsieh's comment:

    Sun's plugin is pure Java. It works on all Java platforms
    a decoder has nothing to do with LineListener events.
    it works with JMF. Make sure you register it for JMF!


    Florian

    Posted by: bomers on November 23, 2004 at 11:57 AM

  • For those of you worried about getting the error:


    Unable to handle format: mpeglayer3, 44100.0 Hz, 16-bit, Stereo,
    LittleEndian, Signed, 16000.0 frame rate, FrameSize=32768 bits
    Failed to realize: com.sun.media.PlaybackEngine@12dd76
    Error: Unable to realize com.sun.media.PlaybackEngine@12dd76
    Failed to realize: input media not supported: mpeglayer3 audio


    Adding com.sun.media.codec.audio.mp3.JavaDecoder as a plug-in
    in Plug-Ins-->Codecs in JMFRegistry seems to do more than simply registering
    with java.

    Posted by: phood99 on December 19, 2004 at 04:30 PM

  • OK, I tried reinstalling and ignored the error. I find that JMStudio can play local MP3 files, but a simple JavaSound application cannot. It throws the exceptionjava.lang.IllegalArgumentException: Requested value -1.0 smaller than allowable minimum value 0.0.
    at javax.sound.sampled.FloatControl.setValue(FloatControl.java:182)
    at com.sun.media.sound.MixerClip$MixerClipSampleRateControl.update(MixerClip.java:918)
    at com.sun.media.sound.MixerClip$MixerClipSampleRateControl.access$400(MixerClip.java:885)
    at com.sun.media.sound.MixerClip.implOpen(MixerClip.java:472)
    at com.sun.media.sound.MixerClip.open(MixerClip.java:161)
    at com.sun.media.sound.MixerClip.open(MixerClip.java:249)
    at CoreJavaSound.(CoreJavaSound.java:39)
    at CoreJavaSound.main(CoreJavaSound.java:17)Also jicyshout plays Live 365 "this is a subscription-only channel" or "please login with your live365 account" announcements perfectly, but totally mangles audio on free shoutcast servers--Chris (invalidname)

    Posted by: invalidname on February 04, 2005 at 09:20 AM

  • Oops, my bad. I just discovered an old version of JMF in my classpath, from back when JMF came with MP3 support by default. After updating to JMF 2.1.1E and trying to install this... I still can

    Posted by: invalidname on February 04, 2005 at 10:07 AM

  • Oops, my bad. I just discovered an old version of JMF in my classpath, from back when JMF came with MP3 support by default. After updating to JMF 2.1.1E and trying to install this... I still cannot play MP3 at all. Sorry for the mess.

    Posted by: invalidname on February 04, 2005 at 10:08 AM

  • Now this is interesting. I've been trying to catch the InvocationTargetException, but even in jdb with catches and breakpoints set on the ITE constructor, the app just terminates. But just once (maybe I was in verbose or something?) I saw it iterating over methods right before the failure.So, acting on that hunch, I installed the non- performance pack version of JMF on my emulated WinXP box, on which I'd never installed JMF. My hunch was that the MP3 installer was looking for a method call that would be in performance packs but absent from the all-Java version.Bingo. I got the InvocationTargetException on Windows too.-Chris (invalidname)

    Posted by: invalidname on February 06, 2005 at 07:57 AM





Powered by
Movable Type 3.01D
 Feed java.net RSS Feeds