how to improve the 0.81's desktop sharing speed?

282 views
Skip to first unread message

chaojidan

unread,
Jul 23, 2013, 9:49:29 PM7/23/13
to bigblueb...@googlegroups.com
Hi.everyone,
I am doing the work to improve the desktop sharing speed.
when I study the code,I have some question?
1.in the ScreenVideoEncoder.java file,encodePixelsSVC2 function encode and compress the block's pixels,,but I didn't find the decoded's code in the applet-app.and I find out that ByteArray are encoded the Videodata.could flash play the encoded and compressed videodata?
and I want to study the SVC2 encoder and decoder and change the encoded way to reduce the data.so who can tell me where could find the material abhout the SVC2.
2.I could use Lossy compression algorithms instead of lossless compression algorithms(Deflater)? 
3.when I use Grayscale images instead of  Color Image,I could use 8 kinds color to instead of 256 colors,but I have to use 8 bit to encode,because of the byteOutputStream.



could you speak of your suggest?
Thank you!

Calvin Walton

unread,
Jul 24, 2013, 12:27:42 PM7/24/13
to bigblueb...@googlegroups.com
On Tue, 2013-07-23 at 18:49 -0700, chaojidan wrote:
> Hi.everyone,
>
> I am doing the work to improve the desktop sharing speed.
> when I study the code,I have some question?
>
> 1.in the ScreenVideoEncoder.java file,encodePixelsSVC2 function encode
> and compress the block's pixels,,but I didn't find the decoded's code
> in the applet-app.and I find out that ByteArray are encoded the
> Videodata.could flash play the encoded and compressed videodata?

Yes, SVC2 is actually "Flash Screen Video Codec 2". Flash is able to
play it back directly, so we don't need to provide any decoder.

> and I want to study the SVC2 encoder and decoder and change the
> encoded way to reduce the data.so who can tell me where could find the
> material abhout the SVC2.

Most of the information about the codec is reverse-engineered from
samples of the file format, and there aren't really any public
specifications. My understanding is that BigBlueButton's Java
implementation and FFmpeg's C implementation:
http://git.videolan.org/?p=ffmpeg.git;a=blob;f=libavcodec/flashsv2enc.c;h=1d0d1963f6f9448eb8eb228ca79fda7c3cc39efe;hb=refs/heads/master
are the only publicly available open-source codes.

> 2.I could use Lossy compression algorithms instead of lossless
> compression algorithms(Deflater)?

SVC doesn't support any lossy compression methods. If you want to use
lossy compression, you should look into using a completely different
codec (e.g. you could try using SV6 or H.264).

> 3.when I use Grayscale images instead of Color Image,I could use 8
> kinds color to instead of 256 colors,but I have to use 8 bit to
> encode,because of the byteOutputStream.

I don't think that SVC supports using any less than 8 bits per pixel.
The 8-bit per pixel format is actually 7-bits, it only uses a 128-colour
palette (not 256). It's theoretically possible that if you don't use all
128 palette entries (e.g. if you only include 8 shades of grey and no
colours in the palette), then the Deflate() compression should be more
efficient and give you smaller output.

--
Calvin Walton <calvin...@kepstin.ca>
BigBlueButton Developer

chaojidan

unread,
Jul 24, 2013, 10:21:50 PM7/24/13
to bigblueb...@googlegroups.com
Hi,Calvin Walton,Thank your reply!
your answer is basically what I think.
you are very smart,I admire you.
and I still have a few questions to ask?
1.in the ScreenVideoEncoder.java file,you encoded every pixels in the Block,and could  I encoded half of the pixels,Although the image quality will decline?because I could halving the data.
2.in the ScreenVideoEncoder.java file,you call the changePixelScanFromBottomLeftToTopRight function,why do you change the block Pixels array like that?it can improve the speed of transmission.?
and you change the block Pixels array,why the displayed image scan from BottomLeft  to TopRight with the block unit?
3.int the NetworkStreamSender.java file,I see two ways to send the data,one is socketSender,another is httpSender. the PORT decide on the achoice,because you have been designated the PORT(1935),so the socketSender is always be used,and the httpSender never be used,it is true?


I looking forward your detailed reply,
Thank you .

Daniel


chaojidan

unread,
Jul 30, 2013, 4:57:50 AM7/30/13
to bigblueb...@googlegroups.com
在 2013年7月25日星期四UTC+8上午12时27分42秒,Calvin Walton写道:

Fred Dixon

unread,
Jul 30, 2013, 7:46:47 AM7/30/13
to BigBlueButton-dev
Hi Daniel,

You don't need to post again.  We (the core developers) and the community all saw your original post.

I say this for the benefit of others as well: keep in mind that we volunteer our time here in these forums.  If you want to engage with the the community, then we encourage you to stand out amongst others who just post questions but really never contribute anything.

  - Have you tried to setup a development environment?  
  - Have you tried benchmarking any of the existing code to look for bottlenecks.  
  - Have you tried any modifications and benchmarked the results?

I'm not saying that you have to do all this to get a reply, but time is a precious commodity.  If you are seen as someone contributing to the discussion, then you'll find many other willing to help.


Regards,... Fred
-- 
BigBlueButton Developer
BigBlueButton on twitter: @bigbluebutton


--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bigbluebutton-...@googlegroups.com.
To post to this group, send email to bigblueb...@googlegroups.com.
Visit this group at http://groups.google.com/group/bigbluebutton-dev.
For more options, visit https://groups.google.com/groups/opt_out.
 
 




Calvin Walton

unread,
Jul 31, 2013, 5:24:41 PM7/31/13
to bigblueb...@googlegroups.com
On Wed, 2013-07-24 at 19:21 -0700, chaojidan wrote:
> Hi,Calvin Walton,Thank your reply!
> your answer is basically what I think.
> you are very smart,I admire you.
> and I still have a few questions to ask?
> 1.in <http://1.in/> the ScreenVideoEncoder.java file,you encoded every
> pixels in the Block,and could I encoded half of the pixels,Although the image
> quality will decline?because I could halving the data.
> 2.in <http://1.in/> the ScreenVideoEncoder.java file,you call the changePixelScanFromBottomLeftToTopRight
> function,why do you change the block Pixels array like that?it can improve
> the speed of transmission.?
> and you change the block Pixels array,why the displayed image scan from BottomLeft
> to TopRight with the block unit?
> 3.int the NetworkStreamSender.java file,I see two ways to send the data,one
> is socketSender,another is httpSender. the PORT decide on the
> achoice,because you have been designated the PORT(1935),so the socketSender
> is always be used,and the httpSender never be used,it is true?
>
>
> I looking forward your detailed reply,
> Thank you .

At this point, I really don't know any more than you do, or than you
could find out with a little searching...

Most of the parameters there (e.g. encoding half the pixels, or any
changes to the pixel scan) are mandated by SVC2 codec. If we change any
of them, then Flash would no longer be able to decode the video.

The socketSender vs. httpSender distinction is used for HTTP tunnelling
of the deskshare connection when port 1935 isn't accessible (e.g.
firewall). I'm not familiar with the current state of that feature.

HostBBB.com

unread,
Aug 1, 2013, 9:23:25 AM8/1/13
to bigblueb...@googlegroups.com
Isn't .81 deskshare still connecting port 9123 for publisher, then falling back rtmpt 80?
 
regards,
Stephen

chaojidan

unread,
Aug 15, 2013, 5:15:04 AM8/15/13
to bigblueb...@googlegroups.com
Hi,all.
I am doing the desktop share.
In the /bigbluebutton/deskshare/applet/src/main/java/org/bigbluebutton/deskshare/client/ directoy,I found many java flies,and in the java file,there are some "System.out.println" code.
I want to watch the information,but I can't find it.
can you tell me where or how I can watch it?
Thank you!

Bl Ma

unread,
Aug 15, 2013, 10:37:25 AM8/15/13
to bigblueb...@googlegroups.com

Fred,

We are currently testing BBB for our training. We put into EC2. I tried few things to make it workable for our upcoming training program. In a uplink bandwidth limited scenarios, desktop sharing is not really usable. I created a remote desktop server as an another instance for the presenter to access with VNC, I found it performed better and sharing experience is better. I suggest we explore to add a light weight remote browsers and better whiteboard that will solve altogether the need for desktop sharing in most of the application. Should some one need to use several other applications to share their desktop, remote VNC could help.

I can contribute more when I have more understanding of the code.

Re: Voice quality improvement, it is not usable currently for us. On the same network with skype to skype call is better. I was trying to connect to conf. bridge of free switch using Linphone sip client from my ubuntu pc, I could not make it working. Any specific instruction will help. I already tried out various configuration suggested in various forums of this project, I could not get this working. I really wanted to compare the differences so to conclude to book an audio bridge instead.

Regards
BLMA

HostBBB.com

unread,
Aug 15, 2013, 11:52:09 AM8/15/13
to bigblueb...@googlegroups.com
BLMA- what size EC2 instance are you using?  we have many production c1.medium, c1.xlarge running is production with good audio results
 
DeskShare performance depends on a few things.
 
1) Actually PC cpu/ram that is running Java screen capture app (cheap low end laptops don't do well)
2) Upload bandwidth of presenter network connection.
 
Once the data gets to server, red5 does a great job of pushing it out to everyone.
 
If your using full screen deskshare with video cams on as well I wouldn't be surprised if audio quality is suffering because of network congestion at participants end.
 
Also if your BBB server is on public internet, and your in an office LAN behind a router with a bunch of users trying to test performance you will quickly congest most offce connections.
 
I'd look at the network paths closely.   Skype peer to peer will always give you better audio quality, but BBB is definitely production capable.
 
regards,
Stephen

Fred Dixon

unread,
Aug 15, 2013, 4:48:47 PM8/15/13
to BigBlueButton-dev
Hi,

> We are currently testing BBB for our training. We put into EC2. I tried few things to make it workable for our upcoming training program. In a uplink bandwidth limited scenarios, desktop sharing is not really usable. 

We recommend that presenter has (at lest) 1 Mbits/second upload speed.  See



I created a remote desktop server as an another instance for the presenter to access with VNC, I found it performed better and sharing experience is better. 

This would be expected.  When running a VNC server on your computer to server up the desktop, your probably running a binary application.  

> I suggest we explore to add a light weight remote browsers and better whiteboard that will solve altogether the need for desktop sharing in most of the application. 

What features are you looking for in the whiteboard?  You can see the current enhancement requests for the whiteboard here



> Should some one need to use several other applications to share their desktop, remote VNC could help.

As you can probably tell, we've written the desktop sharing applet for BigBlueButton and the desktop sharing server -- this enabled us to provide the simplest user experience (assuming you have Java correctly installed).

Most commercial desktop sharing implementations are having you run a Java applet that serves to download a binary application, or have you download a binary application straight away.  Some of these, I suspect, use the VNC protocol, which they implemented the viewer component in their client.

We didn't try to go down the VNC road for two reasons: (a) couldn't find a stand-alone, open source version of the VNC server as an applet, and (b) we would need to implement a VNC client in BigBlueButton.  There is flashlight VNC (see: http://flashlight-vnc.sourceforge.net/).  In the end, it was easier to write the desktop sharing applet to use SVC (and later SVC2) codec, write our own desktop sharing server (in Scala), and send out the desktop as a video stream to clients.  See


We're always interested in making desktop sharing better, so you can expect us to continue to work on it in future versions.


I can contribute more when I have more understanding of the code. 


   
> Re: Voice quality improvement, it is not usable currently for us. 

This may be a bandwidth issue as well.  To see how to troubleshoot, 


To test the audio with a different server, you can use


and see if the audio is any better. 

> On the same network with skype to skype call is better. 

It's a different architecture.  Skype audio is P2P UDP, whereas BigBlueButton audio goes through a central server (so we can record it) and is TCP based (a limitation of Flash).

I was trying to connect to conf. bridge of free switch using Linphone sip client from my ubuntu pc, I could not make it working. Any specific instruction will help. I already tried out various configuration suggested in various forums of this project, I could not get this working. I really wanted to compare the differences so to conclude to book an audio bridge instead.

It might be a firewall issue.  Check your open ports and the FreeSWITCH documentation for running on EC2.



Regards,... Fred
-- 
BigBlueButton Developer
BigBlueButton on twitter: @bigbluebutton

Bl Ma

unread,
Aug 15, 2013, 11:41:09 PM8/15/13
to bigblueb...@googlegroups.com
Dear Stephen,

Answers in line as BLM>>

Regards
BLMA


On Thursday, August 15, 2013 9:22:09 PM UTC+5:30, HostBBB.com wrote:
BLMA- what size EC2 instance are you using?  we have many production c1.medium, c1.xlarge running is production with good audio results
 
BLM>>
1. BBB is running as medium instance and the cpu usage is very low and so BB server in EC2 does not seem a problem.
2. When I created a Remote desktop as an another EC2 instance - Ubuntu - Medium - with full screen - it chokes with CPU hitting full. The cpu is utilized by java. Surely the java applet needs optimization. When I make the remote desktop as Large and geometry as 1024x768 with depth=16, the performance is acceptable. Even in this scenario, the BBB server running as an another instance, the cpu is about 10%.
3. Pl. check screenleap.com for similar functionality in browser sharing. I think they also use java applets to scan but performance is far better.
4. So I was really wondering if desktop sharing is a real worth an option? Why not consider creating a remote browser with file downloading to local pc that will meet 90% of use case scenarios. May be you can keep the desktop sharing button as well.




 
DeskShare performance depends on a few things.
 
1) Actually PC cpu/ram that is running Java screen capture app (cheap low end laptops don't do well)
2) Upload bandwidth of presenter network connection.
 
 
Once the data gets to server, red5 does a great job of pushing it out to everyone.
 
If your using full screen deskshare with video cams on as well I wouldn't be surprised if audio quality is suffering because of network congestion at participants end.
BLM>> Even if put every thing off and do only desktop sharing, it is too bad from my local PC.  See my comments above on performance with the remote PC at EC2 and its performance.
 
Also if your BBB server is on public internet, and your in an office LAN behind a router with a bunch of users trying to test performance you will quickly congest most offce connections.
 
I'd look at the network paths closely.   Skype peer to peer will always give you better audio quality, but BBB is definitely production capable.
BLM>>I tried with linphone - point to point routed through sip.linphone.org - found the voice quality excellent.   In the same set up (0.81 beta) with freeswitch ip as 127.0.0.1 - I am not clear if I can connect to the conferencing bridge from external SIP client? If so what ports must be opened at EC2? I read the documents and links given below many number of times and have no clarity on correct way to configure for an external access.

Fred Dixon

unread,
Aug 16, 2013, 9:10:00 AM8/16/13
to BigBlueButton-dev
Hi BLM,

Replying to the group so others can see your response to my post.

Regards,... Fred



On Fri, Aug 16, 2013 at 12:41 AM, Bl Ma <time...@gmail.com> wrote:


On Friday, August 16, 2013 2:18:47 AM UTC+5:30, Fred Dixon wrote:
Hi,

> We are currently testing BBB for our training. We put into EC2. I tried few things to make it workable for our upcoming training program. In a uplink bandwidth limited scenarios, desktop sharing is not really usable. 

We recommend that presenter has (at lest) 1 Mbits/second upload speed.  See


BLM>> Our bandwidth as per the speedtest.net is about 3.9 Mbps downlink and about 400 Mbps uplink.


I created a remote desktop server as an another instance for the presenter to access with VNC, I found it performed better and sharing experience is better. 

This would be expected.  When running a VNC server on your computer to server up the desktop, your probably running a binary application.  

BLM>> Even if the remote desktop is a large instance it is really cpu hungry with desktop enabled? I am not sure if I use windows server instead of Ubuntu, will it be any different due to native RDP support by Windows. 
Reply all
Reply to author
Forward
0 new messages