LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-21-2009, 05:38 AM   #1
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Rep: Reputation: 18
turn off auto exposure on a uvc webcam


hi all,

i have a logitech web quickcam communicate mp/s5500 which runs with quite low frame rate (55 frames in 11 seconds). this is using the following parameters to see the video:

Code:
mplayer tv:// -tv driver=v4l2:device=/dev/video0
according to some sources on the net this is caused by auto exposure. does anyone know how to turn it off?

thanks
 
Old 10-21-2009, 06:56 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
I had the same problem with my 9000pro. I used to use luvcview gui to turn off auto exposure, set exposure to deliver my desired framerate and then compensate for the poor lighting in my room with the contrast/brightness/saturation settings. You lose picture quality doing this, but you can usually find a compromise that doesn't look too bad.

I've not used it in quite a while but it might be worth a try.
 
Old 10-22-2009, 03:25 AM   #3
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Original Poster
Rep: Reputation: 18
i keep getting 'Set Auto Exposure off error'... any ideas?
 
Old 10-22-2009, 03:46 AM   #4
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Original Poster
Rep: Reputation: 18
and then...

Code:
$ uvcdynctrl -s 'Exposure, Auto' -- 0 
ERROR: Unable to set new control value: A Video4Linux2 API call returned an unexpected error 5. (Code: 12)
i'm not sure what the deal is but this seems interesting http://forums.quickcamteam.net/showthread.php?tid=212 but setting it to 3 didn't help.

can anyone shine some light on how to get my frame rate up?

Last edited by zoran119; 10-22-2009 at 04:04 AM.
 
Old 10-22-2009, 05:09 AM   #5
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
I've just tried the 'trunk' version direct from svn.

Code:
svn checkout http://svn.quickcamteam.net/svn/luvcview/trunk

cd trunk/luvcview

wget http://svn.quickcamteam.net/svn/qct/Linux/Common/include/dynctrl-logitech.h

wget http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/uvc_compat.h

wget http://svn.berlios.de/svnroot/repos/linux-uvc/linux-uvc/trunk/uvcvideo.h

make


If you click on the button above the one you're clicking you should get a "Auto expose set to 1" message on stdout. This appears to turn off auto exposure, at least it does on my 9000. Clicking the button below gives an error message as you say. Once you've got the "Auto expose is set to 1" message the exposure controls appear to work normally.


Unfortunately, this program appears to be a bit of a mess and does things in a non-standard way. I think what's happened is that at some point the v4l2 kernel api or uvc driver has changed and because of the non-standard approach, a few things have broken.


I see there's now a gtk+ version called guvcview. I've not tried it, but maybe you'll have more luck with that one.
 
Old 10-22-2009, 05:32 AM   #6
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Yep, that's enlightening. Post 9, seems to explain what's going on quite well.

Try this patch to luvcview.

Code:
--- luvcview.c.old      2009-10-22 11:29:29.052116029 +0100
+++ luvcview.c  2009-10-22 11:30:17.685678188 +0100
@@ -833,7 +833,7 @@
                                        break;
                                case A_EXPOSURE_OFF:
                                        control.id    =V4L2_CID_EXPOSURE_AUTO;
-                                       control.value =8;
+                                       control.value =3;
                                        if ((value = ioctl(videoIn->fd, VIDIOC_S_CTRL, &control)) < 0)
                                                printf("Set Auto Exposure off error\n");
                                        else
 
Old 10-22-2009, 06:11 AM   #7
zoran119
Member
 
Registered: Dec 2007
Posts: 217

Original Poster
Rep: Reputation: 18
Quote:
Originally Posted by GazL View Post
I've just tried the 'trunk' version direct from svn.
I see there's now a gtk+ version called guvcview. I've not tried it, but maybe you'll have more luck with that one.
awesome!!! it works!!! it's a little bit weird... don't really know what i'm doing with the sliders but will get there. any idea where it stores it's config so that it can be reset to the defaults (before i started playing with the camera settings)?

thanks for your help!!!
 
Old 10-22-2009, 06:27 AM   #8
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019Reputation: 5019
Code:
gazl@slack:~/Projects/trunk/luvcview$ ./luvcview --help
luvcview 0.2.6

usage: uvcview [-h -d -g -f -s -i -c -o -C -S -L -l -r]
-h   print this message
-d   /dev/videoX       use videoX device
-g   use read method for grab instead mmap
-w   disable SDL hardware accel.
-f   choose video format (YUYV/yuv and MJPG/jpg are valid, MJPG is default)
-i   fps           use specified frame rate
-s   widthxheight      use specified input size
-c   enable raw frame capturing for the first frame
-C   enable raw frame stream capturing from the start
-S   enable raw stream capturing from the start
-o   avifile  create avifile, default video.avi
-L   query valid video formats
-l   query valid controls and settings
-r   read and set control settings from luvcview.cfg (save/restore with F1/F2)
gazl@slack:~/Projects/trunk/luvcview$
I've not played with it all that much, but it looks like the function keys and -r option are what you're looking for. I've not tried the gtk one at all, so I can't offer any advice on that one.

Oh, and I think one of those 4 buttons in the middle is a reset to defaults, but I can't remember which.

Last edited by GazL; 10-22-2009 at 06:28 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Streaming UVC webcam Koppie Linux - Software 1 09-05-2009 03:32 PM
ASUS netbook--third-party UVC webcam craig61107 Linux - Laptop and Netbook 1 04-17-2009 01:21 PM
Chicony UVC webcam not working in Slackware 12.2 Ryuu Linux - Laptop and Netbook 1 02-14-2009 06:33 AM
UVC Webcam Ubuntu j0eh4x Linux - Hardware 5 01-05-2009 09:33 PM
Webcam auto exposure sevi Linux - Newbie 0 09-11-2004 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 06:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration