Konecz

How an AI agent reads a video frame without looking at the picture

Article by

An AI agent can understand a video frame without looking at it when someone describes that frame in numbers. That is what kodecz explain does: it says which scene is on screen, where each text sits in pixels, which word is being spoken at that instant, which sound is playing and where the presenter is. The answer fits in about 300 tokens and comes back in 1 to 3 seconds, without rendering the video.

Why not just send the picture?

Because a picture is expensive and vague for a model. Each image takes a lot of room in the context, and the model sees the scene the way a person glances at it: it sees there is a title, but not whether it starts at pixel 442 or 460, or whether the word being spoken is «sentence» or «short». To decide whether a title will hit the face or a zoom left on time, the agent needs measurements.

Text with numbers is the model's home ground. It compares, adds up and decides without guessing.

What does explain show?

The format, with an example from the Kodecz docs (the sample text is Portuguese):

frame 36/180 · 1.20 s · 30 fps · ExplicaSintetica
scene: itens[0] (0–120)
items:
  itens[0].itens[0] video [0,0,1920,1080]
  itens[0].itens[1] titulo-entrada [442,377,1037,136] «Edição como dados»
  itens[0].itens[2] faixa-do-tema [785,766,350,78] op 0.94 «Tema do trecho»
speech: «frase,» in «Primeira frase, curta.»
audio: voz 1 · trilha 0.1

Line by line:

  1. Frame and time: frame 36 of 180, 1.20 s, 30 frames per second.
  2. Scene: which scene is on screen and the frames it spans. A transition in progress shows up too.
  3. Items: every element that paints something on that frame, with its path in the edit (itens[0].itens[1]), its block (title, strip, video), its box in pixels [x, y, width, height], its opacity when below 1, and its text.
  4. Speech: the word spoken at that instant and its sentence, or the pause and the next word.
  5. Audio: which sounds are playing and at what volume. In the example, voice at 1 and music at 0.1.
  6. Presenter: the take's item and its box on screen.

The short output shows up to 10 items. With --json, everything comes out as one JSON line for another program to read.

How do you ask for a frame?

By time or by number:

kodecz explain folder/ MyVideo --at 1.2s

or --frame 36. The command opens the page in the same browser the automatic checks use, sets the requested frame and reads the geometry. It takes one to three seconds.

When is explain useful?

For the questions an agent keeps asking while it edits:

Item paths are the same across Kodecz: in the JSON edit, in assembly errors, in check findings and in explain. That lets the agent go from the problem to the right field without searching.

Does explain replace the image preview?

No. It answers «what is where», not «how it looks». Color, legibility, whether the framing is pleasing: that needs the picture, which Kodecz produces with kodecz preview in one to two seconds. The right way is to use both: numbers to decide, the picture to confirm.

The checks' limit applies too: explain reads the page, so text drawn inside an image or a recorded video does not show up as text.

Does this matter for Konecz videos?

It does. Videos with data on screen, like the ones on the Vigia Pix profile («Os 3 deputados eleitos que mais mandaram emenda Pix», the 3 elected deputies who sent the most Pix amendments), put speech, a number and a highlight in the same second. That is exactly where the agent must know, frame by frame, whether the value being spoken is on screen when it is said. Reading that in numbers is faster and more reliable than looking at dozens of images.

Frequently asked questions

Does explain render the video? No. It opens the page, sets the frame and reads it. No MP4 is produced.

Does it work on a hand-written page, without the JSON edit? Yes. Without the edit's paths, it lists the blocks by name, without a path.

Why do 300 tokens matter? Because an agent takes many steps on one video. A short description per frame leaves room for it to think and fix things, instead of filling the context with images.

The full method is in AI agents making video and on the Kodecz page. To have videos made and posted on your profile, talk to Konecz.

Markdown version