Lighting affects webcam videography in a similar way that lighting affects photography. Things like exposure time and shutter speed need to be taken into account, but unlike photography, or even traditional videography, we don't often have the same manual control over those settings like we do with a professional camera. That's what makes lighting so important when filming something with our webcams, even if we prefer to keep our rooms dimly lit from the glow of our PC (assuming you are all about that RGB).
Basic lighting from a room lamp or kitchen may be sufficient enough for a video conference or a virtual tabletop RPG gathering, but if we want to add our faces to our Skyrim or Apex Legends streams, something like the Razer Kiyo or Elgato's Key Light would help eliminate any framerate drop due to bad lighting. (And we all want to see your gorgeous face, too!)
To understand how and why lighting can affect fps on a webcam, let's look at some basic concepts of still photography.
Anatomy of a camera
Two words that get thrown around a lot when talking about photography are aperture and shutter speed. Aperture refers to how wide or narrow the lens diaphragm (the 'eye') is open. If it's open wide, it lets more light in, and if it's narrow it lets less light in. In low-light situations, the aperture should be as wide as possible to let the most light in at ones, since there is less of it. This decreases the amount of time you need to leave the shutter open to properly expose the shot.
And that's where we get into shutter speed, or the amount of time the lens is open to properly expose the photograph. If you have a wide aperture, the shutter doesn't need to be open as long, but if you have a narrow aperture, the shutter will need to be open longer to let the same amount of light in.
ISO (or International Organization of Standardization, the governing body that sets the sensitivity ratings for camera sensors) also comes into play with photography, as it measures the light sensitivity of your camera. A higher ISO means it's more sensitive to light, which means you shutter is can be open for a shorter period of time, and your aperture can be narrower. If you've ever seen something like ISO 400 on a 35mm roll of film back in the day, that just means how fast the film will take to the light. Same concept for DSLR cameras.
Of course, webcams don't have these specific granular settings, as they're designed to be as hands-off as possible. But it helps to contextualize why lighting can affect fps on your webcam.
Shutter speed versus framerate
In still photography, you're limited to a single shutter speed per photograph, but you can shoot at any speed you'd like. If you're shooting a moving object, for instance, a slower speed will blur it, but a faster speed will capture it as-is.
With video, the shutter is still involved, but it remains open while an electrical shutter simulates the function of the mechanical shutter while you’re filming. And while you're filming, you're limited to a single shutter speed, and that shutter speed depends on the framerate.
According to the 180-degree shutter angle rule, your shutter speed should be double your frame rate. So if your fps is 60, your shutter speed shouldn't go over 8000ms, or 1/125 of a second. Anything too slow or too fast can make the movement on-screen look unnatural. Other than a drop in bandwidth, this is also why we sometimes see someone make jerky movements over their webcam.
But we can't manually control the shutter speed on our webcams, which makes having good lighting that much more important.
More light, higher fps
There's also a direct relationship between a camera’s framerate and exposure time. Most webcams are going to shoot at 30 or 60 fps. The darker your setting, however, you'll need a longer exposure time and a wider aperture properly illuminate your shot.
For all you math-inclined folks, the maximum framerate can't surpass one divided by the exposure time. So for example, if the max fps of your webcam is 60, but your exposure time is 200ms (milliseconds) to get a well-lighted image, your webcam is not going to run at full fps because it's working hard to make what's on the screen as well-lit as possible. In other words, the framerate drops in low light to properly expose the video frames.
Again, this isn't something we have control over with webcams, but some of webcams do come with software that allows you to adjust exposure, or choose priority between exposure and framerate for this reason (Logitech's StreamCam (opens in new tab) does). You might notice that if you prioritize exposure, your video might appear a little choppy if your lighting is too low.
Thankfully, you don't need a professional lighting set-up to use the upper limit of your webcam's fps, but it doesn't hurt to use something other than a desk lamp from Ikea. Your webcam has its limitations, and will do its best to automatically adjust for different lighting situations, but it's not going to perform perfectly in every single one.