Code Monkey home page Code Monkey logo

mpv-sponsorblock's People

Contributors

glitchikun avatar lavafroth avatar thecactusvert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

mpv-sponsorblock's Issues

Invalid UTF-8 sequences in filenames cause mpv to segfault

Using 2.0.0 on Arch Linux (x86-64) with mpv v0.37.0.
To reproduce (assuming mpv-sponsorblock is installed; use bash for the ANSI-C quoting):

mkdir test
cd test
touch $'foo\xf0.mp3'
RUST_LOG=trace mpv --load-scripts=yes --no-resume-playback *.mp3 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'

I get:

[2024-03-01T10:18:18Z DEBUG mpv_sponsorblock] Starting plugin SponsorBlock [sponsorblock]!
[2024-03-01T10:18:18Z TRACE mpv_sponsorblock::client] Received start-file event
   cplayer: Playing: foo.mp3
Segmentation fault (core dumped)

Disabling scripts (I only have mpv-sponsorblock installed):

RUST_LOG=trace mpv --load-scripts=no --no-resume-playback *.mp3 'https://www.youtube.com/watch?v=aqz-KE-bpKQ'

I get:

   cplayer: Playing: foo.mp3
   cplayer: Failed to recognize file format.
   cplayer: Playing: https://www.youtube.com/watch?v=aqz-KE-bpKQ

I am reporting it here (and not in mpv's bugtracker) since it only occurs when mpv-sponsorblock is installed and enabled. If it is mpv's bug in handling script crashes, please let me know and I'll report it there.
Hopefully this is reproducible, please let me know if you need more details.

Create a binary release workflow

It would be nice to have a binary release for the shared library so that a user may only have to download and place it in the right location besides the config.

I can write a github actions workflow to automate this if you are interested.

Add license

It will be great if you can add an open source license, so that the community can make full use of it and legally link it to mpv.

Better documentation

Could the config be documented better? Eg. what is the "poi" or "full" action in action_types?

Sponsorblock works and skips the sections but only audio plays! Video doesn't play!

Note: Without this extension mpv plays youtube video without any trouble!


  • Configuration
$ cat sponsorblock.toml

# Server address
server_address = "https://sponsor.ajay.app"
# Categories: sponsor, selfpromo, interaction, poi_highlight, intro, outro, preview, music_offtopic, filler, exclusive_access
categories = ["sponsor", "selfpromo", "interaction", "poi_highlight", "intro", "outro", "preview", "music_offtopic", "exclusive_access"]
# Action types: skip, mute, poi, full
action_types = ["skip"]
# Get segments for a video with extra privacy 
privacy_api = false
# Third party YouTube domains like Piped, Invidious or CloudTube
domains = ["piped.kavin.rocks", "invidious.kavin.rocks"]
# Use OSD when a segment is skipped or muted
skip_notice = false
  • Example (with extension)
$ mpv https://www.youtube.com/watch?v=6YF0XNMpyoM
 (+) Video --vid=1 (*) (vp9 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
File tags:
 Uploader: Jonathan Antoine
 Channel_URL: https://www.youtube.com/channel/UC1aQpzmR_Nf0C7ElGiySLQg
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
AO: [pipewire] 48000Hz stereo 2ch floatp
AV: 00:00:31 / 00:05:37 (9%) A-V:  0.000 Cache: 305s/12MB

  • Example (without extension)
$ mpv https://www.youtube.com/watch?v=6YF0XNMpyoM
 (+) Video --vid=1 (*) (vp9 1920x1080 23.976fps)
 (+) Audio --aid=1 --alang=eng (*) (opus 2ch 48000Hz)
File tags:
 Uploader: Jonathan Antoine
 Channel_URL: https://www.youtube.com/channel/UC1aQpzmR_Nf0C7ElGiySLQg
[vo/gpu/wayland] GNOME's wayland compositor lacks support for the idle inhibit protocol. This means the screen can blank during playback.
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [gpu] 1920x1080 yuv420p
AV: 00:00:03 / 00:05:37 (1%) A-V:  0.000 Cache: 63s/28MB

Issue when fetching segments

While testing my setup on this video, the following error is printed to the terminal:

[2023-07-12T21:47:12Z ERROR mpv_sponsorblock::client::worker] Failed to get segments: error decoding response body: missing field `hash` at line 1 column 675

I also tested this on other videos, and they gave the same error.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.