心血來潮接上USB HUB然後把手上兩個usb camera同時接上!
用SSH 進去 OpenWRT的 Linux operating system
先安裝 opkg install usbutils 以便檢查 USB device
root@Arduino:~# find
/dev/bus/usb
/dev/bus/usb
/dev/bus/usb/001
/dev/bus/usb/001/005
/dev/bus/usb/001/004
/dev/bus/usb/001/002
/dev/bus/usb/001/003
/dev/bus/usb/001/001
root@Arduino:/# lsusb -t
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
|__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
|__ Port 1: Dev 3, If 0, Class=Hub, Driver=hub/7p, 480M
|__ Port 2: Dev 6, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 2: Dev 6, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 2: Dev 6, If 2, Class=Audio, Driver=snd-usb-audio, 480M
|__ Port 2: Dev 6, If 3, Class=Audio, Driver=snd-usb-audio, 480M
|__ Port 3: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M
|__ Port 3: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M
|__ Port 4: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
確定有兩台 video device後 開始進行介面的開發
在openWRT 下
mjpg_streamer -i \"input_uvc.so -d /dev/video0 -r 640x480 -f 6\" -o \"output_http.so -p 8080 -w /www/webcam
mjpg_streamer -i \"input_uvc.so -d /dev/video1 -r 640x480 -f 6\" -o \"output_http.so -p 8081 -w /www/webcam
將/dev/video0 的影像stream到 port 8080
/dev/video1的影像stream到port 8081
兩台Camera 對照的stream 照片
沒有留言:
張貼留言