Video Streaming - addycakes/Domotics GitHub Wiki
Both the arduino yun and raspberry pi run mjpg-streamer on boot to stream video from a UVC usb webcam to specific port on the local network. This port can be forwarded to allow for viewing outside the LAN.
To install mjpg-streamer I followed adafruit's setup guide for arduino, and for the raspberry pi this forum explained it well.
To start on boot for the pi, create a shell script with:
#!/bin/bash cd /home/pi/mjpg-streamer/mjpg-streamer/ ./mjpg_streamer -i "./input_uvc.so -d /dev/video0 -f 10" -o "./output_http.so -p YOURPORT -w ./www" &
Make sure to chmod 700 the script to make it executable. Then add this line to /etc/rc.local to have the script run when the pi starts up:
. FILEPATH_TO_SCRIPT.sh
For the arduino, the same can be accomplished by using the LuCi web panel at your arduino's LAN address. Under System>Startup find mjpg_streamer and enable it.