Xuggler 1.19.RC5


Introducing Xuggler 1.19 Release Candidate 5. Get it here.

Summary

1.19.RC5 is a new feature release and a bug fix release. And there are some big changes:

  • Support for encoding h.264 video using libx264
  • We now expose all FFMPEG AVOption configuration options for use in Xuggler
  • As usual, we include the latest FFMPEG version
  • And a few other interesting features you can find out about in the details.

Details

H.264 Encoding Support

First off, big thanks to Georges-Etienne Legendre who stepped up and provided the starting edits for h.264 support. Georges has submitted the 2nd change from the community (his contribution is licensed under LGPL).

We support h.264 support with libx264 out of the box now by building libx264 along with Xuggler. This enables the FFMPEG libx264 codec.

There are a few known issues with h.264 encoding right now. First, libx264 does not pass all of our Valgrind memory check tests, but doesn’t appear to crash the Java Virtual Machine so we’re enabling it anyway. Second, we’re seeing some issues under windows. See further in this note for details.

IConfigurable Exposes FFMPEG Configuration Options

FFMPEG‘s libav library has a lot of configurable options. The ffmpeg command-line tool exposes a bunch of them as:

  • AVCodecContext AVOptions
  • AVFormatContext AVOptions
  • SWScaler AVOptions

We now expose 100% of those options, using the same option names and valid settings on the following interfaces:

  • IStreamCoder
  • IContainer
  • IVideoResampler

We do this with the new IConfigurableinterface which all those options implement. To use, you can write code such as:

IStreamCoder coder = stream.getStreamCoder();
coder.setProperty("flags", "+cgop+umv");
coder.setProperty("me_method", "+esa");
coder.setProperty("qcomp", 0.6);
double example = coder.getPropertyAsDouble("qcomp");
coder.open();

You can also query all available options, and potential settings using IConfigurable. For an example of this, pass -Dxuggle.options to the GetContainerInfo demo.

java -cp $XUGGLE_HOME/share/java/jars/xuggle-xuggler.jar -Dxuggle.options com.xuggle.xuggler.demos.GetContainerInfo yourfile.mpg

Latest FFMPEG Version

1.19.RC5 ships with FFMPEG version #17166 and libswscale version #28537.

The FFMPEG team is preparing for an actual release, tentatively named 0.5 Bikeshed. That release should come out around the end of February 2009. This version of Xuggler contains an early version of that (the FFMPEG team is not planning to add new features between now and 0.5 — just bug fixes).

We’ll release another Xuggler once FFMPEG 0.5 goes final, but if you want, you can always use the latest Xuggler tip-of-tree build to get the latest FFMPEG.

Flushing buffered packets

You can use IContainer.flushPackets(); to tell Xuggler to flush any buffered packets to its output. By default Xuggler will buffer until it has a default buffer size (which you can configure). It defaults to 32k of data. However if you’re writing to a network, it can be handy to force a flush. Hence this method.

YASM Support

If you install yasm on your machine, then when we build Xuggler we’ll include lots of assembly optimizations for libx264 and FFMPEG.

Other Minor Changes

  • Support for some new PixelFormat types
  • Support for getting the current URL from an IContainer
  • Support for using assembly optimizations on all supported platforms if you’ve installed yasm

Known Issues

Windows Encoding for non FLV Containers Broken

We have some encoding issues on Windows that we’re trying to fix. Right now encoding h.263 into an FLV container does work (and hence our Red5 integration works).
But other containers (for example MOV) seem to get corrupted data. We’re trying to figure out why (the ffmpeg.exe we ship with works correctly). Let us know if you have ideas why.

Make Sure You Clean Build Tree Before Build If Using SVN

If you just update your svn checkout of Xuggler, you’ll need to do a ant clobber before you rebuild. Sorry.

Issues Fixed

  • Issue #43: jerkyness of java video filters
  • Issue #58: Errors when decoding mp3 audio
  • Issue #14: com.xuggle.xuggler.ConvertTest output doesn’t play in Quicktime
  • Issue #51: non monotone timestamp error thrown when transcoding video WITH audio
  • Issue #54: 1.18.142 No video output using Converter.java
  • Issue #40: -vbitrate not being honored
  • Issue #55: DecodeAndCaptureFrames demo captures frames at incorrect interval
  • Issue #49: Backup Hudson
  • Issue #48: The Hudson Build Server runs out of disk space frequently

Enhancements Added

Tests

  • Java Tests: 179 (+17)
  • Native Tests: +4

Source Control Versions

Xuggle Version: 1.19.189.RC5

– Hudson Good Build

http://build.xuggle.com/job/xuggle_java_xuggler_jdk5_i386_winxp/18/

– Dynamic Revisions (From Hudson)
* svn://svn.mplayerhq.hu/ffmpeg/trunk : 17166
* svn://svn.ffmpeg.org/mplayer/trunk/libswscale : 28537
* http://theyard.googlecode.com/svn/theyard/code/trunk/share/gnu/cxxtest/cxxtest-3.10.1 : 170
* http://xuggle.googlecode.com/svn/trunk/build/java : 153
* http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler : 189

– Static Dependencies
* libx264: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090125-2245.tar.bz2
* libmp3lame: http://downloads.sourceforge.net/lame/lame-398.tar.gz: 3.98
* libspeex: http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz: 1.2 RC1

On Windows, here’s what we built our installer with:
Mingw gcc/g++ 4.2.4: http://www.tdragon.net/recentgcc/
Msys 1.0.11
mingw-runtime 3.15.1
w32api 3.13
gmake 3.81
binutils 2.91
yasm 0.7.2.2153
ActivePerl 5.10
Ant 1.7
Java JDK 1.5
MSFT C++ Visual Studio 2005

NullSoft NSIS Installer 2.42
SWIG 1.3.36 modified with doc gen capabilities
Subversion 1.5

Advertisements

Comments are closed.

%d bloggers like this: