MY WEBCAM TEST GUIDE

How to Test Your Webcam on Linux and Ubuntu

Check that your webcam works on Linux or Ubuntu: detect the device, preview video in a desktop app or terminal, confirm resolution and frame rate, and fix common problems.

Testing a webcam on Linux comes down to three questions: does the system detect the camera, can an application open it, and does the picture look the way it should. This guide works on Ubuntu and most other distributions. It uses a desktop camera app, a few terminal commands and a browser check. Package names below are the ones used on Ubuntu and Debian. Other distributions may name them differently.

Before you start

  • Connect the camera directly to the computer if you can, not through an unpowered hub, and wait a few seconds after plugging it in.
  • On a laptop, check for a physical privacy shutter, a camera on/off switch or a function key that disables the camera. Some laptops can also turn the camera off in firmware settings.
  • Close video call apps, browsers and other programs that might already be using the camera. On many systems only one program can use a camera at a time.
  • Decide which kind of test you need. A desktop app or terminal tool reads the camera locally on your computer. A browser-based webcam test runs inside the browser, but whether any video leaves your device depends on that site, so check its privacy information rather than assuming.
  • Installing the tools below needs administrator rights (sudo) and an internet connection for the package manager.

Step-by-step instructions

1. Confirm the system detects the camera

Open a terminal and run lsusb to see whether a camera appears among the USB devices. Built-in laptop cameras are usually connected over USB internally, so they normally show up here as well. Then run ls /dev/video* to list the video device nodes. If no /dev/video entries exist, the kernel has not set up a driver for the camera. Go to the troubleshooting section before trying any app.

For a clearer view, install the V4L2 utilities with sudo apt install v4l-utils and run v4l2-ctl --list-devices. This groups the device nodes under each camera's name. One camera often creates two or more nodes, such as /dev/video0 and /dev/video1. Usually only one of them delivers images; the other carries metadata. If one node fails in an app, try the other.

2. Preview the camera in a desktop app

The simplest test is a camera app. Which one is preinstalled depends on your Ubuntu release and desktop. Older GNOME-based releases often used Cheese. Newer GNOME versions use an app called Camera, packaged as gnome-snapshot on Ubuntu. If neither is installed, install one through the software store or with apt, for example sudo apt install cheese. Open the app and choose the selected camera from its device list if you have more than one. A live picture means the camera, driver and permissions are working at a basic level.

If you want to change image controls such as exposure, focus or white balance while previewing, guvcview (sudo apt install guvcview) shows the controls the camera exposes. It also lets you choose the pixel format, resolution and frame rate.

3. Preview from the terminal

If you prefer the command line, or the desktop app fails without a clear error, open the camera directly with FFmpeg's player. Install it with sudo apt install ffmpeg, then run ffplay -f v4l2 -i /dev/video0, replacing video0 with the node from step 1. To request a specific mode, add options such as -video_size 1280x720 -framerate 30 before -i. If the camera does not support the requested mode, ffplay reports an error or the driver picks the closest one. Close the window or press q to stop.

4. Test in a browser or video call app

Many problems only appear in browsers and calling apps, because they add their own camera permission layer. Open a webcam test page or your call app's video settings and allow camera access when the browser asks. If the browser offers several cameras, make sure the correct one is chosen. If you blocked access earlier, reset the site's camera permission in the browser's site settings and reload the page.

Browsers and apps installed as Snap or Flatpak packages run in a sandbox. They need camera access granted to the package as well as inside the app. For a Snap, snap connections followed by the package name shows whether the camera interface is connected. For a Flatpak, check the app's device permissions with a permissions manager or flatpak info --show-permissions followed by the app ID.

Check the output

A working preview is only part of the test. Run v4l2-ctl --list-formats-ext -d /dev/video0 to see every pixel format, resolution and frame rate combination the camera advertises. On many USB webcams, the highest resolutions at full frame rate are only offered in a compressed format such as MJPG. Uncompressed YUYV is limited to lower resolutions or frame rates. If an app shows a smaller picture than expected, it may have chosen an uncompressed format.

  • Picture: check that it is in focus, the colours look natural and there is no constant flicker. Flicker under artificial lights can come from a mismatch with your mains frequency. Many cameras expose a power line frequency control you can set to 50 Hz or 60 Hz.
  • Motion: wave a hand in front of the lens. Heavy blur or a jerky picture usually means a low frame rate.
  • Lighting: test in the light you will actually use. With automatic exposure, many cameras lower their frame rate in dim light to collect more light, so improving the lighting often makes video smoother.
  • Recording: to check saved output, record a short clip with ffmpeg -f v4l2 -i /dev/video0 -t 10 test.mkv and play it back. Delete the file afterwards if you do not need it.

The modes the camera advertises are its supported options, not a guarantee of what every app will use. Browsers and call apps can scale or limit video depending on their own settings and your connection, so check quality inside the app you plan to use.

Common problems and next steps

  • No /dev/video device: reconnect the camera on another port and check the kernel log with sudo dmesg | grep -i -e uvc -e video right after plugging it in. Most USB webcams use the standard UVC driver. If the log shows errors, or the camera is a model without Linux driver support, a different kernel version or a vendor driver may be required.
  • Device or resource busy: another program is holding the camera. Run sudo fuser -v /dev/video0 or sudo lsof /dev/video0 to see which one, then close it.
  • Permission denied: desktop sessions on Ubuntu normally grant camera access to the logged-in user automatically. Over SSH or in a non-desktop session, the user may need to be in the video group. Check with groups, add yourself with sudo usermod -aG video followed by your user name, then log out and back in.
  • Works in a camera app but not in the browser: recheck the site permission, the camera selected in the browser and, for Snap or Flatpak browsers, the sandbox permission.
  • Black image while the device opens: check the privacy shutter and hardware switch, and try the other video node of the same camera. Some newer laptop cameras that rely on a separate image processing pipeline may not work through the standard driver on every kernel or distribution release.
  • On Ubuntu, if the camera worked before an update: try booting the previous kernel from the boot menu to see whether the problem is tied to the kernel version. Report it to your distribution's bug tracker with the dmesg and v4l2-ctl output.