This page tries to help you troubleshoot issues you may be having with your webcam.
1. Picture is Present but Faulty
If your webcam is not one of the latest models and you get at least some picture (garbled, green-screen or static) then your drivers are installed. However, you may need additional configuration in order to use your webcam.
Reason: The developers decided to change the way the drivers and cameras work: old drivers (before Ubuntu 8.10) had the code to decode the data received from the webcam, the new drivers (since 8.10) don't. instead they assume decoding it always done somewhere else. The applications which use the older assumptions have to be provided with the additional (compatibility and decoding) library.
An example of the procedure needed to adjust launching one typical application with the described problem follows.
This information might be for the old versions of Skype and obsolete in 2010 and later
Go to main menu, System, Preferences, Menus: Applications, Internet, Items: Skype, Properties, and replace the Command with
bash -c 'LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype'
bash -c 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so skype'
If you get an error similar to the following:
ERROR: ld.so: object '/usr/......../v4l1compat.so' from LD_PRELOAD cannot be preloaded: ignored.
Check the correct path to "v4l1compat.so" on your system: Go to the menu places, "search for files" and search for "v4l1compat.so" Or from terminal:
find /usr/lib* -name v4l*
Then, substitute the right path into the previous commands as follows:
bash -c 'LD_PRELOAD=/The/Right/Path/v4l2convert.so skype'
For Ubuntu 14.04 Multiarch is:
bash -c 'LD_PRELOAD=/usr/lib/i386-linux-gnu/libv4l/v4l1compat.so skype'
If the above doesn't work then try running the command from a terminal and look at the output. If it is complaining about "error unexpected width / height in JPEG headerexpected: 320x240, header: 1600x1200" then try the following
bash -c 'LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype'
bash -c 'LD_PRELOAD=/usr/lib32/libv4l/v4l2convert.so skype'
If the above even doesn't work then try the following
export XLIB_SKIP_ARGB_VISUALS=1 bash -c 'LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so skype'
export XLIB_SKIP_ARGB_VISUALS=1 bash -c 'LD_PRELOAD=/usr/lib32/libv4l/v4l1compat.so /usr/bin/skype'
1.2. A clean start for skype
This can be tidied up by writing a small script in /usr/local/bin called skype that comes higher in the loading sequence that the script of the same name in /usr/bin/. That script is in charge of running skype; the new script loads the correct libraries then hands control to the former script.
In terminal type:
$ sudo gedit /usr/local/bin/skype
and paste the following 2 line code snippet into gedit:
save and close. Now back in terminal make it executable
$ sudo chmod a+x /usr/local/bin/skype
Reboot type skype and the web cam just works. This was tested on Lucid with a Logitech Quick Cam Communicator.
2. Picture is Dark
2.1. Running guvcview from the Menu
Sometimes a dark picture will be the result of an incorrectly-selected webcam device. guvcview allows users to easily change options for their webcams using a graphical interface.
Install guvcviewfrom the universe repository using the following command:
sudo apt-get install guvcview
Start it from the Applications menu.
When the guvcview window opens, select the Video and Files tab.
Check that your webcam is listed and selected in the Device: drop-down box. If it is not selected, click on the appropriate entry. If there seems to be more than one entry for your webcam, try changing which one is selected.
2.2. Running guvcview from the Command-Line
If guvcview is not listed or not working from the Applications menu , try:
guvcview -d /dev/videoX
Change X to 0, 1 or 2 and test if your webcam works. Changes made here may be persistent and affect other applications.
3. Picture is upside down or mirrored
- Check if v4l2ucp is installed:
apt-cache policy v4l2ucp
- Install v4l2ucp
sudo apt-get install v4l2ucp
Open "Preferences" and "Video4Linux control Panel"
- Check/uncheck Flip options
4. List of Kernel modules with problems
Brief problem description
The mother of all webcam related bugs :). Well almost all of the, this one solves a lot of libv4l issues with gspca webcam and some other webcams as well. Quick workaround: Run skype like this: LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so skype
Uvcvideo webcam issue detected mainly with Cheese. It's solved right now just waiting the next kernel
Due to the mentioned changes this one became a dupe from bug #260918
This is caused by the inclusion of gspca modules on the kernel
Probably the same bug as the previous one
snc9105 and sc9102 issues
microdia solution for the sn9c20x webcams
This would be the package of userland tools needed to load firmware for Ricoh Cameras and would use the uvcvideo driver for the actual work
This is the way to go if you've got a WDM camera not supported by uvcvideo or if you want to use the old driver. In the near (really near) future this would be deprecated
Trying to introduce this module into the kernel
As the current source package no longer builds, the latest version is the one for this webcam to work
The st11k module present in Hardy is no longer available in Intrepid/Jaunty. The stkwebcam doesn't supports all the previous webcams.
This bug relates to support of Logitech webcams in Ubuntu 8.10 (Intrepid Ibex) to 9.10 (Karmic Koala). It is reportedly fixed in 10.04 (Lucid Lynx) and later.
5. Fixing Webcam issues while using Flash since Intrepid
If your webcam stopped working in flash-powered streaming sites, for instance (like www.ustream.tv), that might be due to two reasons: (1) Bug in recent version of the adobe flash plugin (2) you are using an old webcam which doesn't work well with V4L2
See below for more information on solutions reported to work by some users.
5.1. Bug in recent version of Adobe flash player
In Ubuntu 8.04 (Hardy Heron) you were used to be asked to grant permission to the website you were visiting to take control on your webcam (through some flash popup with the settings). It seems that recent versions of Adobe flash player (the updated ones for Intrepid and Jaunty since June 2009, at least, and probably before also) have a bug which doesn't ask the user to grant access to a site when visiting it. Like ustream.tv for streaming using your webcam, as example.
The workaround is to grant access to that website by default without attempting to ask you each time.
* Choose the "Website privacy settings" * Select the site from the list of visited websites. * click on the option "always allow" above the list.
You should see that the icon on the left of that site in the list changes from yellowish to green colour. That's it.
Try again visiting that website, ustream.tv in this example, and your webcam should be streaming again as it used to do back with Hardy.
5.2. old webcam which doesn't work well with V4L2
There seems to be a known problem in Ubuntu Intrepid and Jaunty (at least), due to switching from the video system V4L to the more recent V4L2. Many applications, like webcams, doesn't seem to work well (or at all) with V4L2. But luckily there is a simple workaround to avoid the problem, through installing and loading some libraries with backward-compatibility with V4L, so that Flash sees again your Webcam, as it used to do until Ubuntu Hardy.
In order to do it, we need to shut down any application that might be doing some use of the video: editors, instant messengers or even the internet browser, and in a terminal we'll type:
sudo apt-get install ld.so.preload-manager
y after that, execute:
sudo ld.so.preload-manager /usr/lib/libv4l/v4l1compat.so
Then, you have to switch the video mode to V4L from the multimedia systems selector, through executing:
Go to the Video tab, and change the default value to V4L.
That should do the work (it did for me using Jaunty, and for others as reported originally at this source).
6. Fixing Audio problems with USB webcam
I installed a Logitech webcam Pro 9000 on a new Karmic/9.10 32bit install. Video worked "out of the box" but there was no audio. After hunting around for a while, I remembered how I had a similar problem trying to get digital audio out over hdmi on another 9.10 box. The problem was that the alsa settings (not visible under pulseaudio) had the IEC958 device muted (silly setting if you ask me!).
Anyway, I took the following steps to getting my webcam audio to work:
- start a terminal window/xterm window
- type: sudo alsamixer
- using the tab key, make sure to be either in "all" or "capture" mode
- using the left/right arrow key, navitage to the correct "slider"
- (I'm not sure if the right one was front mic (left/right) or just plain "mic" or Mic Boost but I enabled them all)
- if the value at the bottom of the slider says "M" then your device is on "mute" - Hit the "m" key to togger the mute / un-mute
- using the up/down arrow, adjust the setting to get as much green as possible w/o getting in the red zone.
- repeat for all lables that look like "mic", "front mic" "Mic Boost" etc...
- exit alsamixer
- test your audio. I installed Cheese to do a quick audio/video recording test but you can also test with "sound recorder" or the skype test call etc...
That should do it!
...but if it doesn't (or maybe first) try:
to to system > preferences > sound > input
- select the radio button for the webcam. Even though there's nothing else on your system, it might not auto-select this once it has been recognised.
7. Setting Brightness, Contrast, Color etc. on Some Webcams
When fiddling with webcam software one may inadvertently screw up the settings in the VIDIOCGPICT ioctl. This often results in a very bright/dark picture, or a "greenish"/"blueish" picture. To resolve this, start luvcview or guvcview
7.1. Using guvcview
Start guvcview and select the Image Controls tab. Adjust your settings to see if you can resolve your problem.
7.2. Using luvcview
Start luvcview from the a terminal window.
- When the program window shows, press F1 on your keyboard, making sure that the program window and not your terminal is selected. This your webcam image settings and outputs them to the terminal.
Press F2 to reload these settings. Test your webcam again. If there is no improvement, try creating a luvcview.cfg with different settings and use the -r option with luvcview to load these settings.
8. Flickering or No picture
Some newer webcams produce high resolution images at 30fps. This is a lot of data. If your USB cable path is too long or convoluted, frames can drop causing flicker or no picture. If you find MJPG format mode produces less flicker than YUYV format mode, then this could be the case. Try plugging the webcam directly into the computer. Then try progressively reconnecting your extension cables or hubs to see how the picture changes. Check you don't have a low speed hub.
You may also see
- Could not grab image (select timeout): Resource temporarily unavailable
This could indicate the frame data not arriving down the long cable fast enough. Check also for cable kinks and tight loops, which like ethernet, cause delayed packets.