My main use is using the good camera in the mobile phone to stream in to the RTMP server, and any clients like OBS/VLC/ffmpeg etc can connect to the RTMP server to obtain the video.
It's simple enough to set up an RTMP server using NGINX in Linux and it doesn't take up much in the way of resources and runs fine on a Pi while it's doing other stuff. I've been using an NGINX RTMP server on a Pi whilst it is taking the input and sending to ffmpeg and out over SDR.
The quickest way to run one in Linux would be to use Docker. With docker installed the following will download and run an image and make the RTMP service available on 127.0.0.1:1935
Code: Select all
docker run -d -p 1935:1935 --name nginx-rtmp tiangolo/nginx-rtmp
While you could port forwarding to port 1935 from the Internet to allow you to stream in remotely, it would mean that anyone can connect to it. If you want to do this it would be better to use an alternative NGINX configuration file with some more secure options or obscure stream names.
You could do the like of this if you wanted to keep working with Docker, but it might be as easy to install it locally instead.
Code: Select all
git clone https://github.com/tiangolo/nginx-rtmp-docker.git
cd nginx-rtmp-docker/
< Edit nginx.conf to change the application from live to something obscure, or require auth or something else >
docker build -t nginx-rtmp-altered .
docker run -d -p 1935:1935 --name nginx-rtmp-altered nginx-rtmp-altered