Slashdot Mirror


Theora Codec Ported to Java

fons writes "These guys have ported the Theora codec to Java. This means that ANY Java-capable browser can now be used to watch video streams on the net (clients don't have to download a player!). You can watch a demo showing some boring guys sitting in the office. At least the music is ok :) On their site you can find a link to an interesting interview with the boss, and it looks like more cool stuff is coming soon."

32 of 237 comments (clear)

  1. Great! by wheels4u · · Score: 3, Funny

    Now I can watch porn everywhere!

    --
    11 1101 1011111 0100 000 110 1011111 0101 10 01 1011111 101 1 011 1011111 0 1111 11 111 1011111 101
  2. Its it just not working for me or... by Anonymous Coward · · Score: 5, Funny

    Was linking to a video feed from slashdot's front page a mistake?

  3. Wondering why this hasn't been done previously by Anonymous Coward · · Score: 5, Interesting

    Given all these reports that Java code can be made almost as quick as c/c++ (especially when number crunching), if not faster, why hasn't this happened before?

    Is it just that bit hackers are more comfortable in c?

    I would there would be a big benefit to having decoders/endcoders in java. On that note it would be nice if there were one defacto decoder/encode instead of ffmpg, jpegtools, transcode etc.

    Sorry for the ramblings, I guess everyone likes to re-invent the wheel ;)

    1. Re:Wondering why this hasn't been done previously by MyHair · · Score: 3, Informative

      Um, was there a stable open source video codec before Theora? IIRC, XVid didn't stabilize until fairly recently. Plus aren't there worries about patents and XVid?

      Anyway, I suspect the newness of an unencumbered open source codec has a lot to do with why this wasn't done before.

      P.S. OW! Somebody turned up the volume on the video feed! (During Aerosmith's/Run DMC's Walk This Way) I'm shocked the feed is still up. (Watching on win2k, Firefox 0.8 (yeah, need to update) w/ Sun Java 1.4.2_04.)

    2. Re:Wondering why this hasn't been done previously by fred+fleenblat · · Score: 3, Interesting

      Given all these reports that Java code can be made almost as quick as c/c++ (especially when number crunching), if not faster, why hasn't this happened before?

      Java was very slow for several years. It still suffers from a large memory footprint, and if you are processing a stream or large data set you have to be somewhat intelligent about how you write your code so as to prevent copying lots of data unnecessarily.

      In my view, it's probably more important that whatever reference algorithm is specified, that it be written so that people can read it. Then, if necessary, others can rewrite it in the same or different languages to improve it.

    3. Re:Wondering why this hasn't been done previously by badriram · · Score: 4, Informative

      Seems to load quick but it uses atleast 50% of processing power of my Athlon XP 2200. Most DIVX, WMV, MPEG files use maybe 15% processing power while showing a video.
      So it performance stills lacks, but i am still impressed that class and decoder load that quick even under slashdot load....

    4. Re:Wondering why this hasn't been done previously by gstamp · · Score: 3, Insightful

      I'm getting about 15% processor utilization on my P4 2.4Ghz. Loads really quickly and the video quality seems pretty good.

      I'd bet that a lot of the CPU utilization comes from the fact that it wouldn't be using direct draw like most players would rather than any codec issues.

      Wonder if jdk 1.5 would make a difference in CPU.

    5. Re:Wondering why this hasn't been done previously by Anonymous Coward · · Score: 3, Informative

      On the other hand, I bet that most of those other codecs you have on your machine are not straigth C/C++, but have inner loops optimized in assembly, using MMX, SSE and/or 3DNow instructions to their full extent. After all, video codecs are the main purpose why those special instructions were developed.

    6. Re:Wondering why this hasn't been done previously by j3110 · · Score: 3, Informative

      I ran top, and all my CPU usage was XFree86 and kernel. That tells me that the bottleneck is most likely ALSA/X11 calls on my system. My CPU usage hits around 50% on an Athlon XP 2100+. I'm running JDK 1.5.0.

      I bet if I used OSS, it might make a difference. It may even be sending the sound through the X11 Server for all I know.

      I'm satisfied since my Java was using 10%. Java either does, or will, use OpenGL at some point (ldd doesn't seem to think so, but Java loads all platform libraries dynamically except for a few basics, and X11 if it is being used as a plugin). Also, I don't know if the codec even bothers to support Java2D. It may be that I get 50% CPU utilization because it keeps sending X11 calls to the X server using X11 Accel. that is really old to be compatible with remote X11 servers.

      I hope this sheds a little more light into what's going on, and maybe someone that knows a bit more about Java2D and Linux/ALSA/X11 workings can make some more educated guess that I can.

      I use the NVIDIA OpenGL under Debian with the latest Debs for everything in unstable (I even have it working with Neverwinter, and get more than adequate FPS) 2.7.8 Kernel, NVIDIA's AGP driver.

      --
      Karma Clown
  4. Re: open source with mpeg-4 in Java by Anonymous Coward · · Score: 5, Interesting

    This guy has been working on an mpeg-4 and mpeg-1 Java player for several years and has said that it will be released within the month. The demos on thsi site, although basic, look promising. His Mpeg-4 video can apparently go full screen given enough cpu. The good bit? it's going open source.

  5. Cool ... but by Combuchan · · Score: 4, Interesting

    The demo on Firefox w/ XP professional (i'm at work) keylocked the machine (eg, press caps lock, no light) and it appeared completely frozen until a couple three-finger-salutes woke the machine up enough to use the Back button to get out of the page.

    I didn't hear any audio, but the video quality was wonderful. I'd love to dump Real et al. for this sort of thing--streaming media servers just tend to suck (anybody who's installed RealServer on a unix box will likely agree with me).

    Moreover, if you have any sort of secure web application that has streaming video, you can just stick this in rather than trying to wrap the same security concept around two different application servers. That alone is Very Cool.

    --
    "[T]he single essential element on which all discoveries will be dependent is human freedom." -- Barry Goldwater
  6. Compilable with GCJ? by Dr.Dubious+DDQ · · Score: 4, Interesting

    Makes me curious - at this point, apparently, what Theora most needs is optimization of the code to make it work faster.

    How optimized is this Java port of the codec, and will it be possible to compile it to 'native' code using GCJ for maximum performance?

    1. Re:Compilable with GCJ? by Teckla · · Score: 4, Informative

      Makes me curious - at this point, apparently, what Theora most needs is optimization of the code to make it work faster.

      How optimized is this Java port of the codec, and will it be possible to compile it to 'native' code using GCJ for maximum performance?

      Most of the time, Java code is Just-in-Time (JIT) compiled. Even the old MS Java Virtual Machine that comes with IE will JIT compile Java bytecode.

      That means the Java bytecode is compiled on-the-fly. You generally end up running native code.

      The latest Sun JVMs (and it's been this way for quite a while) will interpret code that doesn't get called often, but will aggressively compile code that gets called a lot. The theory is that the end result can perform better than Ahead-of-Time (AOT) compiled code.

      In a nutshell, pre-compiling doesn't offer any performance advantages.

  7. Strategy... by bogaboga · · Score: 3, Insightful
    The strategy will be to have DELL, IBM, HP and others install that java onto all desktops they sell. Then "all" mankind will be able to watch those videos. I should mention that I do not know what agreements M$ has with OEMs in relation to additions/subtractions to Windows. With that done, M$ will feel kicked in the stomach ouch...!! And the streams work. Very soon they will be slashdotted.

    BTW, I did not realize that mine was the usual FP!!

    Cb..

  8. Seriously works! by Anonymous Coward · · Score: 5, Insightful

    For some reason it seems to load faster than realplayer, quicktime or windows media player.

    I am using Java 5 RC which for me GUI program feel faster than .Net apps like RSS Bandit! Its actually a real option for anyone wanting to stream video.

    Also, please note I do feel dirty calling it Java 5...

    And nice work putting a video stream on the front page! Thats nice and considerate /.

    1. Re:Seriously works! by Lisandro · · Score: 4, Insightful

      My first thought exactly. "Holy shit, it looks better and loads faster than a Realplayer stream!". This is on my work's terminal (a PIII 800mhz with 512mb) on Opera 7, and the stream is flawless.

      Makes you notice how far Java has came peformance-wise lately. Ah, and kudos to the programmers. This is great work.

  9. Re: open source with mpeg-4 in Java by Anonymous Coward · · Score: 4, Informative

    You can see an mpeg4 video demo here. The in-page JavaScripting seems broken, but the video and audio is good.

  10. Its not futile! by Ars-Fartsica · · Score: 4, Insightful
    Ogg Vorbis hasn't taken over the world, but people are using it and some vendors are supporting it. Theora will likely never slay Quicktime et al but that doens't mean a meaningful community of users can't emerge.

    Don't discount the business value of these open formats - for a hardware or tools vendor it is one less license to pay.

    1. Re:Its not futile! by Jardine · · Score: 4, Interesting

      Don't discount the business value of these open formats - for a hardware or tools vendor it is one less license to pay.

      Same with games. Why compress your audio with mp3 and have to pay a fee when you can use ogg vorbis for free?

  11. clients still have to download a player by Speare · · Score: 4, Insightful

    Clients still have to download the player, it's just that the player is now in a form which is downloaded with less effort.

    --
    [ .sig file not found ]
    1. Re:clients still have to download a player by Tobias+Luetke · · Score: 4, Insightful

      No, Huge difference, The player runs in a sandbox. That means everyone can be 100% certain that it won't install spyware of any sorts in the system.

      This is very very good.

  12. Reminds of of Hello Network by ElForesto · · Score: 3, Interesting

    I used to work at that place during the dot com explosion, and they had some pretty neat Java-based video stuff that ran very nicely even on modems. They even ended up making the broadcast software Java-based so that they didn't need to install software anywhere. Of course, the downturn took it's toll and I think it's run out of some person's house now or something.

    --
    There is a difference between "insightful" and "inciteful" other than spelling.
  13. Re:Firefox crashed! :( by janoc · · Score: 3, Informative

    Just by chance, did you change your USER_AGENT string somehow ? If it is set to MSIE or something else than Mozilla/Gecko, Java will crash. This is a know bug of SUNs JDK :((

  14. Re:Uhmmm Yea....so whats new??? by rokzy · · Score: 5, Funny

    the people using activex are either:
    1. microsoft
    2. retarded
    3. all of the above

    the people using flash are either:
    1. 14 years old
    2. incredibly annoying
    3. advertisers

  15. Looks great and loads quick by spludge · · Score: 5, Insightful

    I just tried it in both Firefox and IE. It looks great (sounds good too) and it loads really quickly! I hope sites start switching to this rather than using real media or WMV streams for windows media player.

  16. Same Idea but with BitTorrent by KrackHouse · · Score: 5, Interesting

    The guys at BannedMusic.org are using a similar system to make it simple to use BitTorrent. This combination of technologies could be the kick in the butt that Open Source needs to reach the mainstream.

    A quote:
    The best solution seemed to be a simple modification of BitTorrent: an installer that runs BitTorrent and begins download of an included torrent file. Windows users can click on the "Easy Download" button on an album's download page to get a 3mb executable. When they launch this executable it installs BitTorrent (which happens very quickly in the background) and immediately begins downloading the album they were seeking. After they've used the "easy download" once, they can simply click on the .torrent files to begin downloading. And they'll be able to use other sites that require BitTorrent.

    --
    What if Digg added local news and a Slashdot inspired comment karma system? ---
    http://houndwire.com
  17. Re:Slashdotters will agree... by mcrbids · · Score: 5, Insightful
    I do not agree. Having a java codec for browsers may as well be having no codec at all. Reasoning:

    1) The only users that allow their browser to run java are those that either don't know how to disable it, or don't know what it is....<SNIP>
    And I would put you squarely into the LATTER category. Or, were you not aware of what a JVM "sandbox" is?
    2. Java is slow and gobbles up resources....
    So is Windows. So is KDE. So is perl, PHP, Ruby, GLibc, and about a zillion others. Perhaps you should read up on the realities of so-called "BLOAT"?

    The fact is that faster computers have not really resulted in us running the same programs faster. It's resulted in us running bigger, fancier programs at the same speed we always have.

    It took about 3 minutes for my 20 Mhz 286 to boot up. It takes about that long for my 2 Ghz Athlon to do the same.

    What's the difference? Go on back and USE that 80286 AT for a while, and tell me what that software "bloat" really got you...
    --
    I have no problem with your religion until you decide it's reason to deprive others of the truth.
  18. Re:Slashdotters will agree... by mabinogi · · Score: 4, Insightful

    Ok, so where are the JVM exploits?

    Javascript is NOT java, so saying "Javascript is vulnerable, so Java must be" is pointless.

    I'm not necesarily saying that java isn't a security hole, I'm just asking that if you're making the claim, then make sure the evidence you provide is relevant.

    as for 2, what you said there applies to all media players.
    WMP, Quick Time, Real One, they all eat memory and processor cycles.
    Have you actually tried it? I don't think that you can claim that it will bog down the machine and be worthless until you try it yourself.
    I haven't tried it either, so I can't say that you're wrong, but there is nothing in your post that gives any real evidence as to why this codec is worthless. Speculation is not evidence.

    --
    Advanced users are users too!
  19. It Just Works! by shutdown+-p+now · · Score: 4, Funny

    Now we only need an ActiveX plugin which will automatically download and install JRE on one's computer, and it will Just Work!

  20. Re:gmail invites by wtay · · Score: 5, Informative

    we've put up another mirror at http://194.78.112.13:8080/cortado/index.html The main site is pulling about 55Mbit/sec and is saturating at 2403 peak clients, it's still alive and kicking though :) enjoy! the fluendo team.

  21. Re:Hey These guys just invented the player we crea by Wesley+Felter · · Score: 3, Insightful

    Lots of people have built Java applet video players. Fluendo isn't claiming to be the first; they're claiming to have the first Theora Java player.

  22. And it's already happening by Sycraft-fu · · Score: 4, Informative

    UT 2004 and Doom 3 both use OGG Vorbis to do their music. Well between these two engines, you are talking a lot of games. A very large number of games start by licensing either the current Epic or iD engine since they are so solid.

    These two alone will provide a big boost for Vorbis in the gaming world.