A port of SponsorBlock for MPV (or Celluloid) written in Rust.
-
Why write a MPV plugin in Rust ? Why not!
-
Can I write my own plugin in Rust ? Yes! Just follow the example here and you will be ready.
- rust
- pkgconf
- libcurl
- libcurl
Build the plugin:
rustup override set nightly
cargo build --release
Move the lib generated to your MPV (or Celluloid) scripts
folder.
cp ./target/release/libmpv_sponsorblock.so ~/.config/mpv/scripts/sponsorblock.so
You can choose to install the configuration file too:
cp ./sponsorblock.toml ~/.config/mpv/sponsorblock.toml
If you don't, only the sponsors segments will be skipped by default as specified by the API.
Play a YouTube video and segments you chose in the configuration file will be skipped or muted. If the video is entirely labeled as a category it will be shown at startup :