Open achingbrain opened 10 years ago
Have done a bit more digging. The simplest way seems to be using netcat to send the video stream from the rpi to the server, then get the server to transcode it into something useable.
The default version of netcat on the Mac seems b0rken, but installing the homebrew one works.
On the Mac:
nc -lp $PORT_NUMBER | /Applications/VLC.app/Contents/MacOS/VLC -I "dummy" - --sout $SOME_VLC_OPTIONS
On the rpi:
raspivid -o - -w 640 -h 480 -t 9999999 | nc -v $SERVER_IP_ADDRESS $PORT_NUMBER
When the game server accepts the client connection it should set up the streaming port and tell the client where to send it's video.
Using HLS has unacceptable latency (10-15 seconds) because it's not designed for real time streaming.
VLC can output a number of real time protocols (rtp, rtsp, etc) but HTML5 video doesn't support any of them so we may need to write an app to play them back.
Make video available from the Raspberry Pi's video camera over RTSP (more details):
Then on the server, transcode RTSP to HLS so we can view it on a telephone (this is too heavy for the Pi):
Then, on a webpage, open the HLS video stream, draw it onto a canvas and apply graphics. Target acquisition, etc.