Skip to main content
Make chapter entries for, or remove various segments (sponsor, introductions, etc.) from downloaded YouTube videos using the SponsorBlock API

Mark Segments

--sponsorblock-mark
string
SponsorBlock categories to create chapters for, separated by commasAvailable categories:
  • sponsor - Paid promotion
  • intro - Intro/intermission
  • outro - Outro/endcards
  • selfpromo - Self promotion
  • preview - Preview/recap
  • filler - Filler tangent
  • interaction - Interaction reminder
  • music_offtopic - Off-topic music
  • hook - Attention grabber
  • poi_highlight - Point of interest highlight
  • chapter - Chapter marker
  • all - All categories
  • default - Same as all
You can prefix the category with a ”-” to exclude it.See SponsorBlock Wiki for descriptions of the categories.Example:
yt-dlp --sponsorblock-mark all,-preview URL
yt-dlp --sponsorblock-mark "sponsor,intro,outro" URL

Remove Segments

--sponsorblock-remove
string
SponsorBlock categories to be removed from the video file, separated by commasIf a category is present in both mark and remove, remove takes precedence.The syntax and available categories are the same as for --sponsorblock-mark except that:
  • default refers to “all,-filler”
  • poi_highlight and chapter are not available
Example:
yt-dlp --sponsorblock-remove sponsor,intro URL
yt-dlp --sponsorblock-remove default URL

Chapter Title Template

--sponsorblock-chapter-title
string
default:"[SponsorBlock]: %(category_names)l"
An output template for the title of the SponsorBlock chapters created by --sponsorblock-markAvailable fields:
  • start_time - Start time of the segment
  • end_time - End time of the segment
  • category - Category code
  • categories - List of category codes
  • name - Segment name
  • category_names - List of category names
Example:
yt-dlp --sponsorblock-mark all --sponsorblock-chapter-title "[%(category)s]" URL

Disable SponsorBlock

--no-sponsorblock
flag
Disable both --sponsorblock-mark and --sponsorblock-remove

Custom API Location

--sponsorblock-api
string
default:"https://sponsor.ajay.app"
SponsorBlock API locationExample:
yt-dlp --sponsorblock-api "https://sponsor.ajay.app" URL