bbb-voice development

152 views
Skip to first unread message

Dominic

unread,
Sep 11, 2012, 6:25:15 AM9/11/12
to bigblueb...@googlegroups.com
hi, BigBlueButton Developers.

I have been studying bbb-voice for several months.

and I have done some stress tests and studied bigbluebutton's code about voice, I found that:

bbb-voice's bottleneck is FS. because, bbb-voice creates a voice stream(FS<->RED5) for every client who joined voice conference. and every voice stream is made up of listen stream and talk stream. it means that the server must maintain two voice streams(listenstream and talkstream) for every client who joined voice conference. so it will spend much resources.

in most case, users don't need speak in the same time, usually, only presenter need speak in one time, so I made a  design based on such situation:

a. only presenter talk in one time
b. non-presenter just listen.
c. moderator can change user's role to talk or listen.

I did some change based on bbb-voice code.

1.when presenter join the conference room(dial string) at the first time, bbb-voice will creat a talk stream for that conference(named dial-string-talkstream like 77888-talkstream).
2.when non-presenter join the conference room, if listenstream has been created, then do nothing, otherwise, create the listen stream for that conference(named dail-string-listenstream like 77888-listenstream)(note: the creation of listenstream and talksteam)
3.call client function, pass the parameters talkstream name and listenstream name for this conference.
4.in client, presenter just publish the talkstream and the non-presenter just play listen-stream.

so, the server need maintain just one listen stream and one talkstream for all users who belong the same conference room, and the presenter just publish the  talkstream for his conference room and non-presenter just play listenstream for his conference room. and if someone want talk, he just push his hand, and the moderator assaigned his presenter right, he will be enabled to publish the talkstream.

when the moderator change one's (named A) role from viewer to presenter. A change from play to publish. in that process, I encounter a problem. 
the others viewers cannot hear A's speaking.

presenter roles's changed


what mistake did i make?

Regards,... Dominic


Fred Dixon

unread,
Sep 11, 2012, 8:30:06 AM9/11/12
to bigblueb...@googlegroups.com
Hi Dominic,

Your on the right track.

Previously, the inclusion of the mute/unmute button in BigBlueButton 0.80 was a step towards modifying the voice architecture to support a single audio stream for the listener (but as you've seen, we didn't actually make any underlying modifications of how the voice worked).  The idea was user who starts muted needs only the listener stream, when they unmute themselves, the BigBlueButton client could join the audio as a normal, giving them a two way connection.  The challenge would be to switch between one and two way channels quickly enough so it was invisible to the user.

In your approach, the trigger for the two-way audio is assignment of presentation rights, which would guarantee that only one person is speaking at one time.  Also, there would be enough time to switch over the audio as part of switching to presenter.

However, we've have not tried to change the audio architecture, so we're not sure why it's not working for you.  Also, in the absence of any code, it's really hard to pinpoint the problem.

BigBlueButton is open source.  Are you able to publish your code so others can try and help debug?  If it becomes a viable solution to reducing the CPU load and scaling the audio, would you be willing to contribute the modifications back to the project for review and possible inclusion in a future release?  See



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




--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bigbluebutton-dev/-/Ag0dtYdJaN4J.
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.





Richard Alam

unread,
Sep 11, 2012, 10:25:46 AM9/11/12
to bigblueb...@googlegroups.com
Hi Dominic,

On Tue, Sep 11, 2012 at 6:25 AM, Dominic <ningw...@gmail.com> wrote:
Are you sure you are forwarding the RTMP audio packets into FreeSWITCH? The current design for the voice is that the stream is tied to a user. Perhaps during the
switch of roles you also perform a teardown of the call?

If you are willing to implement, we can work together on a detailed design document for the voice architecture to be able to support webinar mode.

Richard

 

presenter roles's changed


what mistake did i make?

Regards,... Dominic

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bigbluebutton-dev/-/Ag0dtYdJaN4J.
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.



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

Dominic

unread,
Sep 12, 2012, 7:12:53 AM9/12/12
to bigblueb...@googlegroups.com
Hi, Richard,

It's my pleasure to work together with you to design a webinar mode architecture. and I have been working on that for a long time.

Until now, I have implemented my first design. I changed much code in bbb-voice module. and I try to do another more flexible design.

my first design is based on below situation:
a. only presenter talk in one time
b. non-presenter just listen.
c. moderator can change user's role to talk or listen.

the follow is my designed server's response to client join:

server's response to client joining voice(connection.docall)


In client, when server call successfullyJoinedVoiceConferenceCallback, client will decide if his role is presenter,

if presenter, just publish(dialString-TalkStream)

if not, just play(dailString-ListenStream)


when his role change:

presenter to viewer:  stop publish(dailString-TalkStream), to play(dailString-ListenStream)
viewer to presenter:  stop play(dailString-ListenStream), to publish(dailString-TalkStream)

when the moderator switch the user's role, I don't recreated the voice stream, I encounter the problem, the other views cannot hear anything.

is my design correct?

Richard Alam

unread,
Sep 12, 2012, 10:50:10 AM9/12/12
to bigblueb...@googlegroups.com
Hi Dominic,

On Wed, Sep 12, 2012 at 7:12 AM, Dominic <ningw...@gmail.com> wrote:
Hi, Richard,

It's my pleasure to work together with you to design a webinar mode architecture. and I have been working on that for a long time.

Until now, I have implemented my first design. I changed much code in bbb-voice module. and I try to do another more flexible design.

my first design is based on below situation:
a. only presenter talk in one time
b. non-presenter just listen.
c. moderator can change user's role to talk or listen.

the follow is my designed server's response to client join:

server's response to client joining voice(connection.docall)


In client, when server call successfullyJoinedVoiceConferenceCallback, client will decide if his role is presenter,

if presenter, just publish(dialString-TalkStream)

if not, just play(dailString-ListenStream)


when his role change:

presenter to viewer:  stop publish(dailString-TalkStream), to play(dailString-ListenStream)
viewer to presenter:  stop play(dailString-ListenStream), to publish(dailString-TalkStream)


I think you shouldn't stop playing the dialString-ListenStream when the viewer becomes presenter. As it stops also for other users.
I'm assuming all users subscribe to that stream. Is that right?
 
when the moderator switch the user's role, I don't recreated the voice stream, I encounter the problem, the other views cannot hear anything.

is my design correct?

Can you tell me your github repo and the branch you are implementing this on?

I think that when you switch user and stop publishing, the streams are also torn down. Can you confirm that when you switch user, that the connection to FS
doesn't get torn down?

What do you display on the listener's window? I'm assuming only the presenter will get displayed there?

Isn't allowing only one user to speak limiting? You can't have a proper interaction as you have to switch users all the time just to converse.

What I had in mind is being able to assign speaker right to several users while the rest can only listen. For example, you can have 4 users allowed to speak
while the rest of the users only listens. Think of it as having 4 microphones and you pass the mic to someone who wants to speak. Essentially, you need to
create 4 dummy SIP users (dummy-user1, dummy-user2, dummy-user3, and dummy-user4) to connect to FreeSWITCH. All users can subscribe to any of
the dummy-user's audio stream to listen. So if you have 20 users, you can have 5 users subscribed to each dummy-user stream. 

Let's say that at first you have User-A, User-B, User-C, and User-D have "talk" rights. Then you want User-K to be able to talk, you can have User-A stop
publishing and User-K start publishing. And let's say that User-A was publishing through dummy-user1, you can re-user dummy-user1's stream to publish
User-K's stream.

Is this what you are trying to accomplish?

Richard
 

--
You received this message because you are subscribed to the Google Groups "BigBlueButton-dev" group.
To view this discussion on the web visit https://groups.google.com/d/msg/bigbluebutton-dev/-/E5Z4HmiadZQJ.

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.

Dominic

unread,
Sep 12, 2012, 10:22:45 PM9/12/12
to bigblueb...@googlegroups.com
Hi,Richard,
 
I think you shouldn't stop playing the dialString-ListenStream when the viewer becomes presenter. As it stops also for other users.
I'm assuming all users subscribe to that stream. Is that right?

I stop playing( from play(dialString-ListenStream) to play(null) ) in bigbluebutton-client phone module, I don't think it will stop also for other users. it has no effect on other users.

Yes, all users subscribe to that stream.
 
 
when the moderator switch the user's role, I don't recreated the voice stream, I encounter the problem, the other views cannot hear anything.

is my design correct?

Can you tell me your github repo and the branch you are implementing this on?

I am very sorry, I just know a little about git, I did not use git in development. I just clone bigbluebutton code to my computer and do development without git.

Everytime, I import the source code to eclipse, but I try many times to configure my bbb-apps development enviroment(eclipse), it is still not working.( it seems we must install FS, radius etc.) so now, I have to code with eclipse then copy to my sever and build it use ant. it is so much inconvenient. and if I just use vi in linux to code, it is also ineffective, do you have any better way to do development in bbb-apps and bbb-voice ? do you have any documents about that to help me? thanks a lot. 

yeah, I will know about git, when everything seems good, I will publish it to github repo.


I think that when you switch user and stop publishing, the streams are also torn down. Can you confirm that when you switch user, that the connection to FS
doesn't get torn down?

I am sure the connection to FS don't get torn down. because I don't hangup the call, I didn't change anyting about the voice stream in bbb-voice module. I just made the user(presenter->non-presenter) stop publish, start play. and made the user(non-presenter->presenter) play(null), start publish.

What do you display on the listener's window? I'm assuming only the presenter will get displayed there?
 
Listener's window is useless for my design architecture. because I don't need mute/unmute function. I don't need kick any user. Even I try to comment out that module by modifying config file.
 
Isn't allowing only one user to speak limiting? You can't have a proper interaction as you have to switch users all the time just to converse.

In most case, Just the presenter need talk, others listen. For example, In a class, a teacher speak, student listen. if some student want to share his idea, he can hands up, when he become a presenter, he can talk, others listen.

 
What I had in mind is being able to assign speaker right to several users while the rest can only listen. For example, you can have 4 users allowed to speak
while the rest of the users only listens. Think of it as having 4 microphones and you pass the mic to someone who wants to speak. Essentially, you need to
create 4 dummy SIP users (dummy-user1, dummy-user2, dummy-user3, and dummy-user4) to connect to FreeSWITCH. All users can subscribe to any of
the dummy-user's audio stream to listen. So if you have 20 users, you can have 5 users subscribed to each dummy-user stream. 

I don't think the design you mentioned below is right. 

For example, I create 4 dummy SIP users for 4 users(dummy-user1 for User-A, dummy-user2 for User-B, dummy-user3 for User-C, and dummy-user4 for User-D) to connect to FreeSWITCH. if User-E,User-F,User-G subsribe to dummy-user1, when User-A talk, User-E, User-F, User-G will not hear anything. of course, when User-B,User-C,User-D talk, everything is ok. So, do you agree with me? 

I think we should create one more dummy SIP user. For example, I create 5 dummy SIP users for 4 users ( dummy-user1 for User-A, dummy-user2 for User-B, dummy-user3 for User-C, dummy-user4 for User-D, and dummy-user5 for all listener ). all listener will subscribe dummy-user5, everything will be OK.
 
Let's say that at first you have User-A, User-B, User-C, and User-D have "talk" rights. Then you want User-K to be able to talk, you can have User-A stop
publishing and User-K start publishing. And let's say that User-A was publishing through dummy-user1, you can re-user dummy-user1's stream to publish
User-K's stream.

Is this what you are trying to accomplish?

 
Yes, you mentioned design is my second design, I am trying to accomplish. Are you willing to work together with me to implement it, I really need you help?

My english is a little poor, but I will try to make me understood. I hope I can make some contribution to this great program. thanks.
Reply all
Reply to author
Forward
0 new messages