CastSponsorSkip seeks past YouTube sponsorships on your local Cast devices
Skip YouTube sponsorships (and sometimes ads) on all local Google Cast devices.
At a glance
- What is it?
- CastSponsorSkip is a Go program that watches Google Cast devices on the LAN, fetches sponsored segments from the SponsorBlock API, seeks to the end of each one as playback reaches it, and presses skip on skippable ads, with host networking as the one installation requirement that is not optional.
- Who is it for?
- CastSponsorSkip suits someone whose television is a Google Cast device on their own network and who watches YouTube there enough to care about the sponsor segments. It does not suit someone watching on a phone, a smart TV that is not a Cast device, or a streamer that does not publish a SponsorBlock database, and it cannot skip an ad unless the ad offers a skip button.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day ago.
- What is it written in?
- Mainly Go, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.
Editorial analysis
It watches the LAN and seeks when the segment starts
CastSponsorSkip is a Go program that skips sponsored YouTube content and skippable ads on all local Google Cast devices, using the SponsorBlock API. The loop is simple. The program watches for Google Cast devices on the LAN. When a device starts playing a YouTube video, the sponsored segments are fetched from the SponsorBlock API. When playback reaches a sponsored segment, the program quickly seeks to the end of that segment.
That is a different approach from a browser extension, and the difference is where the value sits. A browser extension acts on the tab you are watching in. This acts on the television in the other room, which is the case that extensions cannot reach and that most people actually care about.
The project says it was inspired by sponsorblockcast, but was written from scratch to reduce memory and CPU usage and to work around some of that project's problems, with a section in the README comparing the two. It is not a fork with a few patches, so the differences are design decisions rather than accumulated fixes.
Ad skipping is a separate mechanism from segment skipping
Sponsored segments and advertisements are handled by two different mechanisms, and the distinction is worth understanding before you judge the results.
The segment path is the deterministic one. The program knows in advance where the sponsored parts of a video are, because the SponsorBlock API returns them, so it can seek precisely to the end of a segment when playback reaches it. Nothing has to be detected on screen and nothing has to be pressed.
The advertisement path is reactive. The program looks for skippable YouTube ads and automatically hits the skip button when it becomes available. An ad that offers no skip button cannot be skipped this way, and an ad that the platform serves through a mechanism the program does not recognise is left alone.
The project is careful in its wording, saying it skips sponsored content and skippable ads, and sometimes ads in the repository description. That qualifier is the honest summary of the second path, and it is the reason you should not expect this to remove every ad from a Cast session.
Host networking is the one requirement you cannot skip
CastSponsorSkip has to discover Cast devices on the local network, and that discovery is a network-level operation. The installation instructions are emphatic about it: you must use the host network as shown, for the command line and for the example docker-compose file, and the commands are to be run as root or as a member of the docker group.
docker run --network=host --name=castsponsorskip ghcr.io/gabe565/castsponsorskipWith Docker Compose the same constraint applies, and the repository ships a docker-compose.yaml file you can use directly:
docker compose up -dThe Kubernetes section makes the same point in its own terms. The program needs no Service and no Ingress, so a single Deployment is enough, but hostNetwork must be enabled for device discovery to work, and a Helm chart is published to make that deployment simpler.
This is the one part of the setup where people get stuck. A container on a bridge network can talk to the internet but cannot see the multicast and broadcast traffic the Cast protocol relies on, so the container discovers nothing and appears to do nothing at all.
Nine ways to install, one mechanism
The distribution list is unusually long, and it reflects the audience.
Docker and Docker Compose are the primary path. A Home Assistant add-on is provided by other maintainers, with installation instructions in the alexbelgium hassio-addons repository. For Linux packages there is an APT repository for Ubuntu and Debian and an RPM repository for CentOS and RHEL, each with its own package name, castsponsorskip. The APT route adds a repository line and then installs:
sudo apt install castsponsorskipArch users install the castsponsorskip-bin package from the AUR with whatever helper they use, and macOS and Linux users can install from a Homebrew tap:
brew install gabe565/tap/castsponsorskipFinally, the manual route is to download the latest release binary for your system and architecture and run it.
Once installed, the program runs from a terminal or as a service. On systemd the unit is enabled and started directly:
systemctl enable --now castsponsorskipand on Homebrew the equivalent is the brew services command, which the README links to the homebrew-services project for details.
Three configuration sources and one naming convention
CastSponsorSkip can be configured with environment variables, command-line flags, or a config file, and the README states that all flags can be set with envs. The convention for deriving an env name from a flag is worth memorising, because it is the only way to set a flag that is not in the short list: capitalise all characters, replace a hyphen with an underscore character, and prefix the result with CSS_. The worked example given is that the flag --paused-interval=1m becomes CSS_PAUSED_INTERVAL=1m.
The dependency list shows how the three sources are merged. The configuration library koanf is present with providers for yaml files, environment variables, pflag, and Go structs, which is the mechanism behind a single set of values coming from a file, from the shell and from the command line at once.
Two of the most useful envs are documented in the table. CSS_DISCOVER_INTERVAL sets the interval to restart the DNS discovery client and defaults to 5m, and CSS_PAUSED_INTERVAL sets the time to wait between each poll of the Cast device status while paused, defaulting to 1m. CSS_PLAYING_INTERVAL covers the same poll while a device is playing. The full flag reference and the full env reference live in the docs directory of the repository.
Polling intervals decide how responsive it is
The three intervals describe three different clocks, and reading them together tells you how the program behaves in practice.
The discovery interval controls how often the DNS discovery client is restarted, and it defaults to 5 minutes. That is a network-level operation, since the addresses of Cast devices on the LAN are found by discovery rather than by a fixed list, and restarting it periodically is what lets a device that changed address or came back after being unplugged be found again. Five minutes is slow by human standards and is the reason a newly plugged in television may take a while to be noticed.
The status poll intervals are per device and much shorter. The paused interval, one minute by default, is how often the program asks a device that is not playing what it is doing, and the playing interval is the same question for a device that is playing. A device that is playing is polled more often, which is what allows a segment to be caught as it starts rather than after it has already played.
The cost model follows the project stated goal of lower memory and CPU use than the project it was inspired by: most devices on a network are idle, and the paused poll is the cheap one.
Where CastSponsorSkip is the wrong tool
The scope is narrow by design, and the boundaries are worth stating plainly.
It only acts on Google Cast devices that are on your local network. A video watched on a phone, a tablet, a laptop browser or a smart TV that is not a Cast device is untouched, and the project does not attempt to be a browser extension. It is a television tool.
It also only helps where a sponsor database exists. The segments come from the SponsorBlock API, and a video with no entries there simply has nothing to skip, which is why the behaviour looks uneven across channels.
The advertisement path has the same limitation already noted, an ad is only skipped when the platform offers a skip button, and the project does not claim otherwise.
The final constraint is operational. Because discovery needs host networking, a deployment behind a router or in a cloud instance without a flat network will find nothing. The program is designed to sit on your LAN, next to the devices it controls, and the installation guides are consistent about that even when the packaging makes it look like a general service.
Licence, releases and the dependency set
The project is licensed under Apache-2.0, with the LICENSE file at the root of the repository. The release history is v0.8.3 on 2026-03-17, v0.8.2 on 2025-03-03 and v0.8.1 on 2024-12-15, and the last push to the repository was on 2026-10-20, so development continues between releases. The build badge, the Go Report Card badge and a Sonar Cloud quality gate badge are all wired into the README.
The module is gabe565.com/castsponsorskip and it requires Go 1.26.1. The dependency list is short and tells you where the work happens. The Cast protocol side is handled by a Chromecast library, the Google API client is there for the YouTube calls, koanf and its providers handle configuration, cobra and pflag provide the command line, a table renderer handles the terminal output, a JSON parser handles the API responses, and a logging helper provides the coloured output. The build itself is a GoReleaser configuration with a separate goreleaser Dockerfile for the container image.
The repository is a conventional Go project with cmd, internal and systemd directories, a Dockerfile, a docker-compose.yaml, a docs directory, a golangci configuration and a pre-commit configuration.
Editorial conclusion
CastSponsorSkip suits someone whose television is a Google Cast device on their own network and who watches YouTube there enough to care about the sponsor segments. It does not suit someone watching on a phone, a smart TV that is not a Cast device, or a streamer that does not publish a SponsorBlock database, and it cannot skip an ad unless the ad offers a skip button. Before you install it, check three things: that you can run it with host networking, since device discovery depends on it, that the Cast device is on the same LAN, and that you understand the polling intervals, because CSS_DISCOVER_INTERVAL, CSS_PAUSED_INTERVAL and CSS_PLAYING_INTERVAL decide how quickly it reacts. The licence is Apache-2.0, the latest release is v0.8.3 from 2026-03-17, and the last push was on 2026-10-20.
Frequently asked questions
How do I install CastSponsorSkip with Docker?
Run `docker run --network=host --name=castsponsorskip ghcr.io/gabe565/castsponsorskip` as root or a member of the docker group. The host network is required, because device discovery on the LAN does not work from a bridge network, and the same applies to the docker compose file included in the repository.
How does CastSponsorSkip skip sponsored segments?
It watches for Google Cast devices on the LAN, and when one starts playing a YouTube video it fetches the sponsored segments from the SponsorBlock API. When playback reaches a segment, it quickly seeks to the end of that segment. Advertisements are handled separately, by hitting the skip button when it becomes available.
How do I set a CastSponsorSkip option with an environment variable?
Capitalise all characters of the flag, replace hyphens with underscores, and prefix with CSS_. So the flag `--paused-interval=1m` becomes `CSS_PAUSED_INTERVAL=1m`. All flags can be set this way, and values can also come from a config file or the command line.
Does CastSponsorSkip work on Kubernetes?
Yes, with a single Deployment, since no Service or Ingress is needed. hostNetwork must be enabled for device discovery to work, and a Helm chart is published to simplify the deployment.
Which devices does CastSponsorSkip support?
Local Google Cast devices on your network. It does not act on browsers, phones or non-Cast televisions, and it only skips YouTube advertisements that offer a skip button.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/gabe565-castsponsorskip)Was this useful?