rodizio1 / EZ-WifiBroadcast

Affordable Digital HD Video Transmission made easy!
GNU General Public License v2.0
825 stars 200 forks source link

send stream to other pc connected via router #142

Closed loopdude closed 6 years ago

loopdude commented 6 years ago

I am setting up a sports stream using ez wifibroadcast and some raspberrys (and open broadcaster studio). I want to use multiple cams in a network connected via router which is the dhcp server. Grabbing the stream when the raspberry has the ethernet hotspot activated works perfect.

But how would I configure ezwifibroadcast to send the stream to a specific pc on the ethernet over a router? Would have to do this on multiple raspberrys. I know I have to deactivate the hotspot so the raspberry acts as a client. So the real question is how change the stream command (from gstreamer maybe??)? I dont know where I would have to do this. My guess would be to login to the raspberry and run some command. Is this correct?

Help very appreciated! Thanks in advance Jason

matiaspl commented 6 years ago

You might want to experiment with multicasts. Make each wifibroadcast to send it's stream to ie. 239.0.0.1-x. Then use udp://@239.0.0.1-x:port_number for inputs in OBS. In a simple lan it should 'just' work.

If not, just set a static IP address for the reciever and change .profile script so that the port numbers are unique and the target IP reflects the recievers' address.

loopdude commented 6 years ago

thanks for the reply I'll probably try your solution as it might be the cleanest.

after some research I found a way to solve my problem. so if anybody else is looking for a similar solution, here's what I did:

I created a script with following: sudo su ionice -c 1 -n 4 nice -n -5 cat /root/videofifo2 | nice -n -5 gst-launch-1.0 -v fdsrc ! h264parse ! rtph264pay ! "application/x-rtp,payload=(int)103,clock-rate=(int)90000" ! udpsink host=[YOUR DESTINATION IP] port=[YOUR DESTINATION PORT] &

and just simply call this script from rc.local.

next step is to test how the broadcast reacts to multiple setups. single setup worked like a charm.