BUG: Motion with 2 cameras, only one works
I have motion running with 2 webcams. Only one works, other does not provide video. Tried lowering resolution with no luck.
Running xubuntu on ARM (odroid).
Output from motion and lsusb as follows:
root@odroid:/home/odroid# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Processing config file /etc/motion/thread1.conf
[0] Processing config file /etc/motion/thread2.conf
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3482368 LIBAVFORMAT_BUILD 3478785
[0] Thread 1 is from /etc/motion/thread1.conf
[0] Thread 2 is from /etc/motion/thread2.conf
[1] Thread 1 started
[1] cap.driver: "uvcvideo"
[2] Thread 2 started
[1] cap.card: "USB2.0 Camera"
[1] cap.bus_info: "usb-s5p-ehci-3.2"
[1] cap.capabilities=0x84000001
[0] motion-httpd/3.2.12 running, accepting connections
[1] - VIDEO_CAPTURE
[0] motion-httpd: waiting for data on port TCP 13921
[1] - STREAMING
[1] Config palette index 8 (YU12) doesn't work.
[1] Supported palettes:
[1] 0: YUYV (YUV 4:2:2 (YUYV))
[1] Selected palette YUYV
[1] Test palette YUYV (352x288)
[1] Using palette YUYV (352x288) bytesperlines 704 sizeimage 202752 colorspace 00000008
[1] found control 0x00980900, "Brightness", range 0,100
[1] "Brightness", default 30, current 30
[1] found control 0x00980901, "Contrast", range 0,100
[1] "Contrast", default 57, current 57
[1] found control 0x00980902, "Saturation", range 0,4
[1] "Saturation", default 2, current 2
[1] found control 0x00980910, "Gamma", range 1,8
[1] "Gamma", default 3, current 3
[1] mmap information:
[1] frames=4
[1] 0 length=202752
[1] 1 length=202752
[1] 2 length=202752
[1] 3 length=202752
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[2] cap.driver: "uvcvideo"
[2] cap.card: "USB2.0 Camera"
[2] cap.bus_info: "usb-s5p-ehci-3.3.4.4"
[2] cap.capabilities=0x84000001
[2] - VIDEO_CAPTURE
[2] - STREAMING
[2] Config palette index 8 (YU12) doesn't work.
[2] Supported palettes:
[2] 0: YUYV (YUV 4:2:2 (YUYV))
[2] Selected palette YUYV
[2] Test palette YUYV (352x288)
[2] Using palette YUYV (352x288) bytesperlines 704 sizeimage 202752 colorspace 00000008
[2] found control 0x00980900, "Brightness", range 0,100
[2] "Brightness", default 30, current 30
[2] found control 0x00980901, "Contrast", range 0,100
[2] "Contrast", default 57, current 57
[2] found control 0x00980902, "Saturation", range 0,4
[2] "Saturation", default 2, current 2
[2] found control 0x00980910, "Gamma", range 1,8
[2] "Gamma", default 3, current 3
[2] mmap information:
[2] frames=4
[2] 0 length=202752
[2] 1 length=202752
[2] 2 length=202752
[2] 3 length=202752
[2] Error starting stream VIDIOC_STREAMON: No space left on device
[2] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[2] Could not fetch initial image from camera
[2] Motion continues using width and height from config file(s)
[2] Resizing pre_capture buffer to 1 items
[2] Started stream webcam server in port 13922
[1] Started stream webcam server in port 13920
[2] Retrying until successful connection with camera
[2] cap.driver: "uvcvideo"
[2] cap.card: "USB2.0 Camera"
[2] cap.bus_info: "usb-s5p-ehci-3.3.4.4"
[2] cap.capabilities=0x84000001
[2] - VIDEO_CAPTURE
[2] - STREAMING
[2] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[2] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[2] Retrying until successful connection with camera
[2] cap.driver: "uvcvideo"
[2] cap.card: "USB2.0 Camera"
[2] cap.bus_info: "usb-s5p-ehci-3.3.4.4"
[2] cap.capabilities=0x84000001
[2] - VIDEO_CAPTURE
[2] - STREAMING
[2] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[2] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
[2] Retrying until successful connection with camera
[2] cap.driver: "uvcvideo"
[2] cap.card: "USB2.0 Camera"
[2] cap.bus_info: "usb-s5p-ehci-3.3.4.4"
[2] cap.capabilities=0x84000001
[2] - VIDEO_CAPTURE
[2] - STREAMING
[2] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[2] ioctl (VIDIOCGCAP): Inappropriate ioctl for device
^Z[1] Killed motion
[2]+ Stopped motion
root@odroid:/home/odroid# nano /etc/motion/motion.conf
root@odroid:/home/odroid# lsusb
Bus 001 Device 008: ID 1871:0101 Aveo Technology Corp. UVC camera (Bresser microscope)
Bus 001 Device 007: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 006: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 005: ID 1871:0101 Aveo Technology Corp. UVC camera (Bresser microscope)
Bus 001 Device 004: ID 046d:0807 Logitech, Inc. Webcam B500
Bus 001 Device 003: ID 0424:3503 Standard Microsystems Corp.
Bus 001 Device 002: ID 0424:9730 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Environment
Motion version: |
3.2.12 |
ffmpeg version: |
|
Shared libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
Xubuntu 13.10 |
--
PanosXatzi - 09 Apr 2014
Follow up
Fix record