Prepare:
1. necessary library(openwrt must have video support)
(if you do not know how to compile it, download here packages, or full firmware(no luci):
kmod-video-core_3.14.25-1_ramips_24kec.ipk
kmod-video-uvc_3.14.25-1_ramips_24kec.ipk
kmod-video-videobuf2_3.14.25-1_ramips_24kec.ipk
libjpeg_9a-1_ramips_24kec.ipk
mjpg-streamer_r182-2_ramips_24kec.ipk
copy all of them to vocore:
scp kmod-video-core_3.14.25-1_ramips_24kec.ipk root@192.168.61.1:/tmp/
scp kmod-video-videobuf2_3.14.25-1_ramips_24kec.ipk root@192.168.61.1:/tmp/
scp kmod-video-uvc_3.14.25-1_ramips_24kec.ipk root@192.168.61.1:/tmp/
scp libjpeg_9a-1_ramips_24kec.ipk root@192.168.61.1:/tmp/
scp mjpg-streamer_r182-2_ramips_24kec.ipk root@192.168.61.1:/tmp/
ssh to vocore, install:
opkg install /tmp/kmod-video-core_3.14.25-1_ramips_24kec.ipk
opkg install /tmp/kmod-video-videobuf2_3.14.25-1_ramips_24kec.ipk
opkg install /tmp/kmod-video-uvc_3.14.25-1_ramips_24kec.ipk
opkg install /tmp/libjpeg_9a-1_ramips_24kec.ipk
opkg install /tmp/mjpg-streamer_r182-2_ramips_24kec.ipk
2. one usb mjpg camera. mine get from taobao.com, cost about 12USD.
3.a vocore, need to connect with USB D+/D- and give the webcam 5V power.
3.b vocore + dock, this is much easier, directly connect to dock usb port.
Now, run
/usr/bin/mjpg_streamer -i "input_uvc.so -d /dev/video0 -resolution 320x240" -o "output_http.so -www /www/webcam"
(Note: “/etc/init.d/mjpg-streamer start” not working, have to call it directly)
Try with your browser 🙂 Plan to write a plugin for vohttpd, to make this easier.
http://192.168.61.1:8080/?action=stream