Multiple USB Cams, one per printer
I have three Microsoft USB Cameras. The first one was plugged in, and easily setup on the first printer. I plugged in the second one, but it's not automatically showing up at port 8081.
I've rebooted and tried again, but can't get the second camera to show.
It does show up as /dev/video1.
Do I need to manually go edit a file to get another copy of mjpg_streamer running?
Comments
I've verified the cameras work with Cheese.
This is on a Debian box, running a licensed version of 0.90.7.
to use the path insetad. Using /dev/video0 ..2 is not a good idea since the names are given by order of detection so might change after boot.
I guess somewhere there lies your problem.
Use
ps aux | grep mjpg
to see running instances including ports where they offer the webcam.
drwxr-xr-x 2 root root 60 Jan 7 21:42 .
drwxr-xr-x 4 root root 80 Jan 7 21:42 ..
lrwxrwxrwx 1 root root 12 Jan 7 21:42 usb-Microsoft_Microsoft®_LifeCam_HD-3000-video-index0 -> ../../video2
drwxr-xr-x 2 root root 100 Jan 7 21:42 .
drwxr-xr-x 4 root root 80 Jan 7 21:42 ..
lrwxrwxrwx 1 root root 12 Jan 7 21:42 pci-0000:00:14.0-usb-0:1.2:1.0-video-index0 -> ../../video1
lrwxrwxrwx 1 root root 12 Jan 7 21:42 pci-0000:00:14.0-usb-0:2.2:1.0-video-index0 -> ../../video0
lrwxrwxrwx 1 root root 12 Jan 7 21:42 pci-0000:00:14.0-usb-0:2.4:1.0-video-index0 -> ../../video2
root@print:~#
root@print:~# ps aux | grep mjpg
root 1000 0.0 0.0 43124 9920 ? Sl Jan07 0:25 /usr/local/bin/mjpg_streamer -i /usr/local/lib/mjpg-streamer/input_uvc.so -d /dev/video0 --fps 15 -q 85 -r 1280x720 -o /usr/local/lib/mjpg-streamer/output_http.so -p 8080 -w /usr/local/share/mjpg-streamer/www -b
root 1029 0.0 0.0 3119388 10956 ? Sl Jan07 0:00 /usr/local/bin/mjpg_streamer -i /usr/local/lib/mjpg-streamer/input_uvc.so -d /dev/video2 --fps 15 -q 85 -r 1280x720 -o /usr/local/lib/mjpg-streamer/output_http.so -p 8082 -w /usr/local/share/mjpg-streamer/www -b
root 4908 0.0 0.0 4728 892 pts/0 S+ 08:43 0:00 grep mjpg
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'YUYV'
Name : YUYV 4:2:2
Index : 1
Type : Video Capture
Pixel Format: 'MJPG' (compressed)
Name : Motion-JPEG
WEBCAM_HEIGHT=768
You can check /var/log/syslog when you start mjpg streamer on the missing /dev/videox and see why it does not start or directly send
/usr/local/bin/mjpg_streamer -i "/usr/local/lib/mjpg-streamer/input_uvc.so -d /dev/video1 --fps 15 -q 85 -r 1280x720" -o "/usr/local/lib/mjpg-streamer/output_http.so -p 8082 -w /usr/local/share/mjpg-streamer/www"
without -b for background and see messages on screen.
Looks like your solution uses only the /dev/videox devices.
BEST_WIDTH=1024
BEST_HEIGHT=768
BEST_FRAMERATE=3
echo "Best resolution: $BEST_WIDTH x $BEST_HEIGHT at $BEST_FRAMERATE"
In our docs section on the homepage we also use that solution I think.
https://www.repetier-server.com/setting-webcam-repetier-server-linux/
to contain the latest version of your webcam solution for linux.
lsusb -t
# Monitor USB bandwidth:
sudo apt install git cmake g++ libboost-dev libpcap-dev libboost-thread-dev libboost-system-dev
git clone https://github.com/aguinet/usbtop.git
cd usbtop/
cmake .
make
sudo modprobe usbmon
sudo src/usbtop