Xuggler 3.4: "Forrest"
Announcing Xuggler 3.4: Get It Here.
Table of Contents
Summary
Introducing Xuggler 3.4, "Forrest".
Forrest is a new feature & performance release. Specifically it includes:
- Xuggler can now read and write to
rtmp:URLs. - Xuggler now supports H264 B-Frame encoding and the latest X264 encoder.
- Xuggler H264 decoding is now over 10% faster.
- Xuggler now supports FFmpeg preset files.
- Xuggler now supports AMR audio encoding.
- Xuggler exposes the latest FFmpeg seek functionality.
As usual, read on for the details.
Release Notes
RTMP Support
Xuggler (and FFmpeg) can now read (record) and write (publish) to and from RTMP streams. For example:
IContainer readContainer = IContainer.make();
// open RTMP stream for recording
readContainer.open("rtmp://localhost/appName/streamName", IContainer.Type.READ, null,
true, false);
IContainer writeContainer = IContainer.make();
// open RTMP stream for publishing
writeContainer.open("rtmp://localhost/appName/streamName", IContainer.Type.WRITE, null,
true, false);
This has been tested with the latest Wowza and Red5 servers (and others have claimed it works with Adobe Flash Media Server but we do not have that in our test lab currently). You can find (slightly) more details on this feature here.
Finally, this now becomes the recommended way to integrate Xuggler with RTMP-based servers such as Red5. We are officially deprecating the Xuggler-Red5 adapter and will not be actively maintaining it.
H264 Encoding Improvements
Another release, another upgrade on the H264 encoder encoders.
Specifically x264 version
20100118-2245. Also, B-Frame encoding now computes correct timestamps
via the IStreamCoder interface.
Preset File Support
In 3.3, there were some changes that meant you had to explicitly
set a bunch of properties on the IStreamCoder interface to
have H264 encoding work out of the box. That is still true, but using
the new com.xuggle.xuggler.Configuration.configure
methods, you can now use FFmpeg preset
files to set those automatically. Here's some example code showing that
in action:
IStreamCoder coder = IStreamCoder.make(IStreamCoder.ENCODING);
coder.setCodec(ICodec.ID.CODEC_ID_H264);
int retval =
Configuration.configure("captive/ffmpeg/ffpresets/libx264-default.ffpreset",
coder);
if (retval < 0)
throw new RuntimeException("could not configure coder from preset file");
If you check out the source code of Xuggler, check out the
contents of captive/ffmpeg/csrc/ffpresets to see a variety
of default settings FFmpeg uses when encoding with X264.
Faster H264 Decoding.
Alright, we didn't do any work here at all, but the FFmpeg team (well, Michael) has gotten super-focused on this, and his hard work results in H264 decoding being over 10% faster on Intel processors. Since we automatically bundle the latest FFmpeg, Xuggler users get that benefit too. Kudos to Michael though.
New IContainer.seek... API
We have exposed the new (and experimental) FFmpeg seek APIs in the IContainer object, and have also exposed the indexes that FFmpeg can read and write. For details on this feature see here.
However in our testing we find that seek support in FFmpeg across containers does not always work, especially seeking by bytes. We're not actively going to track those down in the near future, but patches to FFmpeg to fix the issues are welcome.
AMR Audio Encoding Support
The FFmpeg bundled with Xuggler now supports AMR encoding by
default, which means it's easier to generate .3gp files for
mobile phones such as Android phones.
Warnings
You must uninstall prior versions of Xuggler before installing this version.
This release of Xuggler is backwards compatible with the last release with the following exceptions:
-
As previously mentioned, you may have to change your X264 settings.
Known Issues
Critical
There are no known critical issues in this release.
Major
Users of this version of Xuggler should be aware of the following limitations (which will be addressed in a future Xuggler release):
- MediaWriter does not resample audio. To work around ensure the audio sample rate and channels you ask MediaWriter to encode is the same as what you set up your audio streams with. Tracking issue.
- MediaViewer is experimental and not very robust. It's included only to get feedback, but you should not use it in production environments. Tracking issue.
Minor
There are two bugs in the current version of FFmpeg that may impact you. Both have simple workarounds:
- Issue #92: Doing resize and changing color space from YUV to either BGR24 or ARGB AT THE SAME TIME produces erroneous black pixels. Workaround: do resize operations separately from colorspace conversions.
- Issue #93: YUV to ARGB Converter causes every 2nd line of pixels to be offset by one. Work around: use BGR24 converter.
What's Next?
The next version of Xuggler will bump a major version to 4.0. That means it will not be 100% backwards compatible with prior releases (just to warn you all).
The major expected area we'll potentially break backwards compatibility is we're going to submit a patch to FFmpeg that will allow per-codec and per-container specific options. I expect getting this patch into mainline FFmpeg will be tricky, and so we'll probably end up requiring our version of FFmpeg to be bundled with Xuggler. We'll (as usual) publish all patches, but in 4.0 we may no longer support replacing our bundled FFmpeg with another version without applying the Xuggler patches provided.
We will continue to add to Xuggler, but our focus is 100% on internal projects using Xuggler. That means you should not expect to see new release bundles (turns out they take a lot of work), but we will keep the build server running.
Warning: At some point the FFmpeg is going to move to GIT for source control. If you're in the habit of building Xuggler from our tip of tree, you'll want to install GIT. We'll likely be forced to require GIT and SVN to build Xuggler once FFmpeg makes the move. No ETA on this yet, but there is a lot of chatter on the FFmpeg lists about it. By the way, the advantage of this is we should also then be able to auto-integrate the latest libx264 as well.
Build Information
Fine Print
By reading these release notes, you pledge to send kind thoughts our way, to think fondly of the time we spent together, to remember lovingly the APIs we brought, and to show respect and devotion to all the world's creatures, both small and large. Except birds. We hate birds... filthy f*cking creatures!
Source Control Versions
Xuggler 3.4.1012.FINALHudson Good Build http://build.xuggle.com/job/xuggler_jdk5_stable/76/
- Dynamic Dependencies
* svn://svn.mplayerhq.hu/ffmpeg/trunk : 21566
* svn://svn.ffmpeg.org/mplayer/trunk/libswscale : 30472
* http://xuggle-ffmpeg.googlecode.com/svn/trunk : 843
* http://theyard.googlecode.com/svn/theyard/code/trunk/
share/gnu/cxxtest/cxxtest-3.10.1 : 170
* http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler : 1012
* http://xuggle.googlecode.com/svn/trunk/build/java : 1006
- Static Dependencies
* http://xuggle-ffmpeg.googlecode.com/svn/trunk/
* libx264: ftp://ftp.videolan.org/pub/videolan/x264/snapshots/
x264-snapshot-20100118-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
* libfaac: http://downloads.sourceforge.net/faac/faac-1.28.zip: 1.28
* libogg: http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
* libvorbis: http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz
* libtheora: http://downloads.xiph.org/releases/theora/libtheora-1.1.0.tar.bz2
* libopencore-amr: http://sourceforge.net/projects/opencore-amr/files/
opencore-amr/0.1.2/opencore-amr-0.1.2.tar.gz/download
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
* Msys Perl 5.6
* Ant 1.7
* Java JDK 1.5
* MSFT C++ Visual Studio 2008
* NullSoft NSIS Installer 2.42
* Subversion 1.5
Integration
