brem
Posts: 1
Joined: Fri Nov 29, 2019 8:29 pm

Stream from camera to multiple clients

Fri Nov 29, 2019 9:35 pm

Hi, I would like to use a video stream from a raspicam and set up a streaming service on the rpi that is able to stream to multiple sources at once.
In fact, I want to be able to stream to an on-board app as well as to anyone who would listen on a given port.

I know uv4l does that, but I wanted an open source and royalty free setup. I am able to use the mjpeg stream provided by uv4l for this purpose.

Also I would prefer to send a H264 stream.

Currently I tried ncat, multicat, vlc and gstreamer with either failure or incomplete succes.

I am able to setup a h264 service, but I can't share it with multiple users.

Do you have any suggestions as to how I could achieve something like this?

ohforforkssake
Posts: 3
Joined: Sun Dec 22, 2019 9:53 am

Re: Stream from camera to multiple clients

Sun Dec 22, 2019 10:17 am

Ok , I am assuming you are using a raspberry pi camera, know how to load your sd card with raspbian or some kind of linux, set to auto login, and get the wifi working on it. Next take the web streaming code from here: https://picamera.readthedocs.io/en/late ... -streaming The one you need is web streaming, put it in a text document called cam.py on your home folder on your rpi, don't need to change anything in this code. Next give it executable permissions: sudo chmod 644 cam.py Next download a python library you will need to run that code with: sudo apt install python3-picamera, next run it on boot with crontab -e, use nano, then enter @boot /etc/python3 ~/cam.py That's it, reboot and now it will be visible at http://raspberrypi.local:8000 through your browser on your phone or any device sharing your network

Now to share that to other devices anywhere outside of your network, Zerotier is a vpn for all devices, connect up to 100 devices free, gives you control over what devices are connected to your network

Return to “Advanced users”