YUYV not working with USB 1.1
Question
When I connect my webcam by a USB 1.1 port to my notebook and start motion, I get the message, that only the palette MJPG (MJPEG) is supported. When I connect my webcam by a USB 2 port to my notebook and start motion, I get the message, that the palettes MJPG (MJPEG) and YUYV (YUV 4:2:2 (YUYV)) are supported.
Because MJPG is not working right with the webcam (Corrupt image) I want wo use YUYV also with USB 1.1.
This problem was also reported on
http://www.lavrsen.dk/twiki/bin/view/Motion/SupportQuestion2008x07x24x090621
The output when the webcam is connected by USB 1.1:
>>>
[0] conf_load: Processing thread 0 - config file <path to home>/.motion/motion.conf
[0] conf_cmdparse: Unknown config option "control_port"
[0] motion_startup: Motion trunk-r441 Started
[0] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3360512 LIBAVFORMAT_BUILD 3413505
[0] main: Thread 1 is from <path to home>/.motion/motion.conf
[1] motion_init: Thread 1 started
[1] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "USB 2.0 PC Camera"
cap.bus_info: "0000:00:1d.1"
cap.capabilities=0x04000001
------------------------
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] v4l2_set_pix_format: Supported palettes:
[1] 0: MJPG (MJPEG)
[1] v4l2_set_pix_format: index_format 5 Testing palette MJPG (640x480)
[1] v4l2_set_pix_format: Using palette MJPG (640x480) bytesperlines 0 sizeimage 460800 colorspace 00000000
[1] v4l2_set_pix_format: VIDIOC_G_JPEGCOMP not supported but it should be (does your webcam driver support this ioctl?): Invalid argument
[1] v4l2_scan_controls: found control 0x00980900, "Brightness", range -127,127
[1] v4l2_scan_controls: "Brightness", default 0, current 0
[1] v4l2_scan_controls: found control 0x00980901, "Contrast", range 0,255
[1] v4l2_scan_controls: "Contrast", default 128, current 128
[1] v4l2_scan_controls: found control 0x00980902, "Saturation", range 0,255
[1] v4l2_scan_controls: "Saturation", default 128, current 128
[1] v4l2_scan_controls: found control 0x00980903, "Hue", range -180,180
[1] v4l2_scan_controls: "Hue", default 0, current 0
[1] v4l2_scan_controls: found control 0x00980910, "Gamma", range 128,255
[1] v4l2_scan_controls: "Gamma", default 128, current 128
[1] v4l2_scan_controls: found control 0x00980913, "Gain", range 0,1023
[1] v4l2_scan_controls: "Gain", default 128, current 0
[1] v4l2_set_mmap: mmap information: frames=4
[1] v4l2_set_mmap: 0 length=460800
[1] v4l2_set_mmap: 1 length=460800
[1] v4l2_set_mmap: 2 length=460800
[1] v4l2_set_mmap: 3 length=460800
[1] vid_v4lx_start: Using V4L2
<<<
The output when the webcam is connected by USB 2:
>>>
[0] conf_load: Processing thread 0 - config file <path to home>/.motion/motion.conf
[0] conf_cmdparse: Unknown config option "control_port"
[0] motion_startup: Motion trunk-r441 Started
[0] ffmpeg_init: ffmpeg LIBAVCODEC_BUILD 3360512 LIBAVFORMAT_BUILD 3413505
[0] main: Thread 1 is from <path to home>/.motion/motion.conf
[1] motion_init: Thread 1 started
[1] v4l2_get_capability:
------------------------
cap.driver: "uvcvideo"
cap.card: "USB 2.0 PC Camera"
cap.bus_info: "0000:02:00.2"
cap.capabilities=0x04000001
------------------------
[1] - VIDEO_CAPTURE
[1] - STREAMING
[1] v4l2_set_pix_format: Supported palettes:
[1] 0: MJPG (MJPEG)
[1] 1: YUYV (YUV 4:2:2 (YUYV))
[1] v4l2_set_pix_format: index_format 9 Testing palette YUYV (640x480)
[1] v4l2_set_pix_format: Using palette YUYV (640x480) bytesperlines 1280 sizeimage 614400 colorspace 00000000
[1] v4l2_scan_controls: found control 0x00980900, "Brightness", range -127,127
[1] v4l2_scan_controls: "Brightness", default 0, current 0
[1] v4l2_scan_controls: found control 0x00980901, "Contrast", range 0,255
[1] v4l2_scan_controls: "Contrast", default 128, current 128
[1] v4l2_scan_controls: found control 0x00980902, "Saturation", range 0,255
[1] v4l2_scan_controls: "Saturation", default 128, current 128
[1] v4l2_scan_controls: found control 0x00980903, "Hue", range -180,180
[1] v4l2_scan_controls: "Hue", default 0, current 0
[1] v4l2_scan_controls: found control 0x00980910, "Gamma", range 128,255
[1] v4l2_scan_controls: "Gamma", default 128, current 128
[1] v4l2_scan_controls: found control 0x00980913, "Gain", range 0,1023
[1] v4l2_scan_controls: "Gain", default 128, current 0
[1] v4l2_set_mmap: mmap information: frames=4
[1] v4l2_set_mmap: 0 length=614400
[1] v4l2_set_mmap: 1 length=614400
[1] v4l2_set_mmap: 2 length=614400
[1] v4l2_set_mmap: 3 length=614400
[1] vid_v4lx_start: Using V4L2
<<<
Environment
Motion version: |
SVN version from 12.032009 |
ffmpeg version: |
ffmpeg-0.4.9-0.54.20080908 |
Libraries: |
ffmpeg |
Server OS: |
Fedora 10, kernel 2.6.27.19-170.2.35 |
--
CapKid - 19 Mar 2009
Answer
This was already answered in other support request it's not a motion issue but a USB Bandwidth and driver that reduces image and only allow to use:
Please read this FAQ :
http://www.lavrsen.dk/foswiki/bin/view/Motion/FrequentlyAskedQuestions#Resolution_and_palette_issues_wi