Jitsi Rtmp

The reason I'm looking into this at all is because we have a customer that is looking to broadcast his Jitsi meetings through a private streaming server, so having an unlocked RTMP URL would definitely be nice. Learn more about Jitsi, a free open-source video conferencing software for web & mobile. Make a call, launch on your own servers, integrate into your app, and more. I know that Periscope used Wowza Media Server which internally uses RTMP. But given that now WEBRTC is a predominant streaming media choice for people, it should be doable using webrtc as well – ishandutta2007 Aug 3 '17 at 9:05.

RTMP-Server: For this you have to setup your own RTMP-Server and then use your RTMP URL + Stream key instead of the Youtube Stream key as described here. Self-installed Jitsi Meet deployments will need to setup Jibri to do this.

Rtmp

This is a guide that enables you simulcast to Youtube, Facebook, Periscope & any rtmp server
EDIT: Added support to Stream & Record Simultaneously. See NGINX-RTMP Section

You need to make sure your firewall doesnt block rtmp

Step 1: jitsi-jibri setup

I’m not going to detail it as @Woodworker_Life has written an excellent guide already

Installation of Jitsi Meet with Jibri on 2 servers with Debian 10 (buster) cloud VM’s. In this post, I will describe my steps to get a working setup of Jitsi Meet video conferencing with integrated Jibri recording and streaming. All steps are based on the readme instruction on Github with some additions and/or modifications. Jitsi quick install document on Github: https://github.com/jitsi/jitsi-meet/blob/master/doc/quick-install.md Jibri setup document on Github: https://github.com/jitsi/jibr…

OR if you prefer to have both jitsi & jibri running on the same machine, use this jitsi-jibri installer script developed by @Ark74

Step 2: Setup rtmp NGINX Proxy

It can be setup in any linux machine (VM or hardware). It might work in RPi but i’ve not tested it

a. Spin up an Ubuntu VM.

I prefer to run as root

apt update && apt upgrade -y

b. Install nginx and the required packages:

apt install build-essential libpcre3 libpcre3-dev libssl-dev nginx libnginx-mod-rtmp ffmpeg -y

c. Edit nginx.conf with vim, vi OR nano Space saving house.

nano /etc/nginx/nginx.conf

and Add the following lines in the end of the file. Make sure to adjust

Create the directory for recordings and make it writeable to the web server software:

d. restart nginx service

systemctl restart nginx.service

Step 3. Facebook uses rtmps and hence you need stunnel to send rtmps to facebook as NGINX RTMP proxy does only rtmp

a. install stunnel

apt-get install stunnel4 -y

b. Enable stunnel auto start

nano /etc/default/stunnel4

& Change ENABLE from 0 to 1

ENABLE=1

c. edit stunnel config. (This file is new & doesnt exist so go ahead )

nano /etc/stunnel/stunnel.conf

add the following lines.

d. enable stunnel after boot

systemctl enable stunnel4.service

e. restart stunnel

systemctl restart stunnel4.service

Double check Ports. ngnix an stunnel need to be on different ports when used on the same machine.
Facebook can be a bit finicky. If you dont see the preview in your producer page, just restart the stunnel4 service

Step 4: ffmpeg rtmp Script

@lodopidolo as create a brilliant yet a simple script to proxy the video from jitsi/jibri to the rtmp server/sink

Hi, I can’t edit previous post to correct it, so I write some modifications because previous script didn’t stop correctly. New version: #!/usr/bin/bashCOMANDO='/usr/bin/ffmpeg'while test $# -gt 0do T='$1' if [ '${T:0:32}' 'rtmp://a.rtmp.youtube.com/live2/' ]; then COMANDO='$COMANDO rtmp://my-server-for-rtmp:1935/sub-rtmp-url/${T:32}' else COMANDO='$COMANDO $T' fi shiftdoneecho 'Llamando a ffmpeg sustituyendo rtmp si hay: «$COMANDO».'exec $COMANDO PROCESO_FFM…

THIS HAS TO BE DONE ON THE JIBRI SERVER

a. Add a directory

Jitsi Rtmp

mkdir -p /opt/util

cd /opt/util

b. create a file

Jitsi Meet Rtmp

nano ffmpeg

I’ve changed the language to english, but it really doesnt matter. you can use his script code. paste the script below into the file & save

MAKE SURE of the location of /bin/bash & /usr/bin/ffmepg (which bash & which ffmpeg)

c. convert the file to be executable

chmod +x ffmpeg

d. now we have to make jibri run this script instead of the main ffmpeg

systemctl edit --full jibri

No add this line in [Service] section. please ensure your java_path is correct. else it will fail

Environment='PATH=/opt/util:/usr/lib/jvm/java-1.8.0-openjdk-amd64/jre/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin'

Save and you are all set to go

Rtmp

I recommend that you test it with burner accounts on all platforms. I prefer having a manual control in going live. You can enable auto-start but i prefer to CLICK on the GO LIVE button on all the platforms

Now start a meeting. Click on “Start Live Stream”. You can put any thing in the box. it really doesnt matter. I put the YT streamkey.

Once you go live, you should see the preview show up on all platforms

Feedback welcome

PRO-TIP - DO THIS ONLY IF YOU KNOW WHAT YOUR’RE DOING

Thanks to @xranby . He has show how you can modify the code to address the ONE-TO-MANY use case.

Head over here. once you make changes, you have to “make” your own build.