I just googled a bit for H.264 player for Java – with disastrous results.

It appears that no one stepped up yet and implemented a free decoder for H.264 in pure Java.

The best way to go seems to either translate the relevant sources of the ffmpeg project or the sources of the Fraunhofer reference implementation into a decoder for the JMF API.

ffmpeg is written using C90 and some C99 additions and some inlined assembly code. Unfortunately – from my first glance at the code – not all of the assembly code seems to be also provided as C code, but I am not sure, how much of the H.264 decoder code is affected by this (if at all).

The Fraunhofer implementation seems to be pure C code.

That’s not too bad. Yet, its still too much work for a weekend project. :/

4 Responses to “No H.264 player for Java yet”

  1. clemensb Says:

    Have you started working on this at all? I am looking at exactly the same problem at the moment and am thinking about whether or not it would be worth wile doing. Do you know if there are any significant differences between the Fraunhofer reference implementation and x264 in ffmpeg?

  2. werner.randelshofer Says:

    Hi Clemens,

    I haven’t taken action, I was just lamenting about the fact that no one else did. :)

    I didn’t do much more than having a first glance at both implementations. For Java, I would have used both libraries as a source. Since I want to integrate with JMF and FMJ, I can’t use the original design of neither library anyway.

  3. Dave Says:

    Hi – I too could do with a pure java H.264 decoder… There seems to be plenty of discussion about whether its possible to write one, given the performance requirements and more importantly the almost mandatory close integration with the video hardware…

    So saying – I found this:
    http://mediaframe.org

    which is getting there – there is a beta that support mpeg4 – presumably mpeg4 part 2 rather than the part 10 H.264 standard…

    Cheers,
    Dave

  4. werner.randelshofer Says:

    Hi Dave,

    I think you are right. Its not clear whether a pure Java decoder would be fast enough.

    Maybe it is better, if I aim for lower hanging fruits first.

    mediaframe.org is interesting, but they haven’t released their MPEG-4 source code yet.

    On the other hand, JFFMPEG has a decoder for MPEG-4 video, but it lacks an MPEG-4 demultiplexer:
    http://jffmpeg.sourceforge.net/formats.html

    I think, implementing an MPEG-4 demultiplexer would make a fine weekend project for me. ;)

Leave a Reply