How To Write Your First Xuggler Application In Eclipse

January 23, 2009

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.GetContainerInfo application here, and you can get the actual source code here.


How To Install Xuggler on Linux

January 23, 2009

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:
    export XUGGLE_HOME=/usr/local
    export PATH=$XUGGLE_HOME/bin:$PATH
    export LD_LIBRARY_PATH=$XUGGLE_HOME/lib:$LD_LIBRARY_PATH
  • 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
    java -cp $XUGGLE_HOME/share/java/jars/xuggle-xuggler.jar
       com.xuggle.xuggler.demos.GetContainerInfo test/fixtures/testfile.flv
  • Congratulations you should see meta information (for example number and type of streams in the container) printed to your console

Part 4: Where to find the demo source

You can find the documentation for the com.xuggle.xuggler.demos.GetContainerInfo application here, and you can get the actual source code here


How To Install Xuggler on Microsoft Windows

January 23, 2009

Hi folks,

This tutorial shows you how to install the latest version of Xuggle’s Xuggler on Microsoft.

Part 1: Installing on Windows

In this tutorial we show how to find the latest version of Xuggler and install it on your Windows Vista or Windows XP machine.

Part 2: Testing your installation

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
  • Download the latest Xuggler setup.exe for Microsoft Windows from here
  • Run setup.exe, giving administrative permission if requested
  • REBOOT YOUR MACHINE
  • When your machine restarts, launch a command shell
  • Find a copy of your favorite Quicktime, FLV, or other video file (let’s assume it’s called myfile.mov).
  • Run the following command (all on one line):
    java -cp "%XUGGLE_HOME%\share\java\jars\xuggle-xuggler.jar"
      com.xuggle.xuggler.demos.DecodeAndPlayVideo myfile.mov
  • Congratulations you should now see a video (without audio) playing on your screen.

Part 4: Where to find the demo source

You can find the documentation for the com.xuggle.xuggler.demos.DecodeAndPlayVideo application here, and you can get the actual source code here.


Overly Simplistic Guide to Internet Video

January 23, 2009

Hi there,

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.


How to upload and display Youtube hi-def videos

January 21, 2009

Hi folks,

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:

  1. 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.
  2. 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.
  3. 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
  4. If you’re embeeding Youtube in a video, you’ll need to change the URL in their embed code in two places.
  5. 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.

And that should do it.  Hope that’s useful.

- Art


New Tutorial – Installing on Windows

January 21, 2009

Hi folks,

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.

You can find it here.


Xuggler 1.17.RC3 Now Released

January 20, 2009

Introducing 1.17 Release Candidate 3.  Get it here.

Summary

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 added a windows continuous build server

Tests

  • Java Tests: 162 (+35)
  • Native Tests: +0

External Versions

All

  • cxxtest: http://theyard.googlecode.com/svn/theyard/code/trunk/share/gnu/cxxtest/cxxtest-3.10.1 : 170
  • ffmpeg: svn://svn.mplayerhq.hu/ffmpeg/trunk : 16686
  • libswscale: svn://svn.ffmpeg.org/mplayer/trunk/libswscale : 28322
  • libmp3lame: http://downloads.sourceforge.net/lame/lame-398-2.tar.gz: 3.98.2
  • libspeex: http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz: 1.2 RC1

Windows Installer Specifics:

  • 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
  • ActivePerl 5.10
  • Ant 1.7
  • Java JDK 1.5
  • NullSoft NSIS Installer  2.42

Other

  • SWIG 1.3.36 modified with doc gen capabilities
  • Subversion 1.5

An Overly Simplified Guide to Video – Part 3

January 20, 2009

If you haven’t seen Part 2, go here.

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.


Now using googlecode for bug and feature tracking

January 16, 2009

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.

Sorry for any inconvenience,

- Art


An Overly Simplified Guide to Video – Part 2

January 15, 2009

If you haven’t seen Part 1, go here.

In Part 2, we explain the common concepts behind all of those Video File Formats on the web.


Follow

Get every new post delivered to your Inbox.