Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Live stream a session via RTMP #8295

Open
ffdixon opened this issue Nov 5, 2019 · 108 comments
Open

Live stream a session via RTMP #8295

ffdixon opened this issue Nov 5, 2019 · 108 comments

Comments

@ffdixon
Copy link
Member

ffdixon commented Nov 5, 2019

BigBlueButton implements the core conferencing capabilities you would expect in a commercial web conferencing system (and gives them to you under an open source license).

The focus of the project is engagement with users. It does this by extending these core capabilities to give the presenter: multi-user whiteboard, shared notes, polling, breakout rooms.

This works well for small to medium-sized sessions, and we currently recommend using BigBlueButton for sessions of 100 users or less.

There are times, however, when you want to broadcast a session to much larger numbers of users. One way of achieving this would be to join a BigBlueButton session with a headless browser, capture the video and audio, and stream it to a CDN using RTMP.

If we give the instructor the ability to initiate such a broadcast and provide the CDN endpoint, then the presenter could still have engagement with the users that join via the BigBlueButton client, but also reach the users that are watching live on the CDN stream.

@jibon57
Copy link
Contributor

jibon57 commented Nov 5, 2019

@ffdixon this will be really good feature. Not all the time we want to interact users with classroom. Sometime we just want them to see the activities only. Really good feature to have here :)

@samuelpeixoto
Copy link

@ffdixon
We have had a few moments when we just want users to see the room. Really this will be a very useful resource.

@Jossef-767
Copy link

do you mean capture the headless browser screen,?
including presentation, screen share, and external video,?
they will all be a part of the strearm going to CDN ?
if so, this  strearm can be used to create a "1 video file" recording format that can be downloaded.  
and maybe replace the current recording creation method, that is pretty complicated to support.

@ffdixon
Copy link
Member Author

ffdixon commented Nov 6, 2019 via email

@Jossef-767
Copy link

That is right Fred. It will indeed require too much server resources.

@modcastro
Copy link

Does the room have a final rtmp signal that can be taken to CDN with real time audio and video? example: rtmp: // xxxx: 1935 / room_number

thanks

@ffdixon
Copy link
Member Author

ffdixon commented Dec 22, 2019

Does the room have a final rtmp signal that can be taken to CDN with real time audio and video? example: rtmp: // xxxx: 1935 / room_number

It does not, but one could write a virtual client (FireFox running within a virtual frame buffer such as xvfb), join the session as user broadcast, and then use ffmpeg to capture the contents of the virtual frame buffer and stream it as an RTMP stream to a CDN.

That's basically the outline of how to implement this feature.

@ffdixon
Copy link
Member Author

ffdixon commented Feb 13, 2020

Thanks, we've been working with WebRTC for many years now with BigBlueButton.

We have a good idea of how to implement this feature, but right now our priority is to continue to improve the core of BigBlueButton itself. See

http://docs.bigbluebutton.org/support/faq.html#when-will-feature-x-be-implemented

@Lukas2000
Copy link

Thanks, we've been working with WebRTC for many years now with BigBlueButton.

We have a good idea of how to implement this feature, but right now our priority is to continue to improve the core of BigBlueButton itself. See

http://docs.bigbluebutton.org/support/faq.html#when-will-feature-x-be-implemented

Thanks for starting this thread. At the school I've setup this project for, they have certain classes that get broadcasted to hundreds of students simultaneously who are essentially listeners only (even more now due to covid-19). For the elderly, it's difficult for them to figure out the intricacies of the system and they consistently have trouble joining. It would be much easier for them if we could have a "live" page on the website where they could simply point their browser to and watch the class. I very much do understand the limitations on your time. Unfortunately this is beyond my personal skillset. Is there any interest in setting up a bounty for this feature that perhaps a few of us can contribute to?

@jibon57
Copy link
Contributor

jibon57 commented Mar 27, 2020

It does not, but one could write a virtual client (FireFox running within a virtual frame buffer such as xvfb), join the session as user broadcast, and then use ffmpeg to capture the contents of the virtual frame buffer and stream it as an RTMP stream to a CDN.

That's basically the outline of how to implement this feature.

@ffdixon thanks you. I did something like this here: https://github.com/jibon57/bbb-recorder
At present I am using that to export video file after recording but I am quite sure this can be use for live broadcasting too.

https://github.com/jibon57/bbb-recorder/blob/7a30b088be795c9c033d78b07b9744917bfa22ab/background.js#L53

here I am getting data which can be further process. If someone have experience on it can make it work quickly.

@bilias
Copy link

bilias commented Mar 28, 2020

I've managed to push audio only from bbb conference to wowza via rtmp by enabling mod_av in freeswitch.

Don't know how to move on from here and include the whole conference (video, shares, as it is seen by a web client)
Probably something similar has to be done on kurento or red5?
not that familiar with the internals of bbb.

On the other hand is WebRTC also an option now that is enabled in wowza?

Any hint on these kind of publishings would be appreciated.

@jibon57
Copy link
Contributor

jibon57 commented Mar 28, 2020

Although I am not expert on this side but I was able to send screen sharing over rtmp. But it will require huge cpu to process. So, at present I am capturing screen & sending to server using WebSocket. Later server will use ffmpeg to live transcoding to send data to rtmp server directly.

@bilias
Copy link

bilias commented Mar 28, 2020

Screen sharing and rtmp sending is best done with OBS.
But this is not a option if you want to it for multiple streams. Also it's a bit technical for teachers...

@jibon57
Copy link
Contributor

jibon57 commented Mar 28, 2020

@bilias in my solution I am using ubuntu server & sending one student as bot. But yes, bit complicated.

@kinimodmeyer
Copy link

kinimodmeyer commented Mar 29, 2020

Hello together,

i just want to mention that this feature would be really appreciated 👍
(not only in this corona times)

at the moment we hosting sessions with over 100 people. we also streched this now to 150 but we are scared to scale it more (especially because of the client side where we have no experience)

such a feature would be awesome. we used obs-studio for youtube/facebook but it is a lot of work.
i don´t know if it would be really necessary to stream live many meetings in parallel. in most situation i guess not.

@Lukas2000
Copy link

It seems Jitsi does a good job with this, in terms of allowing the user to enter a key for youtube live for the meeting to re-stream there. I believe that their Jibri service does it exactly the way you did, @jibon57.

@jibon57
Copy link
Contributor

jibon57 commented Mar 30, 2020

@Lukas2000 you can give a try my implementation from here: https://github.com/jibon57/bbb-recorder but has few limitation left. Will be happy if someone contribute.

@kinopsis
Copy link

kinopsis commented Apr 9, 2020

This company solve the problem. https://elos.vc
Captura3
Captura2
Captura1

@bilias
Copy link

bilias commented Apr 9, 2020

Would be nice if they contribute the code back to the community.
Does the license requires them to do so?

@warrior1724
Copy link

There are guys from mconf.com - company behind elos.vc service. May they already pulled this funcionality back to the core BBB.

@ffdixon
Copy link
Member Author

ffdixon commented Apr 13, 2020

We're working on increasing the (soft) limit for number of users in a session in the next release of BigBlueButton, which will be 2.3.

We'd like to get to 150 comfortably, in which case they need for a live streaming solution goes down a bit more.

@Lukas2000
Copy link

This company solve the problem. https://elos.vc
Captura3
Captura2
Captura1

This looks wonderful. Anyone have a contact there that they can speak to about contributing that code back to the community?

Although the increased limit would definitely be nice, the issue has more to do with the inability for some (especially the elderly) to figure out the system at all. For them, it needs to be as simple as turning on the tv (or in this case, going to a page on the browser).

@mtsonline
Copy link

Hi ...

@ffdixon is there a scheduled date for 2.3 being released yet? And which changes are planed, that improve the limitation of usercounts?

@jibon57 you say: "Sometime you may want to broadcast meeting via RTMP. I did some experiment on it & got success but not 100%. " Could you improve your results in the meantime and got a stable life streaming?

Wouldn't it be interesting to use this captured stream to send it to all users as video instead of sending every videeo to every user? This would allow to have quite unlimited webcams active at the same time - wouldn't it?

thanks

@kinimodmeyer
Copy link

@mtsonline i guess it depens how "stable" such a feature would be.

when you have only one video then you missing features like draging webcams / making one specific webcam big and so one.

@fcecagno
Copy link
Member

Not cool, @shareefhiasat. Next time you reach out a company requesting information you intend to copy and paste to a public forum, make your intention clear.

@shareefhiasat
Copy link

Not cool, @shareefhiasat. Next time you reach out a company requesting information you intend to copy and paste to a public forum, make your intention clear.

@fcecagno You are right, i felt its wrong, deleted it

Sorry all.

@fcecagno
Copy link
Member

Hi everyone, want to comment on behalf of Mconf regarding the streaming feature we have on Elos, since it was mentioned here. We've been part of the BigBlueButton community since 2011, and during this period we had contributed back to the community in code and support, and we also built a business based on it, helping people and businesses in Brazil and abroad - we wrote a blog post a while back about BigBlueButton and Mconf (it's in Brazilian Portuguese but you can Google Translate it if you're interested): https://blog.elos.vc/a-historia-da-colaboracao-entre-mconf-e-bigbluebutton/. The streaming feature is a value added to our service, and at this moment we do not intend to contribute it to the open source, although we continue contributing back in many other ways.
If you need any other information, please feel free to reach me out directly, so we do not flood this issue.

@ffdixon ffdixon unpinned this issue Feb 19, 2021
@ichdasich
Copy link

Due to some requests by users for user controlled streaming (via greenlight) I threw together a small orchestration around the existing docker container; Together with a small greenlight patch, this lets users enable streaming for their rooms themselves (Select 'stream this room' in the room-settings; Stream pops up under a fixed url.).

Might be useful for somebody: https://github.com/ichdasich/bbb-stream-control

@INKland
Copy link

INKland commented Mar 25, 2021

Just fyi ... if that is of interest. We just had 591 people in one room ... at around 400/450 we had to switch Presenters-Video off (before that we had even two presenter videos running) and go with Audio-Only (and presentation) ... what (to our surprise) killed the server was when the presenter started a poll ... the server was pretty good 32 vCPU and 128 GB RAM ... so just to give you an idea ... spread out in multiple rooms (we had 20-30 presenters some rooms up to 100 visitors) the server was fine up to 300 users ... so I'd say that is virtually the limit for a normal server I guess ... at some point it makes no sense to run the chat etc. since ppl are only listening with a room of 500 ... also administration (kick users that do not behave) is pretty much a challenge scrolling name-lists ;) ... so I think if we would have had an easy option to stream the presentation, outside BBB, we would have done that!

@ichdasich
Copy link

Take a look at stream control; If you combine that with your own streaming platform (not the static stuff in the examples), this can probably flow relatively easily and help you distribute load esp. for view-only events.

@JDFDEV
Copy link

JDFDEV commented Mar 31, 2021

Hello Everyone:
Could some give an update if the following event could stress out the capabilities of BBB?

  1. In the Main Room would 80~85 People including 3 presenters with live streams. All Participants would have the Webcams off at this point. Polls would also be hosted on a couple of occasions.
  2. The Breakout-rooms(Here are my main Concerns): We are planning to have 12 Breakout-rooms with about 7 Participants per Room and all must have their webcams ON. That would bring us to about 600 Streams on that server (7x7x12) :S

Would our beloved BBB being able to handle this? The Setup would be on a 18Core+HT Server with 128GB Ram.

We were planning otherwise to distribute the meeting on to multiple (Smaller Spec-d thou) Servers for the Breakout-rooms..

Any Thoughts on this?

@kbindra
Copy link

kbindra commented Apr 21, 2021

Can we somehow take raw streams from the bbb meeting and broadcast them live to RTMP server as youtube live?

@hex-m
Copy link
Contributor

hex-m commented Apr 26, 2021

Can we somehow take raw streams from the bbb meeting and broadcast them live to RTMP server as youtube live?

There you go: https://github.com/lukas2511/bbb-streaming

@valerio-bozzolan
Copy link

valerio-bozzolan commented Aug 2, 2021

There you go: https://github.com/lukas2511/bbb-streaming

Whoa @lukas2511 nice work! That's very promising! Maybe that's the right direction. Is anyone using it?

I don't think it was mentioned, so I say it:

We have a BountySource prize for BBB+RTMP

Prize amount: 200 $ (Ago 2021)

Spoiler: there are plans to add more money to this Bounty to further encourage developments. Source: Italian Free and Open Source cultural associations. Other people might be encouraged to add some dirty money as well.

Why people invest in this bug?

At the moment lot of Free and Open Source communities are investing on BigBlueButton to handle conferences or webinars or school assemblies but BBB cannot scale to more and more than 100 viewers. That's why the ability to stream BBB via RTMP is useful: to allow thousands of viewers to join directly from their favorite social networks or from other places (e.g. hosting yourself an nginx + mod_rtmp HLS video player).

Some workarounds not yet mentioned:

Proposed goal

The goal is to avoid workarounds and have an way to do RTMP streaming directly from BBB.

Basic functionality:

  • create an RTMP stream (yes, what do you see on desktop when the chat is closed is fine enough)

Bonus point:

  • have a new role able to operate as "video director" and allow that operator to have room for intervention about webcam positions and focus

Supermega-awesome bonus point:

  • create an HLS stream directly from BBB (to be embedded in whatever HTML5 video player and be able to avoid social networks and use your own website) (one example implementation)

Thank you again to @ffdixon for reporting this bug. Maybe it's a good time to set [BountySource] in the title of this issue.

@ichdasich
Copy link

Isn't this basically covered by, e.g., https://github.com/lukas2511/bbb-streaming + bbb_stream_control, at least with greenlight? I mean, setting custom RTMP dst. should essentially be easy to patch into bbb_stream_control (which currently only supports self-hosting)

@lukas2511
Copy link

Isn't this basically covered by, e.g., https://github.com/lukas2511/bbb-streaming + bbb_stream_control, at least with greenlight? I mean, setting custom RTMP dst. should essentially be easy to patch into bbb_stream_control (which currently only supports self-hosting)

You can also just give my streaming tool a join url, it doesn't need greenlight to enter.

I'm going to continue work on this in the next few days, hopefully having it more stable and working with an up-to-date BBB version until the 20th so it can be used for FrOSCon

@ichdasich
Copy link

ichdasich commented Aug 2, 2021

Yeah, but i thought that this was also about having it integrated in the frontend, so users don't have to manually spawn the tool. :-)

That's where the stream control stuff for GL is handy (https://github.com/ichdasich/bbb-stream-control)

@aguerson
Copy link

aguerson commented Aug 2, 2021

Here, I explained how to create a rtmp server
Just in case aau-zid/BigBlueButton-liveStreaming#83

;)

@FreeScholar
Copy link

We don't have a bounty program right now for the BigBlueButton project.

All the core development is done by a (growing) group of developers that work at commercial companies, educational institutions, and, to some extent, volunteer their time.

Live streaming is not trivial to implement ...

Could we set up an account with https://opencollective.com/ - who would do that? I am struggling to set up an account and not that geeky to grasp it all yet, but could work with someone to do it transparently.

@valerio-bozzolan
Copy link

All the core development is done by a (growing) group of developers that work at commercial companies, educational institutions, and, to some extent, volunteer their time.

Awesome! If one of these commercial companies is available, can they send a salesperson's contact here, or right to [email protected]? Thank you so much!

@FreeScholar
Copy link

FreeScholar commented Aug 4, 2021

@valerio-bozzolan You can contact Bob Teng at http://mynaparrot.com (Bob Teng [email protected]) - I recently wrote to him to try and figure this all out and how the community can get the updates his team has made for RTMP streaming etc.
I have talk to a few other people ad it looks like some companies are holding out on this feature and calling it a "value add" Bah! -
Bob is the only person that actually responded to me and that is awesome. I am going to schedule a chat with him and advise him of some better business models I know of and see how I can be helpful, let me know if you want to join in (anyone on this board is welcome to join us for a chat next week) Just ping me at [email protected] and I will add you to the invite when I send it.

@jibon57
Copy link
Contributor

jibon57 commented Aug 4, 2021

@FreeScholar I'm Jibon working in MynaParrot. Our RTMP solution is already open source. You can have a look from here: https://github.com/jibon57/bbb-recorder
We're using that solution & for our case we just change UI little bit so that user can insert information. This solution won't be accepted by BBB because bbb-recorder will use lot of CPU during process it. We are using lot of extra servers to process that. We're paying extra for servers because this is helping our clients to fulfill their demand. There is no easy way to integrated RTMP with BBB.

Also writing company's internal communication not fair to open in public community as you did in your post.

@FreeScholar
Copy link

FreeScholar commented Aug 4, 2021

Hi @jibon57 - I am one of your clients - nice to meet you here. Thank you so much for responding with details! The work you have done is excellent - hmmm, I get it now - the extra CPU/power is a barrier to a lot of people. I am not geeky enough to grasp the whole issue but I can see why it is problematic. I think it would be great if people with more knowledge can jump in on this and perhaps find a way to make this happen for BBB - perhaps a fork? That would get messy I think, but I do not know (I know the word 'fork' *lol)
Apologies for my post, frustration got the better of me - not frustration with you or Bob or the parrot, but with the whole Capitalist thinking we are all a victim of. It prevents us from thinking out of the box on how to make $ and provide a service that is accessible to all - I was trying to show that companies DO need to make $ to pay their deveoplers for the hard work and that maybe as a BBB centered community we can come up with a better business model that many can adapt to pay developers - not to disparage mynaparrot at all because I think highly of MynaParrot and love what you are doing. I may have not worded it correctly as I have not had my morning coffee yet.

I edited my post and removed the email response from Bob. I think has response was on target though!

@FreeScholar
Copy link

a bounty program for the BigBlueButton RTMP project
https://www.bountysource.com/issues/83209021-live-stream-a-session-via-rtmp

@GhaziTriki
Copy link
Member

Hi Everyone,

As @ffdixon explained, implementing a live streaming solution for BigBlueButton is not trivial, the bounty does reflect the efforts needed for a such project. On the one hand as @fcecagno mentioned it is an added value that makes the contributors companies stay healthy in the commercial support providers ecosystem, on the other hand thanks to Frictionless Solutions at RIADVICE we were able to trigger the development of an open-source platform that answers to this specific requirement, that solution name is https://github.com/spoutbreeze/spoutbreeze.

The development so far is complex and there is a lot of components involved to make the integration smooth with BigBlueButton. Definitely it is going to be installed on different machine because it is risky to share the same resources of a BigBlueButton server for live video encoding. The solution is designed to be scalable and it contains a dashboard for a minimum administration and management.

The discussions are open https://github.com/spoutbreeze/spoutbreeze/discussions, you will find all the information you need and of course all contributions are welcome to this project.

@lonesomewalker
Copy link
Contributor

@GhaziTriki looks/sounds promising :P
Any chance to fund this?

@GhaziTriki
Copy link
Member

Hi @lonesomewalker,

RIADVICE is open to that but also looking for resources and brains to solve some of the issues we have. Feel free to contact me on my mail to discuss further. Check my github profile for my e-mail.

@hex-m
Copy link
Contributor

hex-m commented Jul 20, 2023

From the bigbluebutton-dev mailing list:

Dear Community,

I am delighted to introduce BigBlueButton Streaming - a free, open-source plugin developed to take your virtual classrooms global.

Stream live on YouTube, Facebook, Vimeo, or any RTMP server directly from BigBlueButton.

Overcome user limits and teach without boundaries. Super simple installation.

Your feedback and contribution would be greatly appreciated.

Kind Regards,
Nishekh E R

@bilias
Copy link

bilias commented Jul 20, 2023

@hex-m that is very interesting. Cudos for such a long waited feature for BBB.

Could you please add a couple more details on your github

  • how it works? Components?
  • how is it configured after installation

thanx

@hex-m
Copy link
Contributor

hex-m commented Jul 20, 2023

@bilias i'm just relaying the message. Such questions should probably go to the mailing list or the issue tracker of the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests