Streaming to facebook from custom hosted jitsi

Is there any way we can configure Jitsi to work on facebook or any other streaming server.

Assuming that you have a working Jibri. On the Jibri host as root:

apt-get update
apt-get install stunnel

cat >/etc/stunnel/facebook.conf <<EOF
[facebook-live]
client = yes
accept = 127.0.0.1:1936
connect = live-api-s.facebook.com:443
verifyChain = no
EOF

systemctl stop stunnel4.service
systemctl start stunnel4.service

cat >/usr/local/bin/ffmpeg <<EOF
#!/bin/bash

ARGS=$@

if [[ -n "$(echo $ARGS | grep 'rtmp://.*://')" ]]; then
    DST_RAW=$(echo $ARGS | rev | awk '{print $1}' | rev)
    DST=$(echo $DST_RAW | sed 's~^[^:/]*://~~' | egrep -o '[^:/]*://.*')
    DST=$(echo $DST | sed 's~rtmps://live-api-s.facebook.com:443/~rtmp://127.0.0.1:1936/~')

    ARGS=$(echo $ARGS | sed "s~rtmp://.*~~")
    ARGS="$ARGS $DST"
fi

echo $ARGS >> /tmp/ffmpeg.log
exec /usr/bin/ffmpeg $ARGS
EOF

chmod 755 /usr/local/bin/ffmpeg

systemctl stop jibri.service
systemctl start jibri.service

Use the stream server address as the stream key when you want to start a stream.

Thanks… I was looking for a way, which allows me to run both youtube and facebook from UI.