-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
RTMPS support for Facebook Live API's Upcoming Requirement #1397
Comments
I've just seen the same @JosueAChavez and started panicking. I am using nginx on a raspberry pi to push streams to facebook live and wondering how to do this after 1st May 2019. I understand at this time that nginx does not support RTMPS however from doing some searching, it looks like you can use stunnel somehow. This looks above my level so I am reluctant to try it on my raspberry pi server. |
I'm on the same issue, I use a command today: push rtmp://live-api-s.facebook.com:80/rtmp/KEY; push rtmp://x.rtmp.youtube.com/live2/KEY; When replacing the address with rtmps the server does not rise. Can someone help? |
I have the same issue as I also use the RTMP module to stream to FaceBook live. |
I am looking at nimble streamer as an alternative, apparently that supports RTMPS |
Nimble appears to require a subscription? If so, that's not for me. |
I have a solution to run an stunnel and publish to the
Yes, you need to choose another port if nginx is listening on :1935 |
Lax, I had been reading about stunnel but couldn't figure out how to configure it. Thank you so much for the tutorial!!! I'll give it a shot! One question: Since nginx is listening on port 1935, doesn't stunnel need to be listening to a different port since they are running on the same machine? |
I have had a look at this article and I don't understand how it works. Does anyone have any idea? |
I'm assuming it will be 443 |
jwainwright87, Lax's tutorial has nginx and stunnel running on the same box so they both can't be listening to port 1935. For my testing, right or wrong, I chose port 207 (an unused AppleTalk port) for stunnel to listen on. Initial testing shows that Lax's example works for me, however I did have to remove the "include = /etc/stunnel/conf.d" line though. It appears to me that right now FB will accept an RTMP or an RTMPS stream regardless of the SLL switch setting. I use OBS to stream and nginx to relay to FB, YT and a private 3rd party web site. So here is how it works: obs -> nginx (port 1935) -> stunnel (port 207) -> FB. I run nginx and now stunnel on a ubuntu 18.04 server. |
@ForrestScott That's ace I'll give that a go. I got a bit confused during one tutorial it was talking about setting up a certificate from the client side. Do you know it stunnel sorts all that out for you. Also, how do you sent the rtmps feed instead of the rtmp address? Thanks in advanced |
HI, I'm trying this on a windows machine. Any idea on the configuration to work properly on stunnel? but got: |
@jwainwright87 I didn't have to do anything with security certificates. I think that is what the "verifyChain = no" line is about. But I do wonder about that. I changed my nginx push to FB to this: "push rtmp://127.0.0.1:207/rtmp/;" Again, I am using port 207 for stunnel. @franMx I got the same message but in my case I think it can be ignored since nginx and stunnel are communicating on the same machine. |
Thanks, @ForrestScott unfortunately got this one. 2019.04.04 09:46:49 LOG5[1]: Service [fb-live] accepted connection from 127.0.0.1:53922 Would you mind sharing your conf? |
@franMx , that looks exactly what I see in my log. Here is my conf: setuid = stunnel4 [fb-live] |
Thanks @ForrestScott, it's working now. On windows stunnel didn't modified the first part, just second block. |
Thank you @Lax for the solution! I tried it and it works perfectly and with little to none performance hiccups 🙌 I wrote instructions for those who are using this on Windows. We are all not doomed after all! |
Yes, you need to choose another port for stunnel if Nginx is already listening on :1935. |
Having some issues when I am running the following command This is my output... `==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ===
Apr 05 17:01:04 NginX systemd[1]: Starting LSB: Start or stop stunnel 4.x (TLS tunnel for network daemons)... I did have a issue when installing stunnel4. For some reason it would not let me create the stunnel.conf in bash, so I had to manually create the conf file using nano and input the code in there. Any help would be much appreciated. |
I am also getting this when entering the code for the config file:
|
@jwainwright87 , are you running your commands as sudo? It's required but not mentioned in Lax's guide. |
@ForrestScott Yes, sorry forgot to mention that. I am also running on Debian Stretch |
@Lax, you saved my day, it worked out right here, thank you! |
@ForrestScott SOLVED my problem. Issue I had was I needed to ENABLE=1 stunnel in When I ran the restart, it all worked. Link to article that helped me https://cindyxiaoxiaoli.wordpress.com/2014/06/04/get-stunnel4-up-and-running-on-ubuntu-14-04/ |
Did you actually updated the document? It's still on port 1935 ;-) (and I can't get it to work) |
Can someone help me I think I am missing something I was able to install stunnel on my nginx server. However I am a bit confuse of the next steps. Can someone help |
I still get [!] /etc/stunnel/stunnel.conf:5: "verifyChain = no": Specified option name is not valid here |
@Yesha052 If you would look at the URL that you have posted, that is a Stream Key to Facebook's RTMP (with SSL) for Streaming TO Facebook. This feed is ONE WAY. So feeding this into ExoPlayer will not work. Check for a different link in the the OG API. Chances are, Facebook will not give you a direct link to get the video feed FROM Facebook servers, you'll probability get a link to the post or something such as that. In addition this Issue that you are having is NOT related to this issue, Either create a new Issue and work out of that or if you already have one work from that ticket. |
Is there anyway to pass the Facebook streaming key as a dynamic parameter in push directive ? I have been banging my head for the past 2 days to do it. Any help is much appreciated ! Thanks in advance ! |
I just removed verifyChain = no and it started working, by default it no |
I tried Lax's instructions, and also tried ForrestScott's changes in the stunnel.conf file, and I still can't get my live stream to show up in Facebook. When I type in When I type in
Is this normal? How do I even go about figuring out where its going wrong when the log is blank too? |
I'm starting to think that maybe this is a port forwarding issue for me. So when I created my nginx server, I did so on my Odroid HC2. Because I need access to port 80 on it, in the nginx.conf file, I changed the listen address from 80 to 8725 (made up number). So then in port forward, I have external port 1935 forwarded to internal port 8725 (for my Odroid's internal IP address). So then I thought that I should forward internal port 19350 (for stunnel) to 8725 as well. But I still can't receive the Facebook stream. Thoughts? |
I had to give up on my Odroid. I ended up signing up for Amazon AWS EC2 and installed nginx and stunnel on Ubuntu. I used ForrestScott's setup for stunnel.conf but with port 19350 instead:
Apparently, what is supposed to show when I restart stunnel with
Lastly, I can see errors with stunnel by typing in |
I really don't know why this bug report is full of so much prattle. stunnel works fine. |
OK so I have the RTMP server running, and can do live streams to a website. I have set up the stunnel4 as done in the instructions and am not getting any error, however Facebook is not seeing an incoming stream, and checking netstat does not show a connection outbound to facebook. I do see the stream listening but not too sure if the RTMP server is connecting to the tunnel. |
got this working, thank you!!! |
thank you, that solved my errors in the setup made with these instructions: on Ubuntu 16.04.6:
Edit file stunnel.conf
setuid = stunnel4 Change in stunnel4 ENABLED=0 to ENABLED=1
ENABLED=1 Make dir
Edit /create file
[fb-live] restart
Edit file /usr/local/nginx/conf/nginx.conffrom
|
Hey guys, quick question: Has anyone tried using 2 different Facebook streams on nginx and stunnel? I'm a little bit more curious about how the stunnel config would be since both streams would use the same destination domain live-api-s.facebook.com:443 So the following would work?: [fb-live1] [fb-live2] |
It is not necessary because the hostname and port do not change, only the stream name changes. You only need a single point in stunnel. |
Thanks! it worked |
Hey guys sorry for posting this issue here but today, there was a tragedy during streaming. A friend (DJ) connected to my nginx server via Virtual Dj and reported the following errors:
Below is my Nginx config:
I want to know whether the issue was on my friends side (maybe a bad internet connection), or an issue on the Nginx server side (see below) I saw the following lines in the nginx error log:
|
I would guess since the problem largely affected audio that your DJ friend was copyright struck. |
Same here. Happened at least 3 times in the last 3 months, soo quite annoying... stream was pushed to YouTube without any problem, so nginx worked fine, stunnel showed connection from nginx, but Facebook did not get ANY data. I suspect stunnel not connecting correctly to FB, but cannot prove it yet... |
I may have the same problem. Once in a great while, as in perhaps once every 3 months or so, my FB feed won't start but YT is fine. We start streaming 10 min early before the event so we catch this situation and fix it by restarting the stream. |
@ForrestScott you restart the stream only or the tools too? |
We just restart the stream from within OBS. |
How can i fix this error
|
Having the same error :( |
I'm getting two issues when trying to set this up and work: 1) My current stunnel.conf looks like this: If I activate setuid and setgid, I'm getting error messages like this: 2) The connection with facebook does not work. I'm getting this error message: I'm doing this on a mac. Any suggestions? |
I got this message when configuring stunnel4 on Raspberry PI 4 B (arm). My conclusion now, is that 32 bit support for raspberry pi is quickly going down. stunnel4 for arm, lacks features, and recompiling the latest stunnel4 on raspi no longer possible. To skip the lah-di dah, what I did is following the instructions for Bash on Ubuntu on Windows (WSL 2) and now it works by pointing the RTMP server to rtmp://172.28.165.42/live |
I used centos, but was unable to run stunel, so i switched to Ubuntu 18 with this guid, and it works for me! |
That did not explain what you did, at all. |
You should install and configure it using WSL 2, -if you have windows-. |
Facebook is planning to deprecate RTMP on May 1st.
Using the SSL option for my RTMP connection changes the Server URL from
rtmp://live-api-s.facebook.com:80/rtmp/
tortmps://live-api-s.facebook.com:443/rtmp/
.When I insert that URL paired with my streaming key in my nginx.conf file, I'm returned with an invalid port message that looks like
I suspect that the port
rtmps
is unknown.Are there any workarounds to use this module with RTMPS? This module is very efficient compared to alternatives solutions I found (ffmpeg).
I'm using nginx 1.7.11.3 Gryphon on Windows 10.
The text was updated successfully, but these errors were encountered: