If you’re new to Xuggler, you may want to start with the MediaTools API first. But if you want to use the more complex Xuggler Advanced API, keep reading.
So you’ve seen the Overly Simplistic Guide to Internet Video, you’ve installed Xuggler on your Windows, Linux or Mac, and you’re ready to start writing applications. This tutorial shows you how to write a simple application that just opens up a media container, and tells you about the streams inside that container.
Part 1
Part 2
The Source Code
You can find the documentation for the com.xuggle.xuggler.demos.GetContainerInfoapplication here, and you can get the actual source code here.
This set of tutorials shows how to install the latest Xuggler library on a Linux machine.
Part 1: Downloading and Building
In this tutorial we show how to find the latest version of Xuggler and install it on your favorite Linux machine.
Part 2: Installing and Verifying
After you’ve installed Xuggler on your machine and rebooted, it’d be nice to test that everything is working. This tutorial shows you how to do that.
Part 3: For those who don’t like Videos
Here are the steps in text for those who don’t like video:
Uninstall old versions of Xuggler first if you’ve already installed it. Do this by running ant uninstall in the directory you originally installed from.
Download the latest Xuggler .tar.gz file for Linux from here
Untar the download by running tar -xzvf xuggler-version.tar.gz
Set the environment variables XUGGLE_HOME to where you want xuggle installed:
cd to xuggle-version and run ant run-tests. This can take anywhere from 10 minutes to over an hour depending on your machine.
Once the build has finished, run sudo ant install
Then to verify the build, try the following command (all one one line). You should be able to pass in any media file you like to test; for the example we’re asking for meta-information about the file test/fixtures/testfile.flv
If you’re new to programming with Internet Video you may find that it’s very complicated. Lots of mysterious concepts like “formats”, “codecs”, “timestamps” and others. Well, we were new to Video Programming at one pont too, and we know the pain. So we’ve put together this series of tutorials that introduces you to those concepts, and you can watch them here in high definition.
Part 1: The File Format Fracas
You’ve probably heard about files like “Quicktime”, and “Windows Media” and “Real Audio”… but what the hell do they all mean, and why doesn’t Youtube seem to care about it? Find out here.
Part 2: Don’t Cross The Streams
OK, so now you understand what those file formats are; how do programs like video players manage to open and use the data in those formats? Find out here.
Part 3: Horse Over IP
Now you get how audio data is represented in video containers, but what the hell is Key Frame Compression? Find out here.
Part 4: Your Secret Decoder Ring
Great! You get the basic concepts of data inside a Container, but how to media players put it all together to display sound and video? Find out here.
We’re in the process of uploading our Tutorials to youtube, and will be re-working the http://www.xuggle.com/xuggler/tutorials page to include those. That page will link to blog posts where we post the tutorials so that folks can comment and give feedback inline on how to improve the tutorials.
That mean’s you’ll see a few blog posts over the next few days that repeat some previously posted tutorials just so they’re in the right location. Sorry about that.
But to share knowledge, here’s how we’ve been able to get Youtube to playback some of our videos in high def:
We’re recording demos using h.264 video and AAC audio using The Jing Project on windows. The paid version ($14.95/yr) allows you to save these files to disk.
We upload the file as is to youtube. You’ll need to wait about 30 minutes. At first youtube will process a standard-def (320×240 version) of all the videos. When that’s done it’ll claim the video is live, but it will take longer for it to transcode the highdef version.
But if you wait, there will be a non-well publicized way to get higher definition video. Take the URL youtube gives you, and add “&fmt=18″ at the end. For example: http://www.youtube.com/watch?v=Yv_1zKr3_Mg&fmt=18
If you’re embeeding Youtube in a video, you’ll need to change the URL in their embed code in two places.
If for some reason you’re still not getting hi-def video, wait a day and try again; sometimes it takes Youtube a long time to get the hi-def version, and they don’t give you any feedback when it’s done.
We just finished our next set of tutorials (many more to come). This one shows you how to install Xuggler on Microsoft Windows, and run a demo application to make sure it’s working.
1.17.RC3 is a big milestone; it’s our first community-driven release. In it we add some features and bug fixes you asked for. Big features are the ability to seek for key frames in streams, maven POM files, and the ability to determine the language setting used for audio or subtitle tracks.
Behind the scenes we’ve also set up a Windows continuous build server to ensure we’re constantly building on windows (the hardest platform to build on) (ok, you didn’t ask for that, but you did ask that our windows installers actually work reliably).
Issues Fixed
Issue 18: Java crash on encoding of RGB32 IVideoPicture. We now make sure an IVideoPicture is the expected type before encoding.
Issue 13: IStreamCoder.getCodecType() does not return correct values (for subtitle and data streams).
Issue 15: ant run-tests will fail on Java 1.5 64 bit builds for mac.
Issue 16: Several wrong values for IStreamCoder and IStream for media files (for containers with corrupt or non-existent headers).
Enhancements Added
Enhancement 1: Expose container bit rate (IContainer#getBitRate()).
Enhancement 2: Expose total container duration if known (IContainer#getDuration())
Enhancement 3: Expose ability to seek for key frames (IContainer#seekKeyFrame(…))
Enhancement 4: Expose sample aspect ratio (ISample#getSampleAspectRatio())
Enhancement 5: Expose Codec long name (ICodec#getLongName())
Enhancement 6: Expose Stream’s language setting (IStream#getLanguage())
Enhancement 7: We now generate Maven POM files on every publish (in dist/ivys/xuggle/${app.name}/${app.name}.pom)
Enhancement 8: Expose Stream Coder codec tag setting (IStream#getCodecTag() and IStream#getCodecTagArray())
Enhancement 29: Make Xuggler enum-like classes be actual Java enums so you can use Java switch statements with them.
Other:
We also added IContainer#getStartTime() and IContainer#getFileSize()
We’re hard at work getting the next version of Xuggler (1.17.RC3) out and hopefully you’ll see that later today. But if you’re waiting and want something to chomp on, here’s Part 3 of the Overly Simplified Guide to Video.
In this segment we explain how video compression works.
I jumped the gun in using sourceforge for issue tracking as we’ve run into a few issues. So we’ve decided (while relatively few bugs are filed) to migrate to Googlecode for tracking issues (bugs and features). They already host our source code and have better integration with their checkins.
The support docs on http://www.xuggle.com/xuggler/support have been changed to point to Googlecode and Robert is in process of migrating the feature and bug requests you have filed on source forge over to googlecode.
Please file new bugs, and add any comments to your existing bugs, in their new Googlecode issue locations.