Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Authored by Souvik Mandal, Ph.D.

Project Leader & Instructor, Computational Behavioral Sciences, LS100, FAS, Harvard University | Linkedin ID: souvik-mandal-phd


Last updated: 2026-07-02

Open in Colab Open in GitHub Codespaces

In this notebook, you’ll:

  1. Load a video file and inspect basic properties (frame count, FPS, resolution).

  2. Iterate through a few frames and display them.

  3. Fun task: Capture video from your webcam and record to a file.

Requirements: opencv-python and matplotlib (install with pip install opencv-python matplotlib if needed).

1) Load a video and inspect properties

2) Read and show a few frames

3) Task — Extract every Nth frame and save as images

4) Fun Task — Capture webcam and record to a file