Home > Java > How to start Xuggle at Red5

How to start Xuggle at Red5

A big breakthrough today – I finally managed to start a Xuggle demo on the server Red5. I am really proud of this, because this kind of technologies will have a tremendous impact on further advancement in the Internet world. I have already given the details of the functioning of the tandem Xuggle and Red5. Now it is time to present how I have activated Xuggle and Red5 on my computer with Windows Vista64bit. I began with downloading and installing the latest version of the server Red5 – 0.8RC2. Of course I also installed the Xuggle. All the Widnows versions are really easy to install – by using the command: Setup.exe and restarting a computer. What I did next was to create an web application archive, consisting of the following files:

All the useful files can be found here:
  1. http://xuggle.googlecode.com/svn/trunk/repo/share/java/xuggle/xuggle-xuggler-red5/xuggle-xuggler-red5-1.17.117.jar
  2. http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler-red5/web/videotranscoder/WEB-INF/red5-web.properties
  3. http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler-red5/web/videotranscoder/WEB-INF/red5-web.xml
  4. http://xuggle.googlecode.com/svn/trunk/java/xuggle-xuggler-red5/web/videotranscoder/WEB-INF/web.xml
I then saved my application in the folder webapps in the server Red5. Using the 32bit version of Java I started the server Red5. I also set the environment variables:  
$ export | grep HOME
declare -x JAVA_HOME="C:\Program Files\Java\jdk1.6.0_10"
declare -x RED5_HOME="C:\Program Files (x86)\Red5"
declare -x XUGGLE_HOME="C:\Program Files (x86)\Xuggle"
    I started red5: red5.bat. For testing I used the demo application from the server Red5 – Publisher. http://localhost:5080/demos/publisher.html. It is important to remember to connect to the videotranscoder application rather than oflaDemo. All other settings do not require any changes. I just turn on the camera and the microphone and begin a video session. The name of the stream is antek. In order to see the results of Xuggle operations I start the option “View”. The name is xuggle_antek. After severals hours of trials and errors and using Art Clarke I got it! I’ve finally seen my “second nature” – my second faceJ Thanks a lot, Art! In the next chapter I’m going to explain how to programme Xuggle using Eclipse and Maven 2. However, first I have to learn how to do it and, most importantly, EAT SOMETHING!
Categories: Java Tags: , ,
  1. shibby
    July 8th, 2009 at 18:36 | #1

    Hi there!

    I’ve being trying to put this demo to work, but it’s been impossible for me. I’m using MS Windows XP Pro SP3 and I’ve made a clean install of Red5 0.8.0 final using the installer provided for that purpose on red5.googlecode.com.

    After that, I’ve installed the latest Xuggle version 3.0.660 available at their website. Xuggle seems to be working ok, since I tried decoding an flv with it and it worked fine, and so did Red5 after installing oflaDemo and hence the publisher app.

    I copied the shared xuggle-xuggler.jar to red5/lib (there was a library there already, but it seemed an older version so I just deleted it xuggle-xuggler-2.0.322.jar)and put the latest videotranscoder-3.0.757.war and audiotranscoder-3.0.757.war on the webbaps folder.

    After a while I managed to connect to red5 using the rtmp://localhost/videotranscoder. Video publishing and subscribing works fine but when I write xuggle_whatever nothing is displayed.

    I started red5 using cmd to check if it gave any error but I see nothing wrong. There’s even a table showing activity related to videotranscoder…

    |————————————————————–|—-|———|-
    ——–|———|———|
    | com.xuggle.red5.Transcoder#transcode_loop | 1 | 160,732 |
    160,732 | 160,732 | 160,732 |
    | com.xuggle.red5.Transcoder#writePacket | 1 | 0,148 |
    0,148 | 0,148 | 0,148 |
    | com.xuggle.red5.Transcoder#VideoPictureListener#preEncode | 1 | 5,332 |
    5,332 | 5,332 | 5,332 |
    | com.xuggle.red5.Transcoder#VideoPictureListener#postDecode | 1 | 0,009 |
    0,009 | 0,009 | 0,009 |
    | com.xuggle.red5.Transcoder#decodeVideo | 1 | 46,374 |
    46,374 | 46,374 | 46,374 |
    | com.xuggle.red5.Transcoder#encodeVideo | 1 | 100,235 |
    100,235 | 100,235 | 100,235 |
    | com.xuggle.red5.Transcoder#readNextPacket | 1 | 0,605 |
    0,605 | 0,605 | 0,605 |
    |————————————————————–|—-|———|-
    ——–|———|———|
    | com.xuggle.red5.Transcoder$1#packetReceived | 12 | 0,566 |
    0,004 | 5,883 | 6,790 |
    | com.xuggle.red5.io.Red5Message# | 7 | 0,121 |
    0,008 | 0,787 | 0,849 |
    |————————————————————–|—-|———|-
    ——–|———|———|

    Any way to know why this could be happening?

    Thanks in advance. Bye.

  2. July 8th, 2009 at 19:43 | #2
  3. August 3rd, 2009 at 22:50 | #3

    Hi Antoni!

    Do you get some framerate issues with the videotranscoder app? I’m getting mad delay here (over 100ms to packetReceived) and can’t seem to find the solution!

  4. August 11th, 2009 at 08:35 | #4

    No, for me it works fine.

  5. Tamour
    November 13th, 2009 at 12:01 | #5

    Hi Antoni,
    How can I use xuggler in my red5 servlet. I mean this is the war file. But where can i find the source code, so that i can do it myself. Add something myself

  6. November 13th, 2009 at 12:06 | #6
  7. Mridul
    March 19th, 2010 at 08:44 | #7

    @shibby

    in the publishing module(video tab) type only “example” and on the Server tab Type “xuggle_example”

    Probable you were typing xuggle_example on the side publisg and play thats why it ws not working

  8. Surender
    May 12th, 2010 at 05:24 | #8

    Hi
    I need you help to implement a feature in my current project.

    I want to streaming a wmv file on client side with help of xuggle and red5 server.
    Xuggle will convert wmv file to any streaming file format that Red5 supports for streaming then streaming will start on client side through Red5 server.

    Please help me out.

    Waiting for positive reply
    Thanks
    Surender Singh

  9. June 30th, 2010 at 14:01 | #9

    hi, can you help me?

    Do you known, Is it possible to get first frame from flv and convert it to jpeg using xuggle?

  10. julien
    June 30th, 2010 at 17:27 | #10

    Hey there,
    Any chance you could share the source?
    Thanks

  11. February 14th, 2011 at 09:20 | #11

    Hello

    Can you help me figuring out how to plug in Xuggler into my red5 so I can convert live streams to h264+aac and broadcast hem back to clients?

    Right now I do only flv since flash can only send that from webcams.

    Thanks
    Cris

  12. February 14th, 2011 at 09:21 | #12

    @Victor Y. Sklyar
    I have done that using recording capabilities and ffmpeg, easy deal… if still interested I can send you how…

  1. July 22nd, 2011 at 02:46 | #1