Skip to main content

Overview

yt-dlp integrates with the SponsorBlock API to automatically skip or mark various segments in YouTube videos, including sponsors, intros, outros, self-promotion, and more.
SponsorBlock is a crowdsourced database of sponsor segments. The community submits timestamps, which are then used to skip these segments.

Segment Categories

SponsorBlock recognizes these segment types:

Marking Segments

Create chapter markers for sponsor segments without removing them:

Custom Chapter Titles

Customize how SponsorBlock chapters appear:
Available template fields:
  • start_time: Segment start time
  • end_time: Segment end time
  • category: Category ID (e.g., “sponsor”)
  • categories: List of category IDs
  • name: Category name
  • category_names: List of category names

Removing Segments

Removing segments requires re-encoding the video with ffmpeg, which takes time and may reduce quality slightly.
Permanently remove segments from the downloaded video:
1

Remove sponsors only

2

Remove multiple categories

3

Use default removal

Exclude categories

Combining Mark and Remove

You can both mark and remove different categories:
If a category appears in both --sponsorblock-mark and --sponsorblock-remove, removal takes precedence.

Common Use Cases

Clean viewing experience

Music videos

Podcast/long-form content

Educational content

Audio Extraction with SponsorBlock

Remove segments when extracting audio:

SponsorBlock API Configuration

Custom API server

Default API: https://sponsor.ajay.app

Disable SponsorBlock

Working with Chapters

Split by chapters after removing sponsors

Force keyframes for clean cuts

Using --force-keyframes-at-cuts requires re-encoding and significantly increases processing time.

Playlist Processing

Apply SponsorBlock to entire playlists:

Performance Considerations

Marking (Fast)

This is fast because it only modifies metadata.

Removing (Slow)

This takes time proportional to video length and requires ffmpeg.
If you want to preview segments before removal, use --sponsorblock-mark first, then manually check the chapters.

Advanced Examples

Complete automated workflow

Audio podcast with clean chapters

Minimal file size

Verify Segments

Check what segments are available before downloading:

Troubleshooting

No segments found

Not all videos have SponsorBlock data. The database is crowdsourced and may not cover every video.

Segments not removed correctly

API connection issues

SponsorBlock on Other Platforms

SponsorBlock integration currently only works for YouTube videos. Other platforms are not supported.

Contributing to SponsorBlock

Help improve the SponsorBlock database:
  • Install the browser extension
  • Submit segments while watching videos
  • Vote on existing segments
Your contributions help the entire community!

Next Steps

Post-Processing

Other post-processing options

Format Conversion

Converting video formats

Playlists

Process entire playlists

Options Reference

SponsorBlock options reference