Video

What is a frame iterator?

A frame iterator walks a video at a chosen rate and emits one row per frame, with an index and a timestamp on the source clip.

Updated · Part of What is an iterator?

How it works

  • You choose frames per second.
  • Each frame is a row of a view over the video.
  • Models and embedding indexes run on the frame column.

What it is not

It is not an ffmpeg command you cron and never reattach to the parent video.

frame iterator: this, and the thing it is confused with

frame iterator: this, and the thing it is confused with
ThisNot this
RateYou set itEvery encoded frame, always
ParentThe video rowA folder of JPEGs
PositionFrame index and timestampLost after extraction

Where Pixeltable fits

Pixeltable’s view sets iterator=frame_iterator(video=Videos.video, fps=1). The frame column is what later columns read.

import pixeltable as pxt
from pixeltable.functions.video import frame_iterator
TableModel = pxt.model_base()
class Videos(TableModel, name='videos'):
video: pxt.Video
class Frames(
TableModel,
name='frames',
base=Videos,
iterator=frame_iterator(video=Videos.video, fps=1),
):
pass

Questions

How does frame iterator work?
You choose frames per second. Each frame is a row of a view over the video. Models and embedding indexes run on the frame column.
What is frame iterator often confused with?
It is not an ffmpeg command you cron and never reattach to the parent video.