Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have two Microsoft LifeCam HD-5000 webcams which I am using as a home security system with the Motion package for linux. One problem I have is that because these webcams have auto-focus, sometimes they will try to automatically adjust the focus and will create false positive motion detection.

It seems like you can fix the focus at infinity under windows. Is there any way I could do that under linux, using uvcvideo?

share|improve this question
up vote 6 down vote accepted

Perhaps this works:

uvcdynctrl -s "Focus, Auto" 0

You can then adjust the focus with:

uvcdynctrl -s "Focus (absolute)" $amt

Where $amt is a number from 0 - 40

share|improve this answer
This looks very promising, however I don't have uvcdynctrl on my Ubuntu box. I will investigate further and post back. Thanks! – Josh Feb 17 '11 at 13:32
This works under Ubuntu 11.10. Thanks!! – Josh Dec 5 '11 at 19:41
@user4646 On the off-chance you read this, can you tell more about the meaning of the range? Which is infinity? Also, where did you find this information, I've tried --help and info and neither give this range or information. Thanks! – Levon Dec 11 '14 at 21:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.