npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

peertube-plugin-sponsorblock

v1.0.0

Published

Automatically skip or remove sponsor segments in videos imported from YouTube using the SponsorBlock API

Readme

PeerTube SponsorBlock Plugin

Automatically skip or permanently remove sponsored segments from YouTube videos imported into your PeerTube instance.

What it does: When you import a video from YouTube, this plugin checks the SponsorBlock database and automatically skips (or removes) sponsored segments, intros, outros, and more.


Quick Start

Installation

  1. Go to Administration > Plugins/Themes in your PeerTube instance
  2. Search for SponsorBlock in the plugins list
  3. Click Install and then Enable

Or install via CLI:

cd /var/www/peertube
sudo -u peertube NODE_CONFIG_DIR=/var/www/peertube/config NODE_ENV=production \
  npm run plugin:install -- --npm-name peertube-plugin-sponsorblock

Basic Usage

  1. Enable the plugin in Plugins/Themes
  2. Configure your preferred settings (see below)
  3. Import videos from YouTube as usual — SponsorBlock segments will be handled automatically!

Features

What works right now

| Feature | Description | |---------|-------------| | Auto-skip | Segments are automatically skipped during playback | | Visual markers | See sponsor segments on the video progress bar | | Multiple categories | Skip sponsors, intros, outros, self-promo, and more | | Admin dashboard | View stats, manage mappings, and sync segments | | Permanent removal | Optionally cut segments from video files permanently | | Automatic detection | Works automatically when importing YouTube videos |

Two modes of operation

Skip mode (default)

  • Segments are skipped automatically during playback
  • No files are modified
  • Works for any video imported from YouTube
  • Can be configured per category (sponsor, intro, interaction, etc.)

Remove mode

  • Segments are permanently cut from the video file
  • Saves bandwidth and storage
  • Irreversible — use with backups
  • Requires FFmpeg installed on your server

Configuration

Settings

| Setting | Description | |---------|-------------| | Mode | Choose skip (client-side) or remove (permanent) | | Categories to skip | Select which segment types to skip (sponsor, intro, outro, self-promo, interaction, music_offtopic) | | Storage path | Where to store processed videos (remove mode only) | | Sync interval | How often to refresh segment data from SponsorBlock |

Admin Dashboard

Access the dashboard at Administration > Plugins > SponsorBlock > Go to plugin settings:

  • Stats cards: See mapped videos, total segments, time saved, and pending jobs
  • Mappings table: View all YouTube-to-PeerTube mappings with actions
  • Bulk actions: Scan imports, sync all, or process all videos at once

How it works

  1. When you import a video from YouTube, the plugin detects the YouTube video ID
  2. It queries the SponsorBlock API for sponsor segments
  3. Segments are cached locally in your database
  4. During playback, segments are automatically skipped (or removed from the file)

What is SponsorBlock?

SponsorBlock is a crowdsourced database of video segments. Users submit timestamps for:

  • Sponsors - Paid promotions and sponsorships
  • Intro - Animated introductions
  • Outro - Credits and end screens
  • Self-promo - Unpaid promotion of creator's content
  • Interaction - Reminders to like, subscribe, follow
  • Music off-topic - Non-music sections in music videos

Learn more at sponsor.ajay.app


Important Notes

Skip mode (recommended for most users)

  • Segments are still downloaded (no bandwidth savings)
  • Only works in the PeerTube web player
  • Reversible — you can disable it anytime

Remove mode (advanced users)

  • Irreversible — video files are permanently modified
  • Saves bandwidth and storage space
  • Removes all segment types (category settings don't apply)
  • Comment timestamps may shift after removal
  • Requires automatic backups — use at your own risk
  • Requires ffmpeg and ffprobe installed on your server

Documentation


Requirements

  • PeerTube >= 6.0.0
  • For remove mode: ffmpeg and ffprobe in system PATH

License

AGPL-3.0 (compatible with PeerTube)


Support & Contributing

Contributions welcome! Testing on development instances is especially appreciated.


Author: Jean-Baptiste L.