# yt-dlp chapters: split, embed and remove

Work with video chapters in yt-dlp: list them, split a video or podcast into one file per chapter, name the split files, embed chapter markers, and cut chapters out by title. Commands tested on yt-dlp 2026.11.23.

Long videos, talks and podcasts often come with chapters. yt-dlp can read them, split the file at each one, write them into the file as markers, or cut some of them out. All of it needs [ffmpeg](/guides/fix-ffmpeg-not-found), and all of it needs the site to hand yt-dlp chapter data.

We tested every command below on yt-dlp `2026.11.23` (29 November 2026) with a 44-minute talk on Vimeo that has 12 chapters.

## See what chapters a video has

```bash
yt-dlp --print chapters "URL"
```

You get a JSON list with `start_time`, `end_time` (in seconds) and `title` for each chapter:

```json
[{"start_time": 0, "end_time": 10, "title": "<Untitled Chapter 1>"}, {"title": "Welcoming Dr Arielle Schwartz", "start_time": 10, "end_time": 106}, ...]
```

If it prints `NA`, the video has no chapters and none of the options below will do anything. On YouTube, chapters come from timestamps in the description (`0:00 Intro`, `2:15 Setup`...), so a video without them has none. To print just the titles, one per line:

```bash
yt-dlp --print "%(chapters.:.title)#l" "URL"
```

Drop the `#` (`%(chapters.:.title)l`) to get them on one line, separated by commas.

## Split into one file per chapter

```bash
yt-dlp --split-chapters "URL"
```

yt-dlp downloads the whole video first, then cuts it (video title shortened here):

```text
[SplitChapters] Splitting video by chapters; 12 chapters found
[SplitChapters] Chapter 001; Destination: Talk title - 001 <Untitled Chapter 1> [756714419].mp4
[SplitChapters] Chapter 002; Destination: Talk title - 002 Welcoming Dr Arielle Schwartz [756714419].mp4
...
[SplitChapters] Chapter 012; Destination: Talk title - 012 Where to find out more [756714419].mp4
```

The full file stays next to the chapter files, so you end up with 13 files for 12 chapters. The default name for a split file is `%(title)s - %(section_number)03d %(section_title)s [%(id)s].%(ext)s`. Characters that aren't allowed in file names, like `?` and `<>`, are swapped for look-alikes (`？`, `＜＞`), so add `--restrict-filenames` if a script has to handle the names.

The cuts land on keyframes, which is fast but can be a second or so off. For frame-exact cuts add `--force-keyframes-at-cuts`, which re-encodes and is much slower.

### Name the split files

Give split files their own output template with the `chapter:` prefix. The normal `-o` still names the full file:

```bash
yt-dlp --split-chapters \
  -o "full.%(ext)s" \
  -o "chapter:%(section_number)02d - %(section_title)s.%(ext)s" \
  "URL"
```

That gave us `full.mp4` plus `01 - ＜Untitled Chapter 1＞.mp4` to `12 - Where to find out more.mp4`. The chapter fields are `section_number`, `section_title`, `section_start` and `section_end`. To put chapters in their own folder, use `-P "chapter:chapters"` or a path in the template. More on templates in the [output template guide](/guides/yt-dlp-output-template).

### Split a podcast or album into MP3s

```bash
yt-dlp -x --audio-format mp3 --split-chapters "URL"
```

yt-dlp converts to MP3 first and then splits, so every chapter file is an MP3. Our test gave 12 chapter MP3s plus the full one. See [extract audio as MP3](/guides/extract-audio-mp3) for quality settings.

## Embed chapter markers in the file

```bash
yt-dlp --embed-chapters "URL"
```

Chapters aren't written into the file by default. With `--embed-chapters`, players like VLC and mpv show them in the seek bar, and `ffprobe -show_chapters file.mp4` lists them. `--embed-metadata` also adds chapters along with the title and other tags ([embed metadata](/guides/yt-dlp-embed-thumbnail-metadata)).

## Remove chapters by title

`--remove-chapters` takes a regular expression and cuts every chapter whose title matches:

```bash
yt-dlp --embed-chapters --remove-chapters "Untitled|Where to find out more" "URL"
```

```text
[ModifyChapters] Removing chapters from trimmed.mp4
Deleting original file trimmed.uncut.mp4 (pass -k to keep)
```

In our test the 10-second opening and the 126-second closing chapter went, taking the file from 2,636 to 2,500 seconds, and the remaining 10 chapter markers were shifted to match. The match is case-sensitive; start the pattern with `(?i)` to ignore case. The option can be given more than once, and it also takes time ranges with a `*`, the same syntax as [--download-sections](/guides/yt-dlp-download-sections): `--remove-chapters "*0-30"` drops the first 30 seconds.

## Keep only some chapters

`--download-sections` with a chapter name is meant to fetch just that part ([download sections guide](/guides/yt-dlp-download-sections)). On this Vimeo video it didn't: it wrote an empty file ("Output file is empty, nothing was encoded") for both the audio-only and the video formats. When that happens, download the whole thing and remove every chapter except the one you want, with a negative lookahead:

```bash
yt-dlp --remove-chapters "^(?!Yoga nidra$)" "URL"
```

That left a 196-second file, exactly the "Yoga nidra" chapter. For several chapters, list them: `"^(?!(Intro|Yoga nidra)$)"`. It downloads the full video first, so it's slower than a section download, but it works wherever splitting does.

## When it doesn't work

- **Nothing happens, no error:** the video has no chapters. Check with `--print chapters`; `NA` means none.
- **`ffmpeg not found`:** splitting, embedding and removing all run through ffmpeg. [Install it](/guides/fix-ffmpeg-not-found).
- **Chapter starts are slightly off:** add `--force-keyframes-at-cuts`.
- **`--download-sections` gives an empty file:** use the `--remove-chapters` lookahead above instead.
- **The files land in the wrong place:** the `chapter:` template only applies to split files. Use `-P "chapter:<folder>"` for their folder.

<DocCta variant="default" appFirst />

<Faq />