If you’ve ever watched a camera slowly drift in and out of focus while someone was talking — that pulsing, breathing effect where the image softens and sharpens over and over — you’ve watched an autofocus system guessing.
Not all of them guess. There are three fundamentally different ways a camera can figure out where to focus, and they behave so differently that “autofocus” is nearly useless as a spec on its own. One of them searches by trial and error. One calculates the answer. One measures it directly with a beam of infrared light.
This guide explains how each works, why the differences show up dramatically on video and barely at all in photography, and how to stop your camera from hunting.
First: two things people confuse
Almost every discussion of autofocus mixes up two separate systems, and untangling them makes everything else clearer.
Detection answers “what should I focus on?” This is face detection, eye detection, subject tracking, animal detection. It’s a decision about which part of the frame matters.
Focus measurement answers “how far away is it?” This is contrast detection, phase detection, or time-of-flight. It’s the mechanism that determines where to move the lens.
These are independent layers. A camera can have excellent eye detection sitting on top of a slow measurement system and still hunt visibly. Another can have a fast measurement system with no subject detection at all, which is fine if the subject is always in the same place.
When a spec sheet says “Eye AF,” that’s the detection layer. It tells you nothing about how the camera measures distance — which is what determines whether the focus glides or pulses.
Contrast detection: search by trial and error
The oldest and simplest method, and still the most common in webcams and budget cameras.
How it works
The camera looks at the image and measures contrast — how sharp the edges are. An out-of-focus image has soft, low-contrast edges; a focused one has hard, high-contrast edges.
So the camera moves the lens slightly and re-measures. Did contrast increase? Keep going that direction. Did it decrease? Go back. It continues until contrast stops improving.
This is often called hill climbing, and it has one unavoidable property: the camera cannot know it has reached peak sharpness until it has gone past it. The only way to confirm you’re at the top of the hill is to take a step down the other side.
That overshoot-and-return is exactly the pulsing you see. It isn’t a malfunction. It’s the method working as designed.

Where it struggles
It needs contrast to measure. A plain wall, a solid-color shirt, a face in flat lighting — if there aren’t strong edges, there’s nothing to hill-climb on. The camera searches through its full range and often settles somewhere wrong.
It needs light. In dim conditions the image is noisy, and noise looks like contrast. The system chases grain instead of edges.
It doesn’t know direction. When something changes, the camera doesn’t know whether to focus nearer or farther, so it guesses and corrects. That first wrong guess is visible.
It re-searches constantly on video. Photography hides all of this: you half-press, the camera hunts for half a second, you don’t see it, then it takes the shot. Video has no half-press. The camera is always live, so every search is broadcast.
Where it’s fine
It’s cheap, needs no dedicated hardware, and when it settles it’s genuinely accurate — it’s measuring the actual final image, so there’s no calibration error. In bright light on a textured subject that doesn’t move, contrast detection works well.
Phase detection: calculate the answer
The system in mirrorless cameras and DSLRs, and the reason they focus so much more decisively.
How it works
Light entering a lens arrives from across the whole width of the front element. Phase detection splits that incoming light and compares two views of the same scene taken from opposite sides of the lens.
When the image is in focus, those two views align perfectly. When it isn’t, they’re offset — and critically, the size and direction of that offset tell the camera exactly how far off it is and which way to correct.
So there’s no search. The camera calculates the required correction and drives the lens straight there in one motion. In modern mirrorless bodies this happens through dedicated phase-detection pixels built into the imaging sensor itself, often thousands of them across the frame.

Where it struggles
It still needs light. Comparing two views requires enough signal in both. In dim conditions phase detection degrades, and many cameras fall back to contrast detection — which is why a camera that focuses instantly in daylight starts hunting in a dark room.
It still needs some detail. Comparing two views of a featureless surface gives you two featureless views. Less fragile than contrast detection here, but not immune.
Repeated shots may not land identically. It’s a calculation from optical data, so results can vary slightly between attempts. Usually invisible — but it means focus can drift subtly across a long session even when nothing in the scene changed.
Where it excels
Moving subjects. Because each measurement gives direction and distance, the camera can track something moving unpredictably and predict where it will be. For a subject walking around a room, phase detection combined with good subject detection is the strongest option available.
Time-of-flight: measure the distance directly
The newest of the three in consumer cameras, and the one that works on a completely different principle.
How it works
A time-of-flight (ToF) sensor emits infrared light and measures how long it takes to bounce back. Light travels at a known speed, so return time gives distance directly.
The key difference from both other systems: ToF doesn’t analyze the image at all. Contrast detection and phase detection both work by examining light that came from your scene. ToF sends out its own light and measures physical distance to whatever is in front of it.
Three consequences follow, and they’re the whole reason ToF exists:
It works in complete darkness. The camera provides its own infrared light source, so autofocus doesn’t depend on ambient light at all. Your image still needs light to look good — that’s the sensor’s job — but focus itself is independent of it.
It never hunts. There’s no search process to observe, because it isn’t searching. It measures a distance and moves the lens to the corresponding position. No overshoot, no correction, no pulsing.
It’s repeatable. A distance measurement is a distance measurement. Sit in the same chair on Tuesday as you did on Monday and the lens goes to the same place. There’s no drift across a session and no variation between sessions.
Where it struggles
Being honest about the limits, because ToF is not universally better:
Range is limited. The emitted infrared has to make a round trip with enough signal to measure. That works reliably over meters, not tens of meters. Fine for a desk or a studio; not the tool for a subject across a sports field.
Some surfaces confuse it. Glass, mirrors, and highly reflective materials bounce infrared unpredictably. Some very dark or matte materials absorb it. These are edge cases in a normal room, but they’re real.
Bright sunlight interferes. Sunlight contains a lot of infrared, which raises the noise floor against the sensor’s own emission. ToF is at its best indoors — which is where streaming happens anyway.
It measures distance, not identity. ToF tells you how far away something is, not whether that something is a person’s eye. For a subject in a known position it’s exactly right. For selecting one face among several moving people, a system with strong subject detection is doing work ToF doesn’t do on its own.
Side by side
| Contrast detection | Phase detection | Time-of-flight | |
|---|---|---|---|
| Method | Trial and error on image sharpness | Calculates offset between two views | Measures distance with infrared |
| Knows direction? | No — guesses, then corrects | Yes | Not applicable — measures directly |
| Visible hunting | Yes, inherent to the method | Rare | No |
| Works in darkness | No | Degrades significantly | Yes |
| Needs scene contrast | Yes, heavily | Somewhat | No |
| Repeatable | Variable | Mostly | Yes |
| Fast-moving subjects | Poor | Best | Good within range |
| Long distances | Works | Works | Limited to meters |
| Typically found in | Webcams, budget cameras | Mirrorless, DSLR | Phones, streaming cameras |
Why this matters far more on video than in photography
Autofocus reviews are written mostly by photographers, and photography hides the differences that matter most for video.
Photography has a half-press. Video doesn’t. A photographer half-presses, the camera hunts, they take the shot. The hunt happened before the moment was captured, so nobody sees it. On video the camera is always recording. Every search is in the output.
Photography judges the final frame. Video judges the transition. A photo is either sharp or it isn’t. Video is also judged on how focus moved to get there — smoothly, or with a lurch and a correction.
Photography is short. Streaming is long. A system that’s 98% reliable is excellent for photos. Across a two-hour stream, that 2% is dozens of visible focus events.
This is why “best autofocus” from a camera review and “best autofocus for a camera pointed at you for two hours” can be different answers. Peak capability matters for photography. Consistency matters for streaming.
How to stop your camera from hunting
Practical fixes, roughly in order of how often they work.
1. Add light. Every autofocus system except ToF degrades in low light, and most hunting complaints are a lighting problem wearing an autofocus costume. A single key light at face level often eliminates the issue completely.
2. Switch to manual focus. If you sit in the same chair at the same distance every session, autofocus is solving a problem you don’t have. Focus once, switch to manual, and it never moves again. This is the single most reliable fix, and it’s free.
3. Give it something to lock onto. Contrast detection needs edges. If you’re against a plain wall in flat light wearing a solid shirt, there’s very little to measure. More texture in frame, or more directional lighting to create edges on your face, both help.
4. Narrow the focus area. Wide-area autofocus evaluates the whole frame and can be pulled to a background object. Switch to a single point or a small zone on your face.
5. Reduce autofocus sensitivity if your camera allows it. Many cameras have AF speed and tracking sensitivity settings. Lowering them makes the system less eager to re-evaluate, which reduces mid-sentence corrections.
6. Stop down slightly. Shooting at f/1.4 gives a depth of field of centimeters, so small movements push you out of focus and the system re-hunts. Closing to f/2.8 gives more margin, at the cost of some background blur.
7. If it’s a webcam, check whether autofocus can be disabled. Many can be locked through the manufacturer’s software or a UVC control utility. Cheap webcams with fixed focus have no problem to fix — a related reason some premium webcams simply ship without autofocus at all.
Which system fits which setup
Fixed-position talking head — podcast, stream, course recording, calls. You’re in the same place for hours. What you need is a system that locks and stays locked, not one with high peak capability. ToF fits this precisely: it doesn’t hunt, doesn’t care about your lighting, and returns to the same place session after session. Manual focus on any camera also solves it.
Moving around a room or stage. Phase detection with strong subject detection. This is what it’s built for, and nothing else competes for unpredictable movement over distance.
Multi-person on a wide shot. Phase detection with face detection, so the camera can pick a subject among several. ToF measures distance to a region and doesn’t distinguish people on its own.
Very low light. ToF, by a wide margin — it supplies its own infrared and functions in complete darkness. Your image will still be noisy without light; focus just won’t be the failing part.
Anything at distance — sports, stage, wildlife. Phase detection. ToF’s range limit rules it out.
Where this shows up in real cameras
Most webcams use contrast detection, which is why webcam focus hunting is such a common complaint — and why several premium webcams sidestep the issue by using fixed focus instead, accepting that you must sit within a set distance range.
Mirrorless and DSLR bodies use on-sensor phase detection, generally with sophisticated subject detection layered on top. Best-in-class for movement, and the reason those cameras feel decisive.
Time-of-flight arrived first in phones, where it assists the main camera in low light, and has started appearing in cameras built specifically for streaming — where the subject is at a fixed, close distance and consistency across long sessions matters more than tracking range. The YoloCam S7 uses ToF for this reason: a Micro Four Thirds camera at a desk, where the focus problem is “stay locked on someone three feet away for two hours” rather than “track a subject running across a field.”
Worth noting that this is a genuine engineering tradeoff rather than a ranking. The S7’s sibling, the YoloCam S3, uses phase detection — a reasonable choice at its smaller size and different use profile. No system is best at everything, which is the actual conclusion here.
Frequently Asked Questions
Why does my camera keep hunting for focus?
Most likely it uses contrast detection, which finds focus by trial and error — it moves the lens, checks whether sharpness improved, and repeats. It cannot confirm it reached peak sharpness without going slightly past it, so the overshoot-and-return is inherent to the method rather than a fault. Hunting gets worse in low light, against low-contrast subjects like plain walls or solid-color clothing, and at wide apertures where depth of field is very shallow. The quickest fixes are adding light, narrowing the focus area to a single point on your face, or switching to manual focus if you sit in a fixed position.
What is time-of-flight autofocus?
A system that emits infrared light and measures how long it takes to return, calculating distance directly from that. Unlike contrast or phase detection, it doesn’t analyze the image at all — it measures physical distance to whatever is in front of the lens. That gives it three properties: it works in complete darkness because it supplies its own light, it never hunts because it isn’t searching, and it’s perfectly repeatable session to session. Its limits are range (reliable over meters, not tens of meters), interference from bright sunlight, and unpredictable behavior on glass and mirrors.
Contrast detection vs phase detection — what’s the difference?
Contrast detection measures image sharpness and moves the lens by trial and error, with no knowledge of which direction to go or how far. Phase detection compares two views of the scene from opposite sides of the lens; the offset between them reveals both the direction and the amount of correction needed, so the camera drives the lens straight to focus without searching. Phase detection is faster and doesn’t visibly hunt; contrast detection is cheaper and needs no dedicated hardware. Both degrade in low light. Most webcams use contrast detection; most mirrorless and DSLR bodies use on-sensor phase detection.
Is time-of-flight better than phase detection?
For different jobs. ToF wins on consistency: no hunting, works in complete darkness, and returns to the same focus position every session, which suits a camera in a fixed position for long stretches. Phase detection wins on capability: it tracks unpredictable movement, works at any distance, and pairs with subject detection to choose among multiple faces. For a person at a desk three feet from the camera, ToF’s characteristics match the job better. For a subject moving around a room or at distance, phase detection is clearly stronger.
Does autofocus work in the dark?
Contrast detection essentially doesn’t — it needs visible edges to measure, and in dim light it chases image noise instead. Phase detection degrades significantly and many cameras fall back to contrast detection in low light, which is why a camera that snaps into focus in daylight starts hunting in a dark room. Time-of-flight works in complete darkness, because it emits its own infrared light rather than relying on ambient light. Your image will still look noisy without lighting — focus just won’t be the part that fails.
What’s the best autofocus for streaming?
Depends on whether you move. For fixed-position content — podcasts, streams, calls, course recording — you want a system that locks and stays locked across hours, not one with the highest peak capability. Time-of-flight fits that precisely, and manual focus achieves the same result on any camera for free. If you move around a room or stage, phase detection with subject detection is the right answer, since ToF is range-limited and doesn’t distinguish subjects on its own.
Is Eye AF the same as phase detection?
No, and conflating them causes a lot of confusion. Eye AF is detection — deciding which part of the frame to focus on. Phase detection, contrast detection, and time-of-flight are measurement — determining how far away that thing is and how to move the lens. They’re independent layers. A camera can have excellent Eye AF on top of a slow measurement system and still visibly hunt. When a spec sheet advertises Eye AF, it tells you what the camera targets, not how smoothly it gets there.
Should I just use manual focus for streaming?
For a fixed setup, it’s a legitimate and often better answer. If you sit in the same chair at the same distance every session, autofocus is continuously re-solving a problem that isn’t changing — and every re-evaluation is a chance for a visible correction. Focus once, switch to manual, and it’s locked. The caveats: you need to remember to refocus if you change your seating distance or lens, and you’ll want to verify focus at the start of each session. Cameras with time-of-flight make this less necessary, since they lock and stay locked without a search.
Why do some expensive webcams have fixed focus?
Because at webcam distances, fixed focus is often more reliable than the autofocus they could afford to include. A webcam sits a predictable distance from your face, and a lens with a small aperture and small sensor has deep depth of field — so a fixed focus point covers the whole realistic range. That eliminates hunting entirely. The tradeoff is that you must stay within the designed distance range, and there’s no way to focus on anything else, such as an object you hold up to the camera.
The short version
- Detection (“what to focus on”) and measurement (“how far away”) are separate systems. Eye AF is detection and says nothing about hunting.
- Contrast detection searches by trial and error. Hunting is inherent to the method, not a defect. Common in webcams.
- Phase detection calculates direction and distance in one step. Best for movement. Degrades in low light.
- Time-of-flight measures distance with infrared. Doesn’t hunt, works in darkness, perfectly repeatable — but range-limited and doesn’t identify subjects.
- The differences barely show in photography, where a half-press hides the search, and show constantly on video, where the camera is always live.
- For a fixed camera pointed at you for hours, consistency beats peak capability.
- Most hunting complaints are actually lighting problems. Add light first.
Related reading
- Camera Sensor Sizes Explained
- The 4K Webcam With a Real Camera Sensor: YoloCam S7 Explained
- Do You Need a Capture Card for Streaming?
- Best 4K Webcams in 2026
926 total views, 15 views today

Meredith, the Marketing Manager at YoloLiv. After getting her bachelor’s degree, she explores her whole passion for YoloBox and Pro. Also, she contributed blog posts on how to enhance live streaming experiences, how to get started with live streaming, and many more.