Sub topic 8
When a zoom helps the viewer
A zoom crops the frame to a smaller region and enlarges that region to fill the screen. This chapter covers when a zoom helps, when it hurts, and how to decide the size and timing of one before you build it. The next chapter builds the zoom with crop and scale, and the one after animates it.
This chapter assumes you can place clips on a timeline and cut a segment. The earlier chapters on the timeline and on cutting cover both. You also need to know your recording's resolution, for example 1920x1080.
What a zoom is for
A zoom answers one question for the viewer: where should I look right now? In a lecture the viewer cannot point at the screen or ask. The instructor's cursor and voice are the only guides, and the cursor is often a few pixels wide on a full-frame recording.
A zoom helps in these cases:
- Small text or detail. Code, spreadsheet cells, menu items, and equation subscripts often fall below a comfortable reading size on a phone or in a small player window.
- Directing attention. A slide with a diagram, a legend, and a caption has three places to look. Zooming on the part being discussed removes the other two.
- Following a change. When the instructor types a line, clicks a toggle, or edits a value, the viewer needs to see that spot.
- Hiding clutter. A zoom can crop out a notification, a bookmarks bar, or an unrelated window that you cannot remove from the recording.
A zoom does not help when the whole frame is already the point, for example a diagram the instructor traces across its full width. It also does not fix a recording where the text was never legible at the source resolution. Zooming only enlarges the pixels that exist.
A working model: a viewport over a fixed frame
Think of the zoom as a movable window, called a viewport, placed over the original frame. Three numbers define it:
- The magnification, for example 1.5x. The viewport is the frame size divided by this number.
- The center, the point in the original frame the viewport is centered on.
- The timing: when it starts, how long it holds, and when it returns to the full frame.
The output is always the original frame size. A 1920x1080 source with 1.5x magnification gives a 1280x720 viewport, which the editor scales up by 1.5 to fill 1920x1080.
Choosing the magnification
Magnification is a trade-off between legibility and context. At higher values the target is easier to read, but the viewer loses the surrounding frame and cannot see where on the screen they are.
| Magnification | Typical use | Risk |
|---|---|---|
| 1.2x to 1.5x | Slide regions, a window or panel, a code block | Little effect if the text was already readable |
| 1.5x to 2x | Small text, one menu, a few lines of code | The viewer may lose track of where on the screen this is |
| Above 2x | One word, a cursor position, a tiny control | Blurry on a 1080p source, and the edit feels abrupt |
The ceiling depends on the source. Enlarging a 1280x720 region to 1920x1080 invents pixels by interpolation, so edges soften. A 3840x2160 recording can zoom 2x and still fill a 1080p output with real pixels. If you plan to zoom often, record at a higher resolution than you will export.
A simple legibility check: export a draft, play it in a small window or on a phone, and see whether you can read the target text without leaning in. If you cannot, increase the magnification or zoom in on the source application itself (larger font, browser zoom) when you re-record.
Choosing the center and the edges
The center should sit on the thing being discussed, but the viewport must stay inside the frame. Near an edge, you move the center inward instead of letting the viewport run off the frame. The function below computes a viewport that is clamped to the frame and has even dimensions, which common H.264 settings (yuv420p) require.
def crop_box(frame_w, frame_h, cx, cy, zoom):
"""Return an ffmpeg filter string that zooms on (cx, cy)."""
w = int(frame_w / zoom) // 2 * 2
h = int(frame_h / zoom) // 2 * 2
x = int(min(max(cx - w / 2, 0), frame_w - w)) // 2 * 2
y = int(min(max(cy - h / 2, 0), frame_h - h)) // 2 * 2
return f"crop={w}:{h}:{x}:{y},scale={frame_w}:{frame_h}"
# A code block centered near (1300, 400) in a 1920x1080 recording.
print(crop_box(1920, 1080, 1300, 400, 1.5))
# A target near the top-right corner: the box is clamped to the frame.
print(crop_box(1920, 1080, 1900, 20, 2))The first call prints crop=1280:720:660:40,scale=1920:1080. The second prints crop=960:540:960:0,scale=1920:1080, because the viewport cannot extend past the right and top edges even though the target is at the corner.
The scripted example in the next chapter uses the same crop and scale filters. Here the point is that you choose the three numbers before you edit. Deciding them in advance prevents the most common error, a zoom that cuts off the end of a line of code.
Timing: when to start, hold, and end
A zoom has to arrive slightly before the viewer needs it and leave after they have finished reading. These guidelines work for most lectures:
- Start just before the instructor refers to the area. If the narration says "look at the second argument," begin the zoom as they say "look at," not after "argument."
- Hold long enough to read. Count the words in the zoomed region and allow about the time it takes to read them silently, plus a beat. A zoom that lasts two seconds on a six-line code block frustrates viewers.
- Return to the full frame when the topic changes, not at a fixed time. If the next sentence refers to something outside the viewport, the zoom is already wrong.
- Avoid zoom chains. Moving from one zoomed area to another without returning to the full frame is acceptable for a few seconds. Over a longer stretch, the viewer loses their sense of the whole screen.
Timing interacts with cuts. If you remove a mistake in the middle of a zoomed segment, check that the zoom start and end points still sit where you intended after the cut. Zooms are cleanest when they begin and end between cuts, not across them.
Common errors
- Zooming on everything. If every few seconds changes the framing, the viewer stops noticing which changes matter. Reserve zooms for moments where the viewer would otherwise miss something.
- Zooming without checking the source resolution. A 2.5x zoom on a 1080p recording looks soft. Check at 100% playback before you commit.
- Hiding the cursor. If the cursor is the thing being followed, keep it inside the viewport with margin on all sides. A cursor at the viewport edge disappears as the instructor moves it.
- Leaving the zoom on after the instructor moves on. The audio and the picture then disagree, which viewers notice quickly.
- Zooming on a changing area with a static viewport. If the instructor scrolls or opens a new window, either widen the viewport or move it with the content.
- Odd-sized crops. Odd widths or heights can make an encoder fail or add a pixel of padding. Round to even numbers, as the function above does.
Check your decision before building it
Before you add a zoom, answer four questions in order:
- What will the viewer miss if the frame stays full?
- Is that area sharp enough at the magnification I need?
- Where is the center, and does the viewport stay inside the frame with the cursor visible?
- When does it start and end relative to the narration and to any cuts?
If you cannot answer the first question in one sentence, skip the zoom.
Exercise
A lecture is recorded at 1920x1080. You want to zoom on a code block centered at (300, 900) with 2x magnification. What viewport size do you get, and where must its top-left corner be so that it stays inside the frame? Is the result likely to look sharp?
Show answer
At 2x, the viewport is 960x540. Centered on (300, 900), it would start at x = 300 - 480 = -180 and y = 900 - 270 = 630, so the x value is outside the frame. Clamp x to 0. For y, the viewport must end at or before 1080, so the largest allowed y is 1080 - 540 = 540, and y = 630 is also outside. Clamp y to 540. The top-left corner is (0, 540), and the code block at (300, 900) still sits inside the viewport (x from 0 to 960, y from 540 to 1080), though off-center. A 960x540 region scaled to 1920x1080 is a 2x upscale of real pixels, so text will look soft. It is acceptable for large text, but marginal for small code, so a 4K source would be better.
Exercise
A zoom starts when the instructor finishes saying "this parameter controls the learning rate" and ends after exactly two seconds. Name two timing problems and give a better rule for the start and the end.
Show answer
The zoom starts after the viewer needed it, because the instructor was already talking about the parameter, and a fixed two-second hold ignores how much there is to read. Better rule: start the zoom just before the instructor refers to the area, for example as they begin the sentence, and hold it until the topic changes or long enough to read the zoomed content, then return to the full frame.