# Scene Splitter - PySceneDetect GUI

A simple Windows GUI wrapper for [PySceneDetect](https://www.scenedetect.com). Drag and drop a video file, check the options you want, pick an output folder, and click **Detect Scenes**.

---

## What It Does

- **Detects scene changes** in any video file automatically
- **Splits the video** into individual scene files
- **Exports timecodes** as CSV, EDL (for Premiere/Final Cut), or HTML report
- **Saves thumbnail images** of each detected scene
- **No re-encoding option** — super fast split using FFmpeg copy mode

---

## Quick Start

### 1. Install Python
Download and install Python 3.10+ from [python.org](https://www.python.org/downloads/)

**Important:** During installation, check the box **"Add Python to PATH"**

### 2. Install PySceneDetect
Open Command Prompt and run:
```
pip install scenedetect
```

### 3. Install FFmpeg (Optional but Recommended)
Download from [ffmpeg.org](https://ffmpeg.org/download.html) and add to PATH. Needed for video splitting.

### 4. Run Scene Splitter
Double-click **`Run_Scene_Splitter.bat`**

---

## How to Use

1. **Select Input Video** — Click **Browse...** and pick your video file (MP4, AVI, MKV, MOV, etc.)
2. **Select Output Folder** — Click **Browse...** to choose where scene files go (auto-suggests `scenes/` subfolder)
3. **Adjust Detection Settings**
   - **Threshold** — Higher = fewer scenes detected. Default 27 works for most content.
   - **Min Scene Length** — Ignore scenes shorter than X seconds.
4. **Check Output Options**
   - ☑ **Split Video into Scenes** — Creates separate video files for each scene
   - ☑ **Copy Mode** — Super fast, no re-encoding (requires FFmpeg)
   - ☑ **Export CSV** — Saves timecodes to a spreadsheet
   - ☑ **Export EDL** — Import scene cuts into Premiere Pro or Final Cut
   - ☑ **Save Scene Images** — Thumbnail snapshot of each scene
5. **Click "Detect Scenes"** — Watch the progress log in real-time

---

## Example Workflow

| What You Have | What You Get |
|---------------|-------------|
| One 45-minute interview video | 12 individual scene files (intro, Q1, Q2, etc.) |
| A movie file | Scene-separated clips for trailer editing |
| Lecture recording | Chapters split by topic changes |
| Sports footage | Every play as its own clip |

---

## Files

| File | Description |
|------|-------------|
| `scene_splitter_gui.py` | The GUI application (Python script) |
| `Run_Scene_Splitter.bat` | Double-click launcher — checks Python and runs the GUI |
| `README.md` | This file |

---

## Troubleshooting

**"PySceneDetect not found"**
→ Run: `pip install scenedetect`

**"FFmpeg not found" when splitting**
→ Install FFmpeg and add to PATH, or disable "Split Video into Scenes"

**Too many / too few scenes detected**
→ Adjust the **Threshold** slider. Higher = fewer scenes.

**Split videos have no audio**
→ Disable "Copy Mode" — it does a fast copy that sometimes skips tracks

---

## License

This GUI wrapper is free. PySceneDetect itself is open source under the BSD license.
