1

When I try to take an image through the fswebcam, Raspberry Pi 2 shows following error.

--- Opening /dev/video0...
Trying source module v4l2...
/dev/video0 opened.
No input was specified, using the first.
Error selecting input 0
VIDIOC_S_INPUT: Device or resource busy

And I am using following command to take the photo:

fswebcam image.jpg

What could be the problem ?

  • Welcome to RPi.SE. The last line in your error suggests that your device file is being used somewhere else. (could be abruptly closed application or improper programming) You can unplug it and try plugging it back to see if it makes any difference. You can explore detailed fswebcam options from this link : manpages.ubuntu.com/manpages/lucid/man1/fswebcam.1.html – dhruvvyas90 Jan 2 '16 at 10:52
  • I tried it couple of times, that didn't work – Assazzin Jan 2 '16 at 12:04
  • Your problem seems to be very similar to one mentioned over here. 93.93.130.214/forums/…. Are you sure there is no other process using the camera ? – dhruvvyas90 Jan 2 '16 at 12:08
  • I found that, motion which i have installed is creating this problem. I uninstalled it, then it was working fine. – Assazzin Jan 2 '16 at 12:25
  • 2
    The same service that was causing the problem in that thread I believe. :) Glad that you solved it. You can add your findings as an answer so that it can help others having the same problem. – dhruvvyas90 Jan 2 '16 at 12:26
0

uninstall motion

sudo apt-get remove motion

(It worked for me after uninstallation)

It may suffice to disable motion (sudo systemctl disable motion), as this will release the cam for use with other app.

| improve this answer | |
  • 1
    Is there a reason why this should be related to the problem? – RalfFriedl Mar 27 '19 at 17:50
  • 1
    There are two packages trying to access the same webcam. So either you can do with fswebcam or with motion. So when there is only one of them, the webcam won't be showing any resource busy error. – Bharat Bohara Mar 28 '19 at 17:42
-1

For others who may have this problem, try unplugging and then plugging the webcam again. See if it works then.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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