Generate thumbnails from videos

Automatically create preview thumbnails from video files at specific timestamps or intervals.

Video · Notebook · Updated

Colab runs it in your browser. If it calls a model provider, it asks for that provider's API key in a cell.

How it works

You add computed columns that extract frames from videos. Thumbnails are generated automatically when you insert new videos.

What it covers

  • Extract thumbnail at a specific timestamp
  • Generate multiple thumbnails per video
  • Resize thumbnails to standard dimensions

What it uses

Install
terminal
pip install pixeltable
Pixeltable calls
pxt.create_table()pxt.create_view()insert()add_computed_column()

A look at the code

video-generate-thumbnails.ipynb
# Extract frame at 1 second as thumbnail
videos.add_computed_column(
thumbnail=pxtf.video.extract_frame(videos.video, timestamp=1.0)
)

One cell of the notebook, copied as it is. Open it in Colab for the rest.

Browse all 103