Konecz

How to keep text off the speaker's face in a video, frame by frame

Article by

To keep text off the face, the video has to know where the face is on every frame and keep all text outside a margin around it. A fixed position does not work, because the person moves and the zoom changes the size of the face. In Kodecz, the automatic check finds the face, adds the margin and reports the exact frame where a caption, band or title touched it.

Why is this mistake so common in AI-made video?

Because the agent picks the text position without knowing where the face is. In the Kodecz error taxonomy, «Text over the face» has that cause written down: a fixed text position with no idea where the face is. The symptom is the one everybody has seen: the face disappears behind the text, and the text is hard to read over skin.

It was also first on Konecz's own list. In the company's video skill, rule G15 says: no text, whether caption, band, chip or title, over the presenter's face, in any format and at any point of the zoom.

Where should text go in a vertical video?

In full-screen 9:16, text goes in the bottom half, below the chin. That is the practical rule. The band with the topic of the segment sits right above the caption, on the same axis, and nothing sits in a corner competing with it.

The catch is that «below the chin» moves. When the video does an emphasis zoom, the face grows and the chin drops. Text that was fine on frame 100 can be on the mouth by frame 130.

What is the right margin around the face?

The Kodecz check uses these numbers:

  1. The face box runs from the eyebrows to the chin, as the face detector returns it.
  2. Above, it adds 25% of the face height, to cover forehead and hair.
  3. Below, it adds 10% of the height.
  4. On each side, it adds 10% of the width.

Any piece of readable text that touches that area, even by one pixel, is a failure. Text crossing the face while fading in or out, still half transparent (opacity under 0.5), does not count: it is appearing or leaving, not being read.

How does the check find the face on every frame?

It does not run the detector on every frame, which would be slow. Instead it:

Then it compares the face with the box of every line of text, on every frame. On a 75-second test composition (2,250 frames), the whole check took 7.0 seconds of CPU; the face part, 3.9 seconds.

What does the agent get back when it fails?

An answer it can act on. kodecz check exits with code 4, prints one JSON line with a count per rule and saves a picture of the worst frame with the boxes drawn: red on the text, yellow on the face with its margin.

Each failure gives the first and last frame of the stretch, the worst frame, the text (first 40 characters) and a suggested fix. For a band, for instance, the suggestion is to raise it to the chin of the take or move it below. The agent fixes, runs it again and only renders once it passes.

What can the check not see?

It reads the page's text. Text drawn inside an image, a video or a canvas is invisible to it. When an image or a canvas covers the presenter, it raises a warning, precisely because there may be text hidden there.

And when the detector finds no face in a sample, that is a warning too. A detection failure never counts as a pass.

Frequently asked questions

Can I show the person's name without covering the face? Yes. That is the lower third: name and role at the bottom, outside the face margin.

What if there are two people in the video? The check treats the largest face in the clean frame as the presenter's. For videos with several people, look at the frames too.

Does it work for horizontal video? Yes. The rule applies to any format and is checked on both when the same video comes out in 16:9 and 9:16.

Do I need a GPU for the check? No. It always runs on the CPU.

More on how Kodecz checks videos in the summary of the paper on AI agents making video. At Konecz, this rule runs on every video before it goes to a client's profile.

Markdown version