IP Camera Streaming

This tutorial covers how to stream from an IP camera to a computer, use a computer's webcam as an IP camera, combine multiple streams, and make the combined stream viewable to others on the Mesh.

Software needed:

Recieving a Stream with VLC

Download and install VLC Media Player from the link above. Consult the owner of the stream (or the manual of your camera) to find the streaming address. It will likely start with rtsp://. Open VLC and press Ctrl+N. Enter the streaming address into the field, then press play. If it doesn't work, you likely used the web interface URL. Consult your manual, as the stream address varies by device.

Use a Computer's Webcam as an IP Camera

Open VLC and press Ctrl+C. Select your webcam from the list (on Linux it's usually /dev/video0. Press play. If you see the feed you're looking for on your screen, then that's the right one. Otherwise repeat until you find the right one. Once you find the right one, repeat up until you press Play. Instead of pressing play, press Alt+S. You'll see a new dialog pop up. Press next.

If you want the feed to show in the VLC window as well as over the network, check "Display Locally". Click the menu that says "File". Click RTSP and then click the Add button. For advanced users, choose whatever port you want. Otherwise leave this alone. Click next twice. Check the box that says "Stream all elementary streams". Click Stream.

You're done! To see this feed elsewhere, use the stream address rtsp://YOUR-COMPUTER-NAME:8554/. Of course if you used a different port change it here, but other than that you're all set!

Combine Multiple Streams

This one uses Open Broadcasting Software. Note that if you want to have this combined stream visible over the mesh (or on any computer other than the one you're on), you will need to have a Linux server, either the computer you're on or one connected to the same router (NOT ON A DIFFERENT MESH NODE!!!).

First, install OBS Studo from the link above. Accept the agreement. The main window will pop up.

Send the Combined Stream Across the Mesh

This takes the stream you created in OBS and lets other people connect to it as if it were an IP camera. It uses OBS, of course, but in addition Nginx (pronounced engine x) with an RTMP module.

First, download and run the script linked above. Note that the script as it is will only work on Debian systems, but all you need to do to port it to other *nix systems is install the dependencies some other way and the rest of the script will work. Also note that you need internet access at runtime.

Now you're done with the server. Just like that. Nginx may not run on startup, in which case to start it again run sudo /usr/local/nginx/sbin/nginx.

Pull up OBS. Click on Settings, then go to the Stream tab and click show. Type in the URL box rtmp://{your-server-uri}/live, and put whatever you want in the Stream Key box. Click OK.

Click Start Streaming to start streaming. To see the stream, follow the top VLC instructions and for the URI use rtmp://{your-server-uri}/live/{whatever-you-put-for-the-stream-key}. Congratulations! You're done!