RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.63k stars 10.63k forks source link

Integrate third party webrtc scalable broadcaster or server #1118

Closed maxlinux2000 closed 8 years ago

maxlinux2000 commented 9 years ago

Imagine being a teacher who wants to teach his students through this chat. Ideally, the teacher can make a broadcast transmission WebRTC with audio, video, screen, files, and that students can record the video on their mobiles / computer.

The scenarios can be manifold : telepresence conferences , live events ...

here some examples: https://www.webrtc-experiment.com/

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

steedos commented 9 years ago

+1

在 2015年10月16日,上午2:00,maxlinux2000 notifications@github.com 写道:

Imagine being a teacher who wants to teach his students through this chat. Ideally, the teacher can make a broadcast transmission WebRTC with audio, video, screen, files, and that students can record the video on their mobiles / computer.

The scenarios can be manifold : telepresence conferences , live events ...

here some examples: https://www.webrtc-experiment.com/

— Reply to this email directly or view it on GitHub.

Sing-Li commented 9 years ago

The webrtc-experiment styled multi-users video chat service (or broadcast) is already in the current version of Rocket.Chat, and should be working. See #933. This style of mesh network conferencing is absolutely not scalable.

Scalable broadcast will require infrastructure support (someone has to pay for the server-side bandwidth and computing resources) and integration of third-party (proprietary/patented) server/gateway/cloud services. Modified title to reflect this.

maxlinux2000 commented 9 years ago

mmm.... and connect rocket.chat to http://www.kurento.org/ as third-party server? It's opensource and seem good.

Sing-Li commented 9 years ago

The key question is, @maxlinux2000 - would you be willing to set up a server and offer the hosting and bandwidth for us to test during the development phase.

Even if you are willing, how many other users are willing and want to specifically run and manage a kurento server, pay for its resources and bandwidth, in order to use the features described.

maxlinux2000 commented 9 years ago

mmm... ok, I can setup a VPS in digitalocean with kurento and pass to you developper the access. The have only 20GB of space, but for testing is enought.

Obviously the server is only for testing porpouse, but I will write a simple script for auto setup, so everyone can have a private kurento media server for 5$ monthly in digitalocean or other similar company.

Please, still some days in order to setup a VPS for testing. (I need time to study kurento before)

regards MaX

Sing-Li commented 9 years ago

Awesome! Please keep us updated.

xjtufjj commented 9 years ago

For this feature, I suggest to take a look at jitsi-meet(https://github.com/jitsi/jitsi-meet), which is a mature webrtc based conference platform. Based on my limited knowledge, it uses the SFU as the forwarding core, not the MCU, which needs a lot CPU resource.

telemakhos commented 9 years ago

+1 for jisti-meet or a jitsi-videobridge solution. Janus gateway is another great option

compuguy commented 9 years ago

If this becomes an option, it would need to be configurable (i.e. allow rocketchat to use a in house broadcaster and/or render, especially in some situations where internet connectivity is limited or none.

compuguy commented 8 years ago

@Sing-Li If webrtc-experiment can be enabled, and pointed to a server, it needs to be documented somewhere.

maxlinux2000 commented 8 years ago

sorry for the delay but i'm stayed very busy for months. I tested kurento, but is very slow (20seconds of delay). May be with a more powerful machine.... So I abandoned kurento and reading above about jitsi-meet I test it.

jitsi-meet is amazing!! :+1:

work just fine in a VPS server with ubuntu 14.04 64bit, 512MB ram - 20GB HD.

here the script to install anc configure it automatly


#!/bin/bash

echo "LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8
LC_TIME=en_US.UTF-8
LC_MONETARY=en_US.UTF-8
LC_ADDRESS=en_US.UTF-8,
LC_TELEPHONE=en_US.UTF-8
LC_NAME=en_US.UTF-8
LC_MEASUREMENT=en_US.UTF-8
LC_IDENTIFICATION=en_US.UTF-8
LC_NUMERIC=en_US.UTF-8
LC_PAPER=en_US.UTF-8
" > /etc/default/locale

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
export LC_TIME=en_US.UTF-8
export LC_MONETARY=en_US.UTF-8
export LC_ADDRESS=en_US.UTF-8,
export LC_TELEPHONE=en_US.UTF-8
export LC_NAME=en_US.UTF-8
export LC_MEASUREMENT=en_US.UTF-8
export LC_IDENTIFICATION=en_US.UTF-8
export LC_NUMERIC=en_US.UTF-8
export LC_PAPER=en_US.UTF-8

#! update
apt-get update
apt-get -y upgrade

#! add swapfile
 sudo dd if=/dev/zero of=/swapspace bs=1M count=1000
 fallocate -l 1G /swapfile
 chmod 600 /swapfile
 mkswap /swapfile
 swapon /swapfile
 echo "/swapfile   none    swap    sw    0   0" >> /etc/fstab
 sysctl vm.swappiness=10
 echo "vm.swappiness=10" >> /etc/sysctl.conf
 sysctl vm.vfs_cache_pressure=50
 echo "vm.vfs_cache_pressure = 50" >> /etc/sysctl.conf

#! end swapfile

apt-get install -y curl git screen mc

#! changing skin mc
cd /usr/share/mc/skins/
mv default.ini default.ini.stop
ln -s gotar.ini default.ini
cd ~ 
#! end mc

echo 'deb http://download.jitsi.org/nightly/deb unstable/' >> /etc/apt/sources.list
wget -qO - https://download.jitsi.org/nightly/deb/unstable/archive.key | apt-key add -

apt-get update
apt-get -y install jitsi-meet

@Sing-Li: if you want to try to use jitsi-meet with rocket.chat I can setup a server for you

Sing-Li commented 8 years ago

@maxlinux2000 - awesome. What did you use as a client for your tests?

IQ2022 commented 8 years ago

i like that jitsi +1

maxlinux2000 commented 8 years ago

chrome or firefox are perfects clients for jitsi-meet so it's possible to use the plugin crosswalk-webviewer in the android/ios app. No other software are necessary to install.

Another vantage with jitsi are that is possible to use devices that can't pass the webtrc test: https://test.webrtc.org/

The differents resolutions of the cameras are not a problem. I can use an old laptop from 2008 (vga camera 640x480) with a economic smartphone with 320x240 of resolution.

Sing-Li commented 8 years ago

Thanks. Let's leave this open until the feature is implemented or veto'd.

engelgabriel commented 8 years ago

Depends on https://github.com/RocketChat/Rocket.Chat/issues/1392

compuguy commented 8 years ago

@maxlinux2000 @Sing-Li Based on your comments, jitsi-meet is a different product and/or solution. I was looking to add a webrtc backend for rocketchat, to remove the need for peer2peer connections, not another product.

LorbusChris commented 8 years ago

Jitsi-Meet is a WebClient UI, it's probably Jitsi-Videobridge that is needed here!

Sing-Li commented 8 years ago

@LorbusChris can you help with integration?

LorbusChris commented 8 years ago

@Sing-Li I'm not really an expert myself but I read up on it a bit last night. From what I understand Jitsi-Videobridge may not actually be the best starting point:

Jitsi-Videobridge is a Selective Forwarding Unit (i.e. enabling speedy multi user video conferencing) that plugs into an existing XMPP Server (like Prosody, eJabberd, etc.) adding the COLIBRI extension protocol to it. COLIBRI is supported by clients Jitsi and Jitsi-Meet. So there needs to be XMPP support in RocketChat first.

Also, I don't think it makes much sense to reinvent the wheel for XMPP & SIP as there already are mature options out there. Just to name a few:

XMPP Servers:

SIP Proxies:

The Debian and Fedora communities are currently testing out WebRTC services here: https://rtc.debian.org/ & https://fedrtc.org/ . Their setup consists of a TURN server, a SIP proxy and an XMPP server.

Now what I propose is to - as a community - pick one standard server for each protocol (TURN, SIP, XMPP: eg reSIProcate & Prosody ) and provide instructions/scripts to set them up and configure them with/for RocketChat (think 3rd party software bundle/meta package/docker?).

RocketChat then wouldnt be burdened with the server side of those things and would instead only have to provide the SIP/XMPP client side.

Later on, once SIP & XMPP are fully working, Jitsi-Videobridge could be added to the Server bundle, and COLIBRI support could be added to Rocket.Chat.

What do you think?

cracker0dks commented 8 years ago

The best MCU I found so far is Licode. I coded a teacher <-> student application on top of it witch works very nice. Also very scalable and runnable with docker. Did you found this yet?

JUN10R-Newb commented 8 years ago

You guys are headed in the jitsi-meet implementation direction?

Considering Licode too?

IQ2022 commented 8 years ago

I think we have an open issue for changing the UI for the video, audio, screen sharing.. and maybe have feature to make it like paltalk, ppl can chat voice if they wish to

Sing-Li commented 8 years ago

Great news. This has become a priority work item and is now work-in-progress. Thanks to an infrastructure partner. More information to come.

jelenajjo commented 8 years ago

Sounds interesting, cant wait to see.

kjcsb1 commented 8 years ago

From what I understand Slack is using Janus. Looking forward to the Rocket.Chat implementation.

Mbatey88 commented 8 years ago

I am very much looking forward to seeing this implemented in Rocket.Chat. Specifically iOS and Android devices.

shtefcs commented 8 years ago

How is going with development guys ?

I was wondering is it possible to use Google Hangout API and integrate it on RC ?

https://developers.google.com/+/hangouts/

Or this: https://github.com/algesten/hangupsjs https://github.com/google/instant-hangouts

Sing-Li commented 8 years ago

@shtefcs thanks for the links. We were struggling with the 10 users limit on google hangout ourselves and hope to integrate a superor solution from an infrastructure provider very soon.

shtefcs commented 8 years ago

Ok, great to hear that.

Really excited to see it.

shtefcs commented 8 years ago

@Sing-Li not sure about 10 user limit, didn't use hangout myself, but was part of some high traffic broadcast, it was worked without problems.

I just talked with the guys from https://www.designveloper.com/, they integrated Hangout OnAir API into streaming platform they just built with meteor https://www.crowdr.tv/

graywolf336 commented 8 years ago

As an update to this, we are starting to look into jitsi and have hopes to have it integrated if not in release 0.33 than in 0.34 but it will be in alpha and will need to be tested heavily. :)

bt commented 8 years ago

Great news! 👍

Will be happy and excited to test in the alpha 😁

Sing-Li commented 8 years ago

TESTING NOW!

THIS WEEK ONLY

On https://demo.rocket.chat

When you are in a Direct Message or Private Group. You will notice a new video button on the toolbar , just click it anytime to start a video conference with all those in the room

engelgabriel commented 8 years ago

Initial implementation of the integration merged as beta. Let's open other issues for bug reports and feedback.

andreas-bulling commented 8 years ago

Is there some documentation on how to set it up/test?

geekgonecrazy commented 8 years ago

@andreas-bulling currently in beta we will write some proper documentation once it exits beta.

But you just simply goto administration and enable jitsi. You can setup your own jitsi meet server then if you want: https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md

asshewale commented 6 years ago

Hiii @maxlinux2000 : I have integreted Jitsi in Rocket chat actually we are using our own server instead Rocket chat or Jitsi, My issue is when two users are chatting and one of them initiating a video call to other user (For this we are using Jitsi) the other user should get notify about the video call initiated by user one and he will be able to connect to him.

I am not able to understand how should i accomplish this, i read your comments above, you have deep exposure in Rocketchat + Jitsi, will you please help me to resolve my issue. please .

jasonnathan commented 6 years ago

Is this integrated?