Building a RTMP server(3 attempts)

So I’ve learned about something called an RTMP server, which allows you to stream to it through broadcasting software like obs and people then can watch your stream. I read that it’s actually quite light on a system so you can host it on something like a raspberry pi. But for me, I decided to use glitch. However I am unable to connect to any of the projects.
Project 3:https://glitch.com/~mstream
Project 2:https://glitch.com/~youthful-wedelia
The above use nodejs libraries
Project 1(Python cause I’m more familiar): https://glitch.com/~vidserver
I’ve tried connecting using the following settings
rtmp://glitchhostname/live
rtmp://glitchhostname/live/test
rtmp://glitchhostname:1935/live (pretty sure this one doesn’t work)
rtmp://glitchhostname:80/live (so i think by default it uses port 1935)
rtmp://glitchhostname:1935/live/something
The error I get is something like connection timeout. The logs of some of the projects display stream disconnected when I access it from the browser by typing projectaddress/live

Similar problem: https://stackoverflow.com/questions/57631427/streaming-video-from-obs-to-rtmp-server-running-on-heroku-and-using-node-media-s

1 Like

Are you using the domain or rtmp://glitchhostname/live?

i subsitute to glitchhostname with the url glitch gives me which is in the format projectname.glitch.me and type that into obs.

I have never done this before, but it look in the first one and it seems to be pointing to port 3000.

By default glitch usually exposes port 3000 to port 80, I think.
The fact that this doesn’t work is probaly due to the way glitch works with forwarding http requests to the server from another server. Since obs might not use http/https the requests it sends may confuse the glitch “router”.
I might be entirely wrong on this.

I said that because when you tried to connect to the server; you used this port. 1935

This is because of Glitch’s reverse proxy.

What happens is your project name is extracted from the URI, the reverse proxy find the project and sends the request to the corresponding project. Glitch’s reverse proxy exposes port 443 (and possibly 80) and redirects all requests to the corresponding container on port 3000 instead.

To get around your issue you can install a reverse proxy on your container and redirect requests yourself.

This does not affect your ratelimit any further, but still I would not recommend it.

2 Likes

It would be nice if there could be a socket based reverse proxy and a feature that would allow you to select ports to expose. Right now i’m running my rtmp server through ngrok and there’s an about 30 second lag