Xuggler Red5 Adapter

44 views
Skip to first unread message

ddprasad

unread,
Dec 15, 2009, 4:45:46 AM12/15/09
to xuggler-users
Hello All,

There is a scenario, in which there are three clients A,B and C. A and
B share good bandwidth connection. C has a low bandwidth. In this
system, A and B transmit 352x288 video. But C transmits 160x120
Video.

Now at the server's end, the server needs to transmit A's video as
160x120 to C, But 352x288 to B. Is it possible using Xuggler-Red5
Adapter?

So far what I have done is when I transmit a clients video as 800x600,
I can have parallely another stream as 160x120 like the Xuggler
popular example (half gray Video).

Thanking You.



Richard Alam

unread,
Dec 15, 2009, 9:49:25 AM12/15/09
to xuggle...@googlegroups.com
I think you can do something like this:

Create a stream for a named "A_Stream_352x288". Use xuggler (based on
transcoder demo) to resize
the video to 160x120 and name it "A_Stream_160x120". Then have C
subscribe to that stream while B
subscribes to "A_Stream_352x288".

The transcoder demo (I only looked at the Audio example) does the same
process. I believe the video transcoder
example does that too.
> --
>
> You received this message because you are subscribed to the Google Groups "xuggler-users" group.
> To post to this group, send email to xuggle...@googlegroups.com.
> To unsubscribe from this group, send email to xuggler-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/xuggler-users?hl=en.
>
>
>



--
---
BigBlueButton
http://www.bigbluebutton.org
http://code.google.com/p/bigbluebutton

ddprasad

unread,
Dec 15, 2009, 10:01:21 AM12/15/09
to xuggler-users
Hello Richard,

This is a cheap idea. Don't get angry.

If there are three user there will be six streams, if four users then
around twelve streams will be there. Got my point?

The ideal solution will be, when a client requests for a stream, the
server can find its bandwidth and then stream 160x120 to him or higher
resolution if bandwidth is high.
For this to happen, If we can run the TrancoderDemo on
public void streamSubscriberStart ( ISubscriberStream stream )
{
super.streamSubscriberStart(stream);
}
this might help.

But, the Transcoder demo works currently (AFAIK) on IBroadcastStream,
So I am in fix for now.

Richard Alam

unread,
Dec 15, 2009, 10:34:54 AM12/15/09
to xuggle...@googlegroups.com
Hi DD,

I still think the way to implement your best solution is the one I
described below. Or, I could not fully
understand your scenario. Or that there's ways in Red5/Flash to do
what you want without creating
separate streams for each video resolution.

If you find a better way of doing it, I'm very interested in knowing
how you implemented it. We've got plans
to do something like you want with up to 50 cameras.

Richard

ddprasad

unread,
Dec 15, 2009, 10:51:33 AM12/15/09
to xuggler-users
I am not too expert. But in the current state, I need to understand
how Red5's ApplicationAdapter's threads are created. Currently I am
just writing codes by modifying the OflaDemo.

Say, when
streamSubscriberStart, is invoked,
then get the ClientID, who requests this new stream,
Then, check his bandwidth,
Once it is found, start a new stream encoded accordingly with Xuggler,
And, convey him the published name of new stream.

Something like this should work.
I hope, other experts would correct this (Art is not happy today).

Richard Alam

unread,
Dec 15, 2009, 11:05:21 AM12/15/09
to xuggle...@googlegroups.com
I think you're on the right track.

There might be a way though to determine the connection's bandwidth
when it connects. So you can tell the
client ahead of time, the stream to connect/play.

Richard

Art Clarke

unread,
Dec 15, 2009, 1:07:50 PM12/15/09
to xuggle...@googlegroups.com
Everyone seems on the right track here, but I'll add one thing.  I recommend against scaling-up the video on the server.  Why?  Well, it takes CPU cycles and increases the bandwidth required for the video.  Instead if you can, change your flex client to just do the upscaling on the client-machine.

So if C broadcasts 160x120, keep streaming 160x120, but in A and B's flash app, put it in a Video Container that is 320x240 -- Flash will automatically upscale and you'll have spent $0 extra on server costs to upscale there.

Downscaling is different -- the bandwidth savings are worth it, so downscale in the server all you want.

- Art
http://www.xuggle.com/
xu‧ggle (zŭ' gl) v. To freely encode, decode, and experience audio and video.

Use Xuggle to get the power of FFmpeg in Java.
Reply all
Reply to author
Forward
0 new messages