2 usbcams on 1 usb bus with 15 fps is possible - how to set frames per second?
Question
we tried with the guvcviewer controls to start two webcams at 640x480 on one usb bus. This is possible at 15 frames per second. How can we tell the usb cam that we want 15 frames per second in stead of the usual 30 fps? this specialy for the "uvcvideo" module
root@mercure:/tmp/motion# cd /etc/motion/
root@mercure:/etc/motion# motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Processing config file thread-envivo1.conf
[0] Unknown config option "hight"
[0] Processing config file thread-envivo2.conf
[0] Unknown config option "hight"
[0] Motion 3.2.12 Started
[0] ffmpeg LIBAVCODEC_BUILD 3474688 LIBAVFORMAT_BUILD 3473920
[0] Thread 1 is from thread-envivo1.conf
[0] Webcam port number 8082 for thread 1 conflicts with thread 0
[0] Webcam feature for thread 1 is disabled.
[0] Thread 2 is from thread-envivo2.conf
[1] Thread 1 started
[2] Thread 2 started
[0] httpd bind(): Address already in use
[0] httpd thread exit
[1] cap.driver: "uvcvideo"
[1] cap.card: "Venus USB2.0 Camera"
[1] cap.bus_info: "usb-0000:00:1d.0-1.1"
[1] cap.capabilities=0x04000001
[1] - VIDEO_CAPTURE
[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 (640x480)
[1] Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008
[1] found control 0x00980900, "Brightness", range -10,10
[1] "Brightness", default 0, current 0
[1] found control 0x00980901, "Contrast", range 0,20
[1] "Contrast", default 10, current 10
[1] found control 0x00980902, "Saturation", range 0,10
[1] "Saturation", default 4, current 4
[1] found control 0x00980910, "Gamma", range 100,200
[1] "Gamma", default 150, current 150
[1] found control 0x00980913, "Gain", range 32,48
[1] "Gain", default 34, current 34
[1] mmap information:
[1] frames=4
[1] 0 length=614400
[1] 1 length=614400
[1] 2 length=614400
[1] 3 length=614400
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[2] cap.driver: "uvcvideo"
[2] cap.card: "Venus USB2.0 Camera"
[2] cap.bus_info: "usb-0000:00:1d.0-1.3"
[2] cap.capabilities=0x04000001
[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 (640x480)
[2] Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000008
[2] mmap information:
[2] frames=4
[2] 0 length=614400
[2] 1 length=614400
[2] 2 length=614400
[2] 3 length=614400
[2] Error starting stream VIDIOC_STREAMON: No space left on device
[2] ioctl (VIDIOCGCAP): Invalid argument
[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 8082
[2] File of type 2 saved to: /usr/local/apache2/htdocs/envivo2/webcam2.jpg
[2] File of type 2 saved to: /usr/local/apache2/htdocs/envivo2/webcam2.jpg
[1] File of type 2 saved to: /usr/local/apache2/htdocs/envivo1/webcam2.jpg
[2] Retrying until successful connection with camera
[2] cap.driver: "uvcvideo"
[2] cap.card: "Venus USB2.0 Camera"
[2] cap.bus_info: "usb-0000:00:1d.0-1.3"
[2] cap.capabilities=0x04000001
[2] - VIDEO_CAPTURE
[2] - STREAMING
[2] Error selecting input 0 VIDIOC_S_INPUT: Device or resource busy
[2] ioctl (VIDIOCGCAP): Invalid argument
[2] File of type 2 saved to: /usr/local/apache2/htdocs/envivo2/webcam2.jpg
[1] File of type 2 saved to: /usr/local/apache2/htdocs/envivo1/webcam2.jpg
[2] File of type 2 saved to: /usr/local/apache2/htdocs/envivo2/webcam2.jpg
[1] File of type 2 saved to: /usr/local/apache2/htdocs/envivo1/webcam2.jpg
^C[1] Thread exiting
[1] Calling vid_close() from motion_cleanup
[1] Closing video device /dev/video1
[2] Thread exiting
[0] Motion terminating
root@mercure:/etc/motion#
Environment
Motion version: |
3.2.12 |
ffmpeg version: |
0.7.3-4 |
Libraries: |
ffmpeg, mysql, postgresql |
Server OS: |
ubuntu 3.0.0.15 and rhel 2.6.32 |
--
GeJansen - 29 Jan 2012
Answer