---
title: "Detect scene changes in videos"
description: "Automatically find scene cuts, transitions, and fades in video files."
url: "https://www.pixeltable.com/notebooks/video-scene-detection"
updated: "2026-04-10"
---

# Detect scene changes in videos

Automatically find scene cuts, transitions, and fades in video files.

- **Type:** Notebook
- **Group:** Video

## How it works

Three built-in detection methods handle different transition types using PySceneDetect.

## What it covers

- Detect hard cuts with scene_detect_content()
- Find fade transitions with scene_detect_threshold()
- Use adaptive detection with scene_detect_adaptive()

## What it uses

- **Install:** `pip install pixeltable scenedetect opencv-python`
- **Pixeltable calls:** `pxt.create_table()`, `insert()`, `add_computed_column()`

## A look at the code

```python
# Detect scenes using content-based detection (best for hard cuts)
videos.add_computed_column(
    scenes_content=videos.video.scene_detect_content(
        threshold=27.0,  # Lower = more sensitive
        min_scene_len=15,  # Minimum frames between cuts
    )
)

# View detected scenes
videos.select(videos.title, videos.scenes_content).collect()
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/video/video-scene-detection.ipynb
- **Docs page:** https://docs.pixeltable.com/howto/cookbooks/video/video-scene-detection
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/howto/cookbooks/video/video-scene-detection.ipynb
