WARNING

As of Xuggler 3.4, Xuggler has native RTMP support built in. You can read to and write to RTMP urls using the IContainer interface.

As a result we are deprecating this API.

This API relies on internals of Red5 that are not part of the Red5 public API. Also, given the state of Red5, even the public API changes and breaks backwards compatibility frequently since Red5 doesn't worry about maintaining backwards compatibility. To decouple Xuggler completely, and to enable it to work with any other RTMP server (e.g. Adobe FMS, Wowza Media, or RTMPServer), we're focusing on RTMP itself as the interface.

About

By default Red5 doesn't know about Xuggler and Xuggler doesn't know about Red5. To bridge that gap..

...the Xuggler Red5 Adapater enables you to write Red5 applications that intercept live and canned audio and video streams, and decode, manipulate, and re-encode those streams on the fly using Xuggler.

In order to use this with Red5 you must already have installed Xuggler on your Red5 server machine first.

Official Releases

The xuggle-xuggler-red5 library is a java-only library that uses the xuggle-xuggler library.

The release consists of one jar file with the core code, and two WAR files (audiotranscoder and videotranscoder) that are demonstration apps that can be deployed inside a Red5 server. We maintain an ivy repository, and these files are located there.

OS Download
Windows
Windows Vista or XP 32 bit
Ivy Downloads
Linux
Linux
OS-X
Mac OS-X

How To Install Xuggler on your Red5 Server

  1. Install Xuggler on your machine, and restart your machine if Windows
  2. Install the latest Red5 Stable Build (you need Red5 0.8 or higher).
  3. Copy %XUGGLE_HOME%\share\java\jars\xuggle-xuggler.jar to %RED5_HOME%\lib
  4. Copy %XUGGLE_HOME%\share\java\jars\commons-cli.jar to %RED5_HOME%\lib

How to Run the Demos

  1. Install the Xuggler Into Red5 (see above)
  2. Copy the .war files you downloaded into %RED5_HOME%\webapps.
  3. Start Red5 by running $RED5_HOME/red5.sh on Linux/Mac or %RED5_HOME%\red5.bat on Windows

To run the demo here's the basic steps (assuming Red5 is installed on localhost):

  1. connect to http://localhost:5080/demos/publisher.html
  2. Change the rtmp box to read: rtmp://localhost/videotranscoder
  3. Change the buffer time to 0
  4. Press Connect and verify you are connected
  5. Go to the Video Tab and enable your camera.
  6. Fill in "example" for the stream name and press publish
  7. Go to the Server tab again, and in the stream name box enter "example", and press Play
  8. You should now just see your original stream rebroadcasted.
  9. Now, press Stop, and enter "xuggle_example" for the stream name, and press play
  10. You should see your camera, but mirrored down the middle
If you run into an error, try this:
  1. Make sure all Xuggler environment variables are set up as per the Xuggler download instructions.
  2. Ensure that a version of xuggle-xuggler.jar exists in $RED5_HOME/lib. If it doesn't, copy $XUGGLE_HOME/share/java/jars/xuggle-xuggler.jar to $RED5_HOME/lib/.

Documentation

See the Red5 Adapter documentation for how that works.

 

Also, Antoni Jubiak put together a great tutorial on how to get this working.

Getting the Latest Source Code

If you want to get the very latest, tip of tree (with all the advantages and disadvantages that entails):
svn checkout \
  http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler-red5 \
  xuggle-xuggler-red5