Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,21 @@ ENV DAILYMOTION_STREAMKEY NULL
ENV LIVECODING_URL rtmp://eumedia1.livecoding.tv:1935/livecodingtv
ENV LIVECODING_STREAMKEY NULL

ENV FACEBOOK_URL rtmp://127.0.0.1:19350/rtmp
ENV FACEBOOK_STREAMKEY NULL

ENV YOUR_IP YOUR_IP
ENV PRIVATE_KEY anthonykgross
ENV STREAM_SPECIFIER hd720
ENV URL_TRANSCODE transcode
ENV URL_LIVE live
ENV EXPIRATION_TOKEN 3600

RUN apt-get update && \
apt-get install -y ca-certificates openssl libssl-dev stunnel vim&& \
rm -rf /var/lib/apt/lists/* &&\
mkdir -p /etc/stunnel/conf.d/

RUN mkdir -p /conf && \
mkdir -p /log && \
chmod 777 /log -Rf && \
Expand All @@ -50,6 +58,9 @@ ADD entrypoint.sh /entrypoint.sh

RUN cp /conf/nginx/nginx.conf /usr/local/nginx-streaming/conf/nginx.conf -f && \
cp /conf/supervisor/conf.d/supervisor.conf /etc/supervisor/conf.d/supervisor.conf -f && \
cp /conf/stunnel/fb.conf /etc/stunnel/conf.d/fb.conf -f && \
cp /conf/stunnel/stunnel4 /etc/default/stunnel4 -f && \
cp /conf/stunnel/stunnel.conf /etc/stunnel/stunnel.conf -f && \
chmod +x /entrypoint.sh

EXPOSE 80
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ $ docker-compose up -d
* Set your Stream RTMP from Dailymotion.
- **DAILYMOTION_STREAMKEY** (default :"NULL")
* Set your Stream RTMP from Dailymotion.
- **FACEBOOK_STREAMKEY** (default :"NULL")
* Set your Stream RTMP from Facebook.
- **YOUR_IP** (default : "YOUR_IP")
* Set your server's IP : Only useful in docker's logs.
- **PRIVATE_KEY** (default : "anthonykgross")
Expand Down Expand Up @@ -74,6 +76,7 @@ broadcaster_1 | = TWITCH_STREAMKEY : live_101724967_qLZMlwnxxpKqsqsfJ5lNcBc
broadcaster_1 | = HITBOX_STREAMKEY : qsfqf?key=Jn6Dsqdqsd8cpx
broadcaster_1 | = YOUTUBE_STREAMKEY : poopaplla-7537.ea0k-ef3-czsz
broadcaster_1 | = DAILYMOTION_STREAMKEY : 24646?auth=qeGP_9fb42e109944fa5b504e191
broadcaster_1 | = FACEBOOK_STREAMKEY : 12312385213123?s_bl=1&s_ps=1&s_sw=0&s_vt=api-s&a=AbyDXs7sMdsygq50
broadcaster_1 | =
broadcaster_1 | = URL live = rtmp://xxx.xxx.xxx.xxx:1935/live/
broadcaster_1 | = URL transcode = rtmp://xxx.xxx.xxx.xxx:1935/transcode/
Expand Down
5 changes: 4 additions & 1 deletion conf/nginx/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ rtmp {
# STREAM TO DAILYMOTION.COM
<dailymotion_active>push <dailymotion_url> playpath=<dailymotion_streamkey>;

# STREAM TO FACEBOOK.COM
<facebook_active>push <facebook_url> playpath=<facebook_streamkey>;

# STREAM TO LiveCoding
<livecoding_active>push <livecoding_url> playpath=<livecoding_streamkey>;

push rtmp://localhost/mobile/live;
}

Expand Down
5 changes: 5 additions & 0 deletions conf/stunnel/fb.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[fb-live]
client = yes
accept = 127.0.0.1:19350
connect = live-api-s.facebook.com:443
verifyChain = no
5 changes: 5 additions & 0 deletions conf/stunnel/stunnel.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
setuid = stunnel4
setgid = stunnel4
pid=/tmp/stunnel.pid
output = /var/log/stunnel4/stunnel.log
include = /etc/stunnel/conf.d
18 changes: 18 additions & 0 deletions conf/stunnel/stunnel4
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# /etc/default/stunnel
# Julien LEMOINE <speedblue@debian.org>
# September 2003

# Change to one to enable stunnel automatic startup
ENABLED=1
FILES="/etc/stunnel/*.conf"
OPTIONS=""

# Change to one to enable ppp restart scripts
PPP_RESTART=0

# Change to enable the setting of limits on the stunnel instances
# For example, to set a large limit on file descriptors (to enable
# more simultaneous client connections), set RLIMITS="-n 4096"
# More than one resource limit may be modified at the same time,
# e.g. RLIMITS="-n 4096 -d unlimited"
RLIMITS=""
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ broadcaster:
# HITBOX_STREAMKEY: "NULL"
# DAILYMOTION_URL: rtmp://publish.dailymotion.com/publish-dm
# DAILYMOTION_STREAMKEY: "NULL"
# FACEBOOK_URL: rtmp://127.0.0.1:19350/rtmp
# FACEBOOK_STREAMKEY: "NULL"
# LIVECODING_URL: rtmp://eumedia1.livecoding.tv:1935/livecodingtv
# LIVECODING_STREAMKEY: "NULL"
# YOUR_IP: YOUR_IP
Expand Down
12 changes: 12 additions & 0 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ run() {
sed -i -e "s,<hitbox_url>,$HITBOX_URL,g" /usr/local/nginx-streaming/conf/nginx.conf
sed -i -e "s,<youtube_url>,$YOUTUBE_URL,g" /usr/local/nginx-streaming/conf/nginx.conf
sed -i -e "s,<dailymotion_url>,$DAILYMOTION_URL,g" /usr/local/nginx-streaming/conf/nginx.conf
sed -i -e "s,<facebook_url>,$FACEBOOK_URL,g" /usr/local/nginx-streaming/conf/nginx.conf
sed -i -e "s,<livecoding_url>,$LIVECODING_URL,g" /usr/local/nginx-streaming/conf/nginx.conf

echo "==============================================================================================="
Expand Down Expand Up @@ -61,6 +62,17 @@ run() {
sed -i -e "s,<dailymotion_active>,#,g" /usr/local/nginx-streaming/conf/nginx.conf
fi

if [[ $FACEBOOK_STREAMKEY != "NULL" ]]
then
echo "= FACEBOOK_STREAMKEY : $FACEBOOK_STREAMKEY"
sed -i -e "s,<facebook_active>, ,g" /usr/local/nginx-streaming/conf/nginx.conf
sed -i -e "s,<facebook_streamkey>,$FACEBOOK_STREAMKEY,g" /usr/local/nginx-streaming/conf/nginx.conf

else
echo "= FACEBOOK_STREAMKEY : NOT FOUND!"
sed -i -e "s,<facebook_active>,#,g" /usr/local/nginx-streaming/conf/nginx.conf
fi

if [[ $LIVECODING_STREAMKEY != "NULL" ]]
then
echo "= LIVECODING_STREAMKEY : $LIVECODING_STREAMKEY"
Expand Down