Motion - Support Question 2010x 05x 12x 093303

Problems in resolution using a Trust Webcam

Question

Hello, I tried to set the resolution of my webcam to the max available (1280x1024), but when I start motion the reolution is first set to 1280x1024 and then to 640x480. The driver is built in the kernel (debian sid) named gspca_sn9c20x. I read that it could be a problem with usb1.1, but I tried it on 3 pcs which support usb 2.0. thanking you in anticipation.

Config file: motion.conf
I only changed the resolution the rest stayed untouched.

when starting motion:
motion
[0] Processing thread 0 - config file /etc/motion/motion.conf
[0] Motion 3.2.11.1 Started
[0] ffmpeg LIBAVCODEC_BUILD 3412993 LIBAVFORMAT_BUILD 3415808
[0] Thread 1 is from /etc/motion/motion.conf
[0] motion-httpd/3.2.11.1 running, accepting connections
[1] Thread 1 started
[0] motion-httpd: waiting for data on port TCP 8081
[1] cap.driver: "sn9c20x"
[1] cap.card: "USB20 Camera    "
[1] cap.bus_info: "usb-0000:00:0d.2-4.4"
[1] cap.capabilities=0x05000001
[1] - VIDEO_CAPTURE
[1] - READWRITE
[1] - STREAMING
[1] Supported palettes:
[1] 0: BA81 (BA81)
[1] 1: S920 (S920)
[1] 2: JPEG (JPEG)
[1] index_format 3 Test palette JPEG (1280x1024)
[1] Adjusting resolution from 1280x1024 to 640x480.
[1] Using palette JPEG (640x480) bytesperlines 960 sizeimage 460800 colorspace 00000007
[1] found control 0x00980900, "Brightness", range 0,255
[1]     "Brightness", default 127, current 127
[1] found control 0x00980901, "Contrast", range 0,255
[1]     "Contrast", default 127, current 127
[1] found control 0x00980902, "Saturation", range 0,255
[1]     "Saturation", default 127, current 127
[1] found control 0x00980903, "Hue", range -180,180
[1]     "Hue", default 0, current 0
[1] found control 0x0098090e, "Red Balance", range 0,127
[1]     "Red Balance", default 40, current 40
[1] found control 0x0098090f, "Blue Balance", range 0,127
[1]     "Blue Balance", default 40, current 40
[1] found control 0x00980910, "Gamma", range 0,255
[1]     "Gamma", default 16, current 16
[1] found control 0x00980911, "Exposure", range 0,6016
[1]     "Exposure", default 51, current 754
[1] found control 0x00980912, "Auto Exposure", range 0,1
[1]     "Auto Exposure", default 1, current 1
[1] found control 0x00980913, "Gain", range 0,28
[1]     "Gain", default 0, current 0
[1] mmap information:
[1] frames=4
[1] 0 length=462848
[1] 1 length=462848
[1] 2 length=462848
[1] 3 length=462848
[1] Using V4L2
[1] Resizing pre_capture buffer to 1 items
[1] Started stream webcam server in port 8080
^C[1] Thread exiting
[1] Calling vid_close() from motion_cleanup
[1] Closing video device /dev/video0

Output of lsusb:
Bus 003 Device 015: ID 0c45:624f Microdia PC Camera (SN9C201 + OV9650)

Environment

Motion version: 3.2.11.1
ffmpeg version: none
Libraries: ffmpeg, mysql, postgresql
Server OS: Debian Sid 2.6.32-3-486
-- KlausKoeck - 12 May 2010

Answer

Motion has nothing to do on this , it's the webcam driver that adjust the size of frame .
[1] Adjusting resolution from 1280x1024 to 640x480.

-- AngelCarpintero - 16 May 2010

I was having a similar problem using a Microsoft vx-6000 (which also uses the sn9c20x driver), and I had some luck changing the Palette to BA81

v4l2_palette 1

Once I did that, it produced 1280x1024 images.

But then I couldn't get brightness controls. (which did work when it used the JPEG palette)

The v4l2_palette value of 1 was the only one that didn't default to JPEG, I guess motion doesn't support the S920 palette?

Thanks

-chuck
Topic revision: r3 - 07 Feb 2011, ChuckHeron
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.