home / blog

Embedding Video in Java

Task: Produce application with embedded video. Must support flash video or similar. Must work on older version of SunOS, Windows and Linux (needs pure java implementation really). Must be tight-integration, i.e. not just open a video in an external player.

Discussions on stack overflow


Java media framework. Supports older formats, but no mention of anything modern like WebM, H264, VP8 etc. However appears dead now as no updates since 2003.


This is slightly better. FAQ

Audio: MP3; AIFF containing uncompressed PCM; WAV containing uncompressed PCM
Video: FLV containing VP6 video and MP3 audio

However at present you are not free to redistribute the JavaFX jars in your product, due to codec licensing issues – update Mar 2012 – licensing for JavaFX now same as JDK7, as incorporated in JDK/JRE7.

JavaFX 2.0 is available under the same license and business model as Java SE, with the exception of the redistribution clause, which currently does not allow third party developers to distribute the JavaFX Runtime (or SDK) with their application(s)

3rd party offerings.

Xuggle: Sits on top of FFMPEG. xuggle.com. Seems to be intended more for processing, but playback appears possible. Licensing? LGPL, but FFMPEG licensing/patenting is a lot more complex – FFMPEG itself is LGPL, with some optional GPL parts.

This entry was posted in geek and tagged . Bookmark the permalink.

Leave a Reply

Your email address will not be published.