How-to
yt-dlp chapters: split, embed and remove
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, 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
yt-dlp --print chapters "URL"You get a JSON list with start_time, end_time (in seconds) and title for each chapter:
[{"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:
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
yt-dlp --split-chapters "URL"yt-dlp downloads the whole video first, then cuts it (video title shortened here):
[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].mp4The 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:
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.
Split a podcast or album into MP3s
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 for quality settings.
Embed chapter markers in the file
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).
Remove chapters by title
--remove-chapters takes a regular expression and cuts every chapter whose title matches:
yt-dlp --embed-chapters --remove-chapters "Untitled|Where to find out more" "URL"[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: --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). 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:
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;NAmeans none. ffmpeg not found: splitting, embedding and removing all run through ffmpeg. Install it.- Chapter starts are slightly off: add
--force-keyframes-at-cuts. --download-sectionsgives an empty file: use the--remove-chapterslookahead above instead.- The files land in the wrong place: the
chapter:template only applies to split files. Use-P "chapter:<folder>"for their folder.
For builders
Using yt-dlp inside an app or script?
Paste a link to see what a managed media-import API returns — no install, no signup.
Building this into an app? See the API your backend calls instead
Frequently asked questions
How do I split a video into chapters with yt-dlp?
Add --split-chapters: yt-dlp --split-chapters "URL". yt-dlp downloads the whole video, then writes one file per chapter next to it. The full file is kept. You need ffmpeg installed, and the site has to give yt-dlp chapter data.
How do I split a podcast or album into MP3 files per chapter?
Combine audio extraction with the split: yt-dlp -x --audio-format mp3 --split-chapters "URL". In our test that gave one MP3 per chapter plus the full MP3, 13 files for a 12-chapter talk.
How do I name the files --split-chapters creates?
Use an output template with the chapter: prefix, for example -o "chapter:%(section_number)02d - %(section_title)s.%(ext)s". The fields you can use for split files are section_number, section_title, section_start and section_end, plus the normal fields like title and id.
Why does --split-chapters do nothing?
The video has no chapter data. Check with yt-dlp --print chapters "URL": if it prints NA, there's nothing to split on. On YouTube, chapters come from timestamps in the description, so videos without them have none. Use --download-sections with time ranges instead.
Does --embed-chapters work with every format?
It works for MP4, M4A, MKV and other containers ffmpeg can write chapters to. yt-dlp adds the markers after the download. Players such as VLC and mpv then show them in the seek bar.