Home > Java > Xuggle + Red5 = Hello World

Xuggle + Red5 = Hello World

I finally got it ! I managed to activate an example of the class Hello Word in tandem with Xuggle and Red5.

Now, how does it work? In the internet browser I start the application which publishes the image from the digital camera of my laptop. This image is then being converted (processed?) on the server by means of Xuggle. In this way the net surfers are able to see in their browsers the target image that has been processed by a server. Welcome to the new era in the multimedia web applications!

It seems to me that this application opens a window of new, amazing opportunities. For example, we can image a video conference which allows the participants to see each other’s if they were actually sitting together at one table:). Another possibility might be the server recognizing the users face and, as a result, greeting him with his name, nickname or some other familiar phrase. Or, for example, let’s say we visit the tourist agency website. We start our laptop’s web cam and, after a while, we could see the blissful image of ourselves resting in a hammock hanging between trees on the beautiful beach far away.

There is no doubt that the image of lying in a hammock is far more tempting than sitting at the computer desk. But let’s go back to details. What is actually going on in the server area? The server – Red5 – receives the video from the user. This video is in the form of a data stream. It might contain an image, music or other data. The video stream is, of course, compressed. The server’s is now required to decompress it so that we receive the successive shots (and this is the task performed by Xuggle and FFmpeg). In fact it reminds of the old-fashioned film tape, which has still been in use for movie-making in Hollywood.

As a result of a video’s decompression we receive a sequence of pictures. What the server does next depends entirely of the imagination and goals of the web-site designers. Then the server compresses the sequence of pictures, thus creating a brand new video – a new data stream. The server can save the results of its operation, or create and access enabling an online transfer.

Obviously this method can be also used for the processing of sound. For instance, we can introduce some changes in popular communicators, such as Skype by adding the users’ favourite music to the background, or creating other sounds typical for cafe, pub or other popular meeting places.

As you can see, the server, which is supposed to perform so many tasks, may be overloaded: it is responsible for decompression and compression of the audio / video stream, as well as processing images or sounds. During the system testing , the overload of my laptop went up to 10%. However, we should keep in mind that the server is performing a new operation, something that has never been done before . Something that might actually become a key to success. Personally I am convinced that the expected results are worth its costs, and it pays off to risk an occasional overload.

In my next article I am going to explain how to start and application Xuggle Hello World on the server Red5.

Categories: Java Tags: , ,
  1. February 2nd, 2009 at 19:53 | #1

    Might interest some readers, but you can find a tutorial on how video and audio data are represented online in the Overly Simplistic Guide to Internet Video:
    http://blog.xuggle.com/2009/01/23/overly-simplistic-guide-to-internet-video/

    - Art

  2. soni
    February 3rd, 2011 at 23:21 | #2

    I read other articles on your blog. Very cool.
    I have similar need. I am working on a product where I am required to stream series of images generated in my Java web application as LIVE video so user can see them animated instantly as they get generated.

    I am new to the world of video streaming and have been sniffing around internet for last 4 days for a good, scalable solution but haven’t nailed down the final strategy as there are many variables on play.

    I was wondering if you will recommend any resources, tips, technologies etc. to accomplish this without much hassle.

    So far I am generating video from images using xuggler.
    And I am trying to publish video to red5 using command line ffmpeg but it is unable to do so.

    Any help will be appreciated

  3. February 4th, 2011 at 18:52 | #3

    Hi,

    I think, you can do it easier.
    I think, you can run xuggle inside Red5. You do not need ffmpeg to stream it to Red5.

    Best regards

  4. April 2nd, 2011 at 05:04 | #4

    Hello, I’m using red5 media server and I have some questions. How many concurrent connections support red5??, And what depends it?. Because I will need more hardware for my server or bandwidth. I am using to test a machine with the following characteristics: 4 ram, quad core 3 Ghz processor and bandwidth of 1Mb. I have these concerns because in the future, i could have between 100,000 to 500,000 users concurrents.

    How much kb/s transmitted red5 a video?? And the last questions if i use red5 with xuggler, the transmission would be improved, that’s to say I would have more users concurrent.

    thanks for all, regards.

  5. Bashar
    April 14th, 2011 at 21:16 | #5

    Hi,

    I am addressing this question to you and Art of course!

    Moving from running the publisher demo with xuggler, how can we integrate xuggle into our own streaming projects on red5? I cannot find any sample, tutorial, or source code on how to integrate xuggler to process a live stream for example.

    I will appreciate any hint in this regards. Thanks again for the material you have provided so far :)

    Cheers

  1. February 2nd, 2009 at 19:52 | #1