SponsorBlock icon indicating copy to clipboard operation
SponsorBlock copied to clipboard

Expand integration beyond YouTube

Open bizxta opened this issue 4 years ago • 43 comments

Great idea around this. I'm using it mostly through YouTube Vanced. Has been so helpful!

As a possible avenues to expand, it would be nice to support more places. Besides other websites, I'm also talking about providing functionality similar to Netflix's skip functionalities. E.g. if segments are known for a TV show, and say the Kodi (or the up next) plugin is updated to use these, it can figure out when the show stops for real, and when starts for real, allowing for a huge amount of time saving when binging shows.

bizxta avatar Oct 15 '20 21:10 bizxta

I think this is probably only possible with a whitelisted set of sites due to how the videoID will have to be fetched in different ways for each website.

ajayyy avatar Oct 15 '20 21:10 ajayyy

That makes sense, what about places like Kodi or VLC among others? Where it's TV shows rather than services?

bizxta avatar Oct 15 '20 21:10 bizxta

This would be much harder as it would not be easy to get a consistent identifier from the file

ajayyy avatar Oct 17 '20 18:10 ajayyy

Also it would require pushing new permissions to users, anything involving another website should be a fork, not incorporated into this.

Joe-Dowd avatar Oct 18 '20 20:10 Joe-Dowd

Permissions aren't really an issue as they can be handled the same way as for Invidious

ajayyy avatar Oct 18 '20 20:10 ajayyy

Please add support for other video platforms: Bitchute, Rumble, Odysee, etc.

mat926 avatar Jan 10 '21 05:01 mat926

I try to watch stuff on odysee.com when my youtube subs are available there, but not having sponsorblock makes this a much worse experience sadly. Would be lovely to have support for more video sites.

swedneck avatar Feb 13 '21 19:02 swedneck

Facebook Watch support should also be added.

SameenAhnaf avatar Oct 06 '21 18:10 SameenAhnaf

Requesting support for Podcasts as in #994 And a reply to @ajayyy what exactly are you confused with Podcasts?

seniorm0ment avatar Oct 15 '21 13:10 seniorm0ment

Requesting support for PeerTube as per #993

seniorm0ment avatar Oct 15 '21 13:10 seniorm0ment

(Was originally commenting on #994) Came here looking for exactly this!

Great idea. Joe Rogan said most people actually listen to his podcasts. As opposed to watching them on Youtube (before Spotify..).

A lot of the content I consume personally, I do so on the go with Marco Arments wonderful Overcast app on iOS.

  • OP (#994) use a different subscription stack. I guess fragmentation of actual podcast player software is an issue when it comes to how to provide UI to contribute to the actual Sponsorblock database.

The POST to /api/skipSegments expects videoID: string. Perhaps this can simply be reused, say with a hash of the podcast episode URL and/or the file itself? Then service: string can be allowed to contain "file", or "url"?

I'm thinking a simple shell script using e.g. jq and httpie could be used to create the JSON and post the actual segment. Something along the lines of:

$ podsponsorblock.sh --startTime 1222 --endtime 1242 episode.mp3

   [source] episode.mp3
     [hash] ed7b87dd19f64d57565ae6a0202adfca..
[startTime] 1222.0
  [endTime] 1242.0
  [service] File

POSTing to Sponsorblock API...

{
  videoID: "ed7b87dd19f64d57565ae6a0202adfca..",
  userID: "54F1B31B-0A1C-4DA6-9EC5-BA9B988D69A3"
  userAgent: "podsponsorblock/0.0.1",
  service: "File",
  videoDuration: 123456.7,

  segments: [{ 
     segment: [1222.0, 1242.0],
     category: "sponsor",
     actionType: "skip"
  }]
}
  • Then in the case of trimming a release downloaded as a File, ffmpeg or similar tool can be used to delete the appropriate segments.
  • yt-dlp which both already supports Sponsorblock and other sites than YT, get a means to trim files/URLs.
  • As long as a central repository of segments and IDs of releases exist, and a means to contribute to it, the API can be put to use many more places. Perhaps Marco Arment also would be interested in adding support for Overcast.

I'm looking to build a simple automated downloads of content from various places, removal of sponsor segments, then convert to Apples audiobook format .m4b. This has great functionality including sync last-listened-to timestamp across devices, and great UI for actual listening.

haakonstorm avatar Oct 16 '21 10:10 haakonstorm

Excellent reply, thank you for your insight. Personally something I have been debating is how will the central repo apply? For example, YouTube is a centralized source. All IDs will lead to YouTube. PeerTube is federated, while not centralized, the identifications remain the same.

Podcasts can realistically be hosted from anywhere, furthermore there are many websites which pull the podcasts to centralized sources. This includes gPodder, iTunes, and others. While I would not be opposed to adding ID mappings for each popular service, is there a real way to get them to match if someone views something from gPodder, that only has a Sponsorblock entry on iTunes? Unfortunately that will be a downside if it can't be figured out. But I would still rather have it on one than none.

Furthermore your goal to build a downloads archive is exactly what I do and plan to do. I download everything from a site like gPodder. There is a service called PodGrab that I plan to try, it is essentially a self-hosted podcast downloader and manager (although this can be done with just yt-dlp and a file manager if desired, metadata is nice). Although I heard you can also self-host a gPodder server. That sounds more appealing but I can't find information on it. If that's what I think it is, then I think gPodder might be the way to go.

Either way, I'd really be interested in this. Sponsors on Podcasts are becoming increasingly bad, and make listening unejoyable at times and can take the listener out of the mood. Thank you for your comment.

seniorm0ment avatar Oct 16 '21 10:10 seniorm0ment

I have looked at a few online podcast players, and annoyingly, there doesn't seem to be a way to extract the podcast guid out of them.

Btw, on discord in the #new-site-discussion there are two threads discussing podcasts if you want to see some of the stuff I tried so far.

ajayyy avatar Oct 16 '21 14:10 ajayyy

OK moving to discord. FTR; perhaps the iTunes Search API's trackId can be used to ID. Most releases are on there.

haakonstorm avatar Oct 16 '21 15:10 haakonstorm

I'd be willing to discuss it, but I'm not going over to Discord. It's privacy invasive. I hope progress is updated here when more if determined.

Also gPodder has identifiers, my point was if someone downloaded something from gPodder, and someone else submitted times to the iTunes ID then, the gPodder person wouldn't have the Sponsorblock times. But yeah I think support wise gPodder is a must, and if you want a secondary then iTunes ID.

seniorm0ment avatar Oct 17 '21 08:10 seniorm0ment

It's on matrix too

ajayyy avatar Oct 17 '21 16:10 ajayyy

Support for Spotify can probably be added via ~~https://github.com/khanhas/spicetify-cli/wiki/Custom-Apps~~ https://github.com/khanhas/spicetify-cli/wiki/Extensions.

bizxta avatar Nov 30 '21 14:11 bizxta

As far as adding Odysee support, would this be possible with their URL scheme?

For example, Veritasium's latest video has this URL on Youtube: https://www.youtube.com/watch?v=ao2Jfm35XeE

But then this URL on Odysee: https://odysee.com/@veritasium:f/the-mystery-of-snowflakes:f

It is not immediately obvious how these two URLs correlate. However, the open source extension Watch on Odysee is still able to redirect me from Veritasium's Youtube video to the Odysee version. From a VERY quick glance, it looks like they call ${LBRY_API_HOST}/yt/resolve?${params} in yt.ts to check if the YT video has an Odysee equivalent, so it seems like it is possible to correlate the two with a LBRY API check -- although maybe not easy for SponsorBlock to parse if their database follows a URL-based scheme, which I believe it does.

I'm not intimately familiar with either of these codebases - does anyone know how difficult it would be to add this functionality in? Could it be possible to run that API check locally whenever an opted-in user goes to a YouTube video, and then add that Odysee video as a "secondary" URL in the SponsorBlock database?

neilunger avatar Dec 14 '21 00:12 neilunger

I think it would be easier to separate, as some videos have extra lbry content

ajayyy avatar Dec 14 '21 01:12 ajayyy

I believe (but could be wrong) that API will only return a value if the creator has set up LBRY's YouTube <-> Odysee automatic syncing, which will automatically upload any published YT video to Odysee. If so, I think the videos would only be different across platforms if the creator went out of their way to edit them once they were uploaded to Odysee. I don't know if editing is possible. I would guess most people who have gone out of their way to put extra LBRY-only content in their videos manually upload all of their videos. But regardless, that is a very valid concern, because if I'm wrong about any of that, that could definitely mess up some percentage of Odysee videos with SponsorBlock.

neilunger avatar Dec 14 '21 01:12 neilunger

We do have to deal with the case of edited YouTube videos surprisingly often

ajayyy avatar Dec 14 '21 02:12 ajayyy

Oh that's another edge case I didn't think about. If the YT video gets automatically published to Odysee, but then the YT vid gets edited, but the Odysee one doesn't... could cause issues

neilunger avatar Dec 14 '21 02:12 neilunger

Just a tourist here but maybe the ability to alias a url to another? Kinda like a dns CNAME. With so many creators I follow uploading the same video to multiple platforms it seems practical.

jackinloadup avatar Feb 23 '22 02:02 jackinloadup

Hey @ajayyy, just wanted to check about the Odysee support - I saw that server should have the necessary service tag but I cannot figure out whether it has been enabled/created for clientside?

Thx

xoores avatar Apr 16 '22 21:04 xoores

some podcasts insert arbitrary ads at time of download depending on whatever profile of your ip they have at the time regarding ids, it would be trivial to require complete downloads and then cryptographically hash the file

ghost avatar Apr 20 '22 01:04 ghost

LBRY

Domain name: N/A (decentralised, living on the blockchain) Content identifier format: Claim ID (arbitrary string)

Applicable categories:

  • all (video&audio)
  • sponsor, self promotion, exclusive access, interaction reminder, preview (other content)

Nebula

Domain name: nebula.app Content identifier format: Title in snake case

A single MCN non-interactive video platform.

Applicable categories: All except sponsor and interaction reminder, and additional category "out-of-the-network promotion" (Nebula is a single MCN platform), self promotion also covering in-network promotion

Floatplane

Domain name: floatplane.com Identifier format: ?

A tech-focussed subs-only video network.

Applicable categories: Self-promotion, chapter, exclusive access, preview, technical mishap, intro, highlight, outro

erkinalp avatar Jun 30 '22 19:06 erkinalp

For YT videos imported to Odysee - https://github.com/stefanmm/sponsorblock-odysee I was in touch with Odysee devs and this approach is the only way right now. They will contact me back when/if they improve YT integration. Feel free to test and improve my code, it is not the best in the world but it works.

stefanmm avatar Sep 28 '22 09:09 stefanmm

LBRY support would be amazing to see.

trymeouteh avatar Nov 29 '22 00:11 trymeouteh

+1 for rumble support.

Also here is a neat site to use with it. https://openrss.org

loopeey avatar Dec 17 '22 16:12 loopeey

Add VOYD, a Swedish website for sharing video and audio.

Content identifier: A number followed by title in snake case

Applicable categories: Self-promotion, chapter, exclusive access, preview, technical mishap, intro, highlight, outro.

erkinalp avatar Dec 17 '22 17:12 erkinalp