Automatically skip sponsor segments in YouTube videos playing on Chromecast
HEAD Latest release released


Skip sponsor segments in YouTube videos playing on a Chromecast.

This project is inspired by CastBlock by stephen304. It was rewritten in Crystal and uses the HTTP API exposed by go-chromecast to be less CPU intensive.

The impact of CastBlock on the CPU should be almost zero, and only a few dozen of Mo on the memory.



docker pull erdnaxeli/castblock:latest
docker run --rm --network host erdnaxeli/castblock

The docker image supports amd64, arm and arm64 architectures. In particular it should run on all raspberry pi. If not, please open an issue :)

The amd64 and arm64 images are based on Alpine and weigh only 20Mo, but due to a missing cross compilation target the arm images use Debian and weights 47Mo.

From source

You need to install go-chromecast first, and to make it available in your PATH. Then you need a working Crystal environment and run shards build --release. The binary is in ./bin/castblock.


Run CastBlock in the same network as the Chromecast.

It will detect all Chromecast, watch their activity and skip any sponsor segment using the SponsorBlock API.

New devices are detected every 30s. Segments shorter that 5s cannot be skipped. The last 20 videos' segments are cached to limit the number on queries on SponsorBlock.

If you have any issue, please run CastBlock with the --debug flag, try to reproduce your problem and past the output in the issue. You can use the flag with docker too like this: docker run --rm --network host erdnaxeli/castblock --debug.


  1. Fork it (
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request


  github: erdnaxeli/castblock
License MIT
Crystal 1.0.0


Dependencies 1

  • clip ~>0.2
    {'github' => 'erdnaxeli/clip', 'version' => '~>0.2'}

Development Dependencies 1

  • ameba
    {'github' => 'crystal-ameba/ameba'}

Dependents 0

Last synced .
search fire star recently