Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

[Support] SponsorBlockCast

Featured Replies

Hi everyone!

 

This thread can be used for support for the SponsorBlockCast template of nichiobi's SponsorBlockCast POSIX script.

 

Nichiobi's github repo can be found here: https://github.com/nichobi/sponsorblockcast

Full credit to Nichiobi for this awesome script!

 

SponsorBlockCast is an awesome script that monitors network traffic looking for Chromecast devices playing Youtube videos. If detected, it will skip any sponsor segments (segments are crowdsourced and data on sponsor segments may not always be available) in the video. Additionally, depending on the device, this script will attempt to skip any skipable Youtube ads.

 

I do recommend obtaining a Youtube API key to improve the scripts ability to detect playing media.

 

I've tested this container using a Chromecast Ultra and Nvidia Shield (casting) and it works great. Additionally, when using the Youtube app on the Nvidia Shield, the script is able to skip the sponsor segments.

 

** This container must run in host mode **

 

Final note: If there is a content creator that provides you with quality content that you get value from, please do consider supporting them in other ways (if you aren't already).

 

Please feel free to raise any issues with this template here and I will do my best to assist.

How do you get it to skip the ads?

The sponsor and self promotion part works as it should for me.

 

But the ads keep showing up. This is what it shows in the log:

 

Skipping skippable ad

error: unable to skip current ad: No ad detected, there is nothing to skip
Skipping skippable ad
error: unable to skip current ad: No ad detected, there is nothing to skip
Skipping skippable ad
error: unable to skip current ad: No ad detected, there is nothing to skip
Skipping skippable ad
error: unable to skip current ad: No ad detected, there is nothing to skip

 

 

I have the Chromecast with Google TV device.

Edit: Tried with a Chromecast Gen2 also, same result.

Edited by PeterHS

7 hours ago, PeterHS said:

How do you get it to skip the ads?

The sponsor and self promotion part works as it should for me.

 

But the ads keep showing up. This is what it shows in the log:

 

Skipping skippable ad

error: unable to skip current ad: No ad detected, there is nothing to skip
Skipping skippable ad
error: unable to skip current ad: No ad detected, there is nothing to skip
Skipping skippable ad
error: unable to skip current ad: No ad detected, there is nothing to skip
Skipping skippable ad
error: unable to skip current ad: No ad detected, there is nothing to skip

 

 

I have the Chromecast with Google TV device.

Edit: Tried with a Chromecast Gen2 also, same result.

 

Did you create a youtube API key? Also this relies on a database of submissions for when ads take place so it is possible you are watching things that are obscure enough that no one has tagged them.

Yes I created a YouTube Data API v3 key.

The database submissions work for sponsors or self promotion. It's the randomized Youtube ads that I can't get rid off.

 

  • Author
On 3/20/2023 at 9:34 AM, PeterHS said:

Yes I created a YouTube Data API v3 key.

The database submissions work for sponsors or self promotion. It's the randomized Youtube ads that I can't get rid off.

 

 

Hi,

 

I'm also noting that there are some youtube ads that don't get skipped. Here's a summary of the expected behaviour based on my understanding of this container:

  • Sponsored Segments (content creator delivered ad)
    • Will skip IF crowd sourced database from sponsorblock service has been updated with details about the sponsor segment.
  • Skippable Youtube Ads (Skip button displayed after 6 seconds of advertisement)
    • Will skip when the button is displayed
  • Non-skippable Youtube Ads (no skip button is displayed and you must watch the whole ad)
    • No action can be taken and the full ad will be displayed and watched

 

I do highly recommend getting and implementing an API key - it did increase the detection of which video & ad types were playing.

 

I'm noting some inconsistent behaviour of the 2nd scenario, where the skippable ad should skip. I found that another github user had forked the repo and made some changes recently aimed at improving the skipping of skippable ads. I currently have this update forked in my repo and am conducting testing of that version as well. If it proves to be more reliable, I'll update the template (the forked repo hasn't rebuilt the container as far as I could tell, so I'll need to build and distribute it).

If I update the template, I'll post another reply here & update credits to recognise the additional developer.

Edited by warieon

That sounds interesting. Looking forward to hear the results.

 

One question, I noticed my idle on Unraid went from 1-2% to 6-10% when I run this docker. Even if the chromecast devices are "sleeping". It seems a bit excessive to have that kind of load on the server when there is nothing useful happening. Is there perhaps a way of polling the devices to see if something is casting? And if not... well... don't do anything.

 

Trying to be efficient, save electricity and all that.

  • Author

Interesting observation - I'll keep an eye on CPU usage as well.

i have high CPU usage to after the Plugin runs for 40min then the CPU usage go upp to solwe the problem i have set a user script that restart the plugin every 30min.. this needs to be solwed 

 

  • Author

Hi @Duckface21,

I agree - I've also noted that the script appears to stop working (at least for detecting skippable ads) after a period of time.

 

The updated version of the script doesn't appear to improve the CPU usage.

 

I'm open to forking the repo and attempting to improve the script for CPU usage if there are others who are able to provide assistance (the scripting language is not familiar to me)

  • 1 month later...
  • Author

Hi @PeterHS, @Duckface21, @TheLaughingMan,

 

I've not had any joy with modifying the script in this container - unfortunately, my coding skills are not sufficient to be able to do this. As a result I took down the template for a while.

 

Recently, like Duckface, I have created a User Script ("docker restart sponsorblockcast") and set it to run hourly to restart the container.

Unlike Duckface, I was only encountering the issue after 24hrs. I've set my script to run hourly.

 

While not ideal, it is a pragmatic middle ground that I can accept and am happy to recommend to others to try. For me, the benefits of the container/script (especially when coupled with a Youtube Premium subscription) is fantastic. So I personally, am willing to accept a script restarting a container every hour.

 

I've re-released the template, and updated it to include multiple recommendations to set up a scheduled user script for users who are still interested in using the script.

  • 9 months later...

Seems this was replaced by https://github.com/gabe565/CastSponsorSkipWish
Hoping someone makes a docker app for this

  • 2 weeks later...

This docker dont work enymore have tryed everyting not skipping enything on google TV! wonder if thy changed someting? it shold be good if someone make a unraid docker for  CastSponsorSkip as SponsorBlockCast is no more and the repacement  for it is CastSponsorSkip!!!

 

@warieon enyting you can confirm?

 

Edited by Duckface21

  • 2 weeks later...
  • Author

Hi @Duckface21,

Apologies for being AWOL for a while. Reviewing the github repo, it appears you are correct, sponsorblockcast has been deprecated.

I'll take a look into the CastSponsorSkip as soon as I get some time and migrate this template to that container / deprecate this template.

 

It should be worth noting that CastSponsorSkip is marked as beta in releases by the maintainer.

  • 3 months later...

Has anybody got CastSponsorSkip working as a docker/template yet?

  • 10 months later...

This is how I added it (even though I just did it so I still need to see that it works as expected):

Using Portainer

  1. Open portainer and open your local docker instance
  2. Click on stacks and then "add stack"
  3. Paste this docker compose definition:
    services:
      gabe565:
        image: ghcr.io/gabe565/castsponsorskip
        container_name: castsponsorskip
        network_mode: host
        restart: unless-stopped
        environment:
          - CSS_YOUTUBE_API_KEY=<API_KEY_HERE!>
    

     

  4. Click on "Deploy the stack"

Using Command Line

  1. Open a new unraid terminal window
  2. paste the following code:
    docker run --network=host --name=castsponsorskip --restart unless-stopped -e CSS_YOUTUBE_API_KEY=<API_KEY_HERE!> ghcr.io/gabe565/castsponsorskip
    

     

Some checks that I still need to verify

  • Does it actually works and blocks sponsored on local network chromcasts?
  • Does it work on devices connected through VPN with discovery?
  • Does it work on devices connected through VPN with CSS_DEVICES (and adding the VPN device IP)

 

Would love to get the answers to my questions. I'm starting to investigate this but if anyone wants to chime in, feel free 🙂 

Edited by thatkookooguy
wrong word. English is a second language for me :-)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.