Need to increase video bandwidth usage

285 views
Skip to first unread message

Paul Ascher

unread,
Mar 4, 2010, 11:47:57 PM3/4/10
to BigBlueButton-dev
Hi all,

First of all congratulations on this excellent project. I've been
digging into its code for the last 2 days, I'm focusing on video for
now.
I have my dev environment(VM, using latest code from svn) set as well
as a small instance running it on at ec2(apt-get install...).

So, I work for an education web site where high-school and college
animation students post their work and get feedback from peers and
from industry professionals. The site promotes web conferences where a
teacher and his classroom interacts with a pro(currently they are
using an expensive commercial software).

There are just a couple cameras at the class room and another couple
at the pro's side. Bandwidth is not a problem, I'm trying to increase
the video quality because it's important for us since the pro draws
stuff in front of the camera so video quality really matters, there is
a lot of movement going on and the blocky video did not please my
bosses.

After searching a bit I was able to increase quality by editing those
lines at PublishWindow.mxml:

camera.setKeyFrameInterval(1);
camera.setMode(camWidth,camHeight,15);
camera.setQuality(0,90);

Big differential here is setQuality passing 90 for quality, now it's
not blocky anymore.
I know the default for bandwidth was already 0 which means as much as
it can use.
Thing is, when I do this, the video gets kinda slow(really slow if I
use 100 for quality), and I noticed that my clients(I'm testing at my
lan using my 2 laptops and my desktop) upstream never goes much over
120 kilobytes/second, no matter what settings I use.

From what I read bbb does not limit bandwidth anywhere, or does it?

I thought maybe red5 was limiting it, I've been pulling out my hair
trying to find where could it be done.

I found this on a red5-common.xml:

<!-- Limits bandwidth (bytes per second) related with read and write
operations on a per-session basis -->
<bean id="bandwidthFilter"
class="org.red5.server.net.filter.TrafficShapingFilter"
scope="prototype">
<!-- Maximum read throughput (0 = Unlimited) -->
<constructor-arg index="0" value="0"/>
<!-- Maximum write throughput (0 = Unlimited) -->
<constructor-arg index="1" value="512000"/>
</bean>

But it seems to be only for the latests versions of red5, the version
that gets installed with apt-get does not seem to have this option, so
I got the latest from svn, built it and installed it, but now bbb
stopped working, it's failing here(MainApplicationShellMediator.as):
if (portTestResult["protocol"] == "RTMP") {
testRTMPTConnection()
} else {
shell.statusProgress.text = "Sorry, we cannot connect to the
server.";
}
The value of portTestResult["protocol"] is "RTMPT", odd since I
commented out RTMPT from red5-common.xml.

I know there's a chance that has nothing to do with red5, but since I
went through the trouble of trying this things I thought I should just
post them here as well.

Anyway, the big question is: where is my upload being limited and how
can I raise it.

Thanks in advance,

Paul


Jeremy Thomerson

unread,
Mar 4, 2010, 11:58:02 PM3/4/10
to bigblueb...@googlegroups.com
We're working on giving configurable camera quality settings in this release or the next one.  In the meantime, here's the settings I've found that make for high quality video (albeit at the expense of bandwdith - some cameras generating as much as 250k).

I tried probably at least thirty different combos with multiple different cameras before settling on these:

If you're using 320x240:
Max BW: 56000
Quality: 90
Frames per second: 30

If you're using 640x480:
Max BW: 0
Quality: 90
Frames per second: 30

So, that would look like this:
// I don't set the key frame rate - I let Flash decide - it improves the quality
//camera.setKeyFrameInterval(30);
camera.setMode(camWidth, camHeight, 30, false);
camera.setQuality(56000, 90); // or 0 rather than 56000 for a larger camera

Hope this helps.

Jeremy Thomerson
http://genericconf.com
BigBlueButton with local number telephone conferencing









--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To post to this group, send email to bigblueb...@googlegroups.com.
To unsubscribe from this group, send email to bigbluebutton-...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bigbluebutton-dev?hl=en.


Fred Dixon

unread,
Mar 4, 2010, 11:59:48 PM3/4/10
to BigBlueButton-dev
Hi Paul,

Quick comment ... we'll be upgrading to red5 0.9.0 for BigBlueButton
0.64 (the current iteration now in progress).

I'll let others respond with some more technical details on the video
options.

Regards,... Fred

Paul Ascher

unread,
Mar 5, 2010, 12:18:41 AM3/5/10
to BigBlueButton-dev
Thanks so much Jeremy, I tried it and it's definitely the best results
I've had so far.
Upstream use increased indeed, I can't believe it was just a matter of
fiddling a bit more with those values.

I did notice before that one of my cameras provided better results
than the others, but bandwidth still seemed limited.
Now I know that only my knowledge was limited :)

Anyway, thanks again and keep up the good work!

Paul


On Mar 5, 2:58 am, Jeremy Thomerson <jeremythomer...@gmail.com> wrote:
> We're working on giving configurable camera quality settings in this release
> or the next one.  In the meantime, here's the settings I've found that make
> for high quality video (albeit at the expense of bandwdith - some cameras
> generating as much as 250k).
>
> I tried probably at least thirty different combos with multiple different
> cameras before settling on these:
>
> If you're using 320x240:
> Max BW: 56000
> Quality: 90
> Frames per second: 30
>
> If you're using 640x480:
> Max BW: 0
> Quality: 90
> Frames per second: 30
>
> So, that would look like this:
> // I don't set the key frame rate - I let Flash decide - it improves the
> quality
> //camera.setKeyFrameInterval(30);
> camera.setMode(camWidth, camHeight, 30, false);
> camera.setQuality(56000, 90); // or 0 rather than 56000 for a larger camera
>
> Hope this helps.
>

> Jeremy Thomersonhttp://genericconf.com

> > bigbluebutton-...@googlegroups.com<bigbluebutton-dev%2Bunsubscr i...@googlegroups.com>

andre webb

unread,
Mar 5, 2010, 3:16:18 AM3/5/10
to bigblueb...@googlegroups.com
I guess setKeyFrame workd the other way around, It's 1 keyFrame avery frame so stream 30 frames / s.
It should be
camera.setKeyFrameInterval(1);
instead of
camera.setKeyFrameInterval(30);

Since I don't really need a great movement I set it to 2 or 3, and I think It will only stream 30fps if there's a good conection.
PS: many topics around camera quality ( maybe there's should be a easier configuration options, and debuging/testing )




To unsubscribe from this group, send email to bigbluebutton-...@googlegroups.com.

Walter Tak

unread,
Mar 5, 2010, 7:59:13 AM3/5/10
to bigblueb...@googlegroups.com
Hey Paul,

you'll also see major differences in quality at the upper scale of that
quality property ; you might see a difference between 90 and 95 but each
frame saved at 95% quality will eat more bandwidth and thus lower the
framerate.

Your remark about each camera having different results is very true ;
currently everyone looks at "webcams" as if they are some sort of generic
car. However there are so many different types of cars each having it's
advantages.

A fuzzy camera will require less bandwidth than a camera that can record
sharp images ; more pixels to send over the line = more bandwidth but also
increased please for the viewer. Some cameras have lenses that can be
adjusted especially if the distance object-camera is short.

And then there is resolution ; it's sometimes better to set the resolution
at 320x240 and increase the quality than to use a 640x480 image at a lower
quality setting, ofcourse unless people need to be able to read the notes.

However regarding the notes ; think of pointing one camera to the drawing
board and let it (no option in BBB yet) use quality 98% , bandwidth 20k,
640x480 or even 1024x768 and only 1 fps. That way every viewer will see a
crisp picture of the drawingboard at a low framerate but it wouldn't cost a
lot of bandwidth neither.

Once we can store camera-based quality/bandwidth/framerate settings this
would be a very viable solution for class-room situations.

Regards,
Walter

Paul

bigbluebutton-...@googlegroups.com.

Paul Ascher

unread,
Mar 5, 2010, 8:22:44 AM3/5/10
to bigblueb...@googlegroups.com
Thanks for your insights Walter.

I noticed what you said about quality above 90 and it's true. The thing is, on my previous attempts, the frame rate would always be lame, no matter what I was passing,
and also, the bandwidth upstream usage would never go over 120 kilobytes per second, even thought I'm in my LAN. That made me think that bandwidth was being limited
somewhere and the frame rate was dropping as a consequence(i.e. quality was taking precedence).

Commenting setKeyFrameInterval and passing false for the last optional parameter of setMode changed this behaviour, now I don't notice any frame rate loss and quality is still good, thought a bit more pixelated than before for 90 as quality, still, pretty good thought.  Also I noticed that my upstream usage increased a bit, specially with one of my cameras. I'm going to fiddle with the quality param and see what happens. Also I'm going to buy a new webcam, one with a sharper image, I'm pretty sure the cameras are what are "limiting" the upstream now, and I hear the classrooms and pros have nice cameras.

I'll post the results here.

Best,

Paul

Walter Tak

unread,
Mar 5, 2010, 8:45:56 AM3/5/10
to bigblueb...@googlegroups.com
You can try to get yourself a simple DV camera , use a simple tool that makes the DV cam emulate a webcam and you'll be able to send DV (NTSC/PAL) quality images to the server.
 
Quick round of google:
 

Paul Ascher

unread,
Mar 5, 2010, 8:55:51 AM3/5/10
to bigblueb...@googlegroups.com
Great idea, thanks for the tip.
Reply all
Reply to author
Forward
0 new messages