yt-dlp SponsorBlock: Cut Sponsors Out Automatically
Quick answer
yt-dlp has SponsorBlock built in — no plugin, no extension. It can mark sponsor segments as chapters, or cut them out. Marking is the better default: instant, reversible, and it does not re-encode anything:
yt-dlp --sponsorblock-mark all --embed-chapters "URL"
yt-dlp --sponsorblock-remove sponsor,selfpromo,interaction "URL"
Mark and remove are not two intensities of one thing
Marking writes the segments into the file's chapter list. The video is untouched, so it costs nothing and the download is as fast as it would have been. Your player shows the chapters and you skip them yourself.
Removing re-cuts the file. That takes time proportional to its length, produces some loss at the cut points, and is irreversible — if a segment was submitted with the wrong timestamps, you have permanently lost that part of the video.
For an archive, mark. For a phone you are filling before a flight, remove.
The categories
| Category | What it covers | Safe to remove? |
|---|---|---|
sponsor | Paid promotion | Yes |
selfpromo | Merch, Patreon, the creator's own products | Yes |
interaction | "Like and subscribe" | Yes |
intro | Title animation | Usually |
outro | End cards | Usually |
preview | Recap of what is coming | Depends on the video |
filler | Tangents and jokes | Subjective — often removes real content |
music_offtopic | Non-music in a music video | For music only |
poi_highlight | The actual point of the video | Never — mark it |
The combination worth using
Remove what is unambiguously advertising, mark everything else so it is visible but intact:
yt-dlp --sponsorblock-remove "sponsor,selfpromo,interaction" \
--sponsorblock-mark "intro,outro,preview,filler" \
--embed-chapters \
"URL"
--embed-chapters matters more than it looks: marking without it computes the
segments and then has nowhere to write them, which is the usual reason marking "does nothing".
Naming what got marked
yt-dlp --sponsorblock-mark all --embed-chapters \
--sponsorblock-chapter-title "[SponsorBlock] %(category_names)l" \
"URL"
Prefixing them makes SponsorBlock chapters visually distinct from the creator's own, which matters on videos that already have chapters.
In an archive job
Marking rather than removing is the right choice at archive scale, and not only for quality reasons — removing turns a fast copy into a re-encode on every video, which on a few hundred videos is hours:
yt-dlp --download-archive archive.txt -i \
--sponsorblock-mark all --embed-chapters \
--sleep-requests 2 \
-o "%(uploader)s/%(upload_date>%Y-%m-%d)s - %(title)s.%(ext)s" \
"CHANNEL_URL"
Splitting on chapters
An unusual but useful combination: mark the segments, then write each chapter as its own file. The result is a folder where the sponsor is a separate file you can simply delete:
yt-dlp --sponsorblock-mark all --split-chapters -o "chapter:%(title)s/%(section_title)s.%(ext)s" "URL"
Turning it off
If SponsorBlock is set in your config file, this overrides it for one run:
yt-dlp --no-sponsorblock "URL"
Coverage, and its limits
The data is submitted by users, so it is excellent on large channels and thin on small ones. A video with no submitted segments produces no chapters and no error — that is the expected outcome, not a failure.
It also means occasional bad data: a segment submitted with wrong timestamps will cut the wrong thing. Community voting removes most of these, and it is one more reason marking is the safer default.
If it fails
-
Nothing happens. Usually no segments exist for that video. Check on
sponsor.ajay.app; add
--embed-chaptersif you are marking. - Removal fails during postprocessing. It needs ffmpeg — ffmpeg exited with code 1.
-
Chapters are not visible in your player. mp4's chapter support is patchy.
--merge-output-format mkv. -
Content you wanted was cut.
allincludedfillerorpoi_highlight. Name the categories explicitly. - Only on non-YouTube sites. Expected — the database covers YouTube.
Frequently asked
Where does the segment data come from?
Mark or remove?
Why did nothing happen?
Does removing lose quality?
Related
- Download a Playlist or Whole Channel with yt-dlp Playlists are where yt-dlp goes from a command to a workflow: archives so reruns skip what you have, ranges so...
- Install ffmpeg for yt-dlp on Windows, macOS and Linux Without ffmpeg yt-dlp is capped at whatever single file a site offers — usually 360p. How to install it on eac...
- The yt-dlp Config File: Stop Retyping the Same Flags Every flag you type twice belongs in yt-dlp.conf. Where the file goes on each OS, the load order that decides...