Command line Chromecast Player CATT gets support for subtitles and website casting

CATTOr a command-line tool called Cast All The Things, which can send videos and local files from many online sources to your Chromecast, has been updated to version 0.7.0, and has received 2 major new features: with local or A cast of remote captions, cast the website to Chromecast.
With these new features, CATT’s feature list will become very impressive:

  • Cast videos to your Chromecast from all websites Supported by youtube-dl. This includes YouTube, 8tracks, BaiduVideo, BBC, BuzzFeed, CCTV, DailyMotion, Discovery, Dropbox, Flickr, Fox, Gyfcat, Imgur, Jamendo, LiveLeak, Mixcloud, MTV, NBC, PBS and more than 1,000 other websites
  • Post local files, such as videos, photos and music. Please note that Cat can only serve local files supported locally by Chromecast
  • Use local or remote subtitles
  • Cast any website to your Chromecast
  • Add video to the queue
  • Control Chromecast devices (pause, stop, rewind, skip, search, volume control)
  • Save and restore Chromecast state

Related: Use Gnomecast to cast video to Chromecast on Linux.
The new CATT “broadcasting site” feature is similar to the Google Chrome browser’s “publish tab” feature, so the sites served using CATT are dynamic, not just a simple static view of the site. This feature is great for quickly sending websites to be viewed on your Chromecast or for automation (can be used in scripts, for example, to create a custom Chromecast dashboard and automatically send it to Chromecast when the device is idle). However, if you need to interact with the website you serve, it’s useless, because you can’t use CATT to do this (it can control the video being served, but not the website).
As for the new subtitle function, CATT will automatically convert the subtitles to WEBVTT format, so there is no need to convert in advance. Since CATT does not transcode any videos, Chromecast must still directly support these videos. CATT0.7.0 version also fixed some errors:

  • Use netifaces instead of get_local_ip sockets
  • Also guess the content type of the remote file
  • Specify the correct mimic type when casting local files

Quick Catt Guide

To cast YouTube videos to Chromecast using CATT, use:

catt cast ""

Similarly, you can cast videos from any website Supported Created by youtube-dl (used internally by CATT). If you have multiple Chromecast devices, you may need to specify which device to cast the video to. For this, use:

catt -d Ultra cast ""

Where Ultra Is the name of the Chromecast device on which you want to stream the video, and the YouTube URL is the video you want to play on Chromecast.
You can also use the CATT profile to select the default device. See how to do Here.CATT automatically selects the subtitle file with the same name as the video, and they are located in the same folder. If you want to specify subtitles manually, use:

catt cast -s ./ ./video.mp4

Replace With your subtitle file and video.mp4 With the video you want to cast. CATT will instantly convert the subtitles to WEBVTT, but it will not convert the video, so make sure you only cast the video directly supported by the Chromecast device, otherwise it will not work properly.
To cast (render) a website on Chromecast using CATT, run:

catt cast_site

Replace the Linux Uprising URL with the URL of the website you want to cast to Chromecast.
CATT can also be used to control Chromecast devices (play, pause, search, etc.), save and restore Chromecast status, etc. See catt --help A complete list of options:

$ catt --help
Usage: catt [OPTIONS] COMMAND [ARGS]...

  --delete-cache     Empty the Chromecast discovery cache.
  -d, --device NAME  Select Chromecast device.
  --help             Show this message and exit.

  add           Add a video to the queue.
  cast          Send a video to a Chromecast for playing.
  cast_site     Cast any webpage to a Chromecast.
  ffwd          Fastforward a video by TIME duration.
  info          Show complete information about the currently-playing video.
  pause         Pause a video.
  play          Resume a video after it has been paused.
  restore       Return Chromecast to saved state.
  rewind        Rewind a video by TIME duration.
  save          Save the current state of the Chromecast for later use.
  scan          Scan the local network and show all Chromecasts and their IPs.
  seek          Seek the video to TIME position.
  skip          Skip to next video in queue (if any).
  status        Show some information about the currently-playing video.
  stop          Stop playing.
  volume        Set the volume to LVL [0-100].
  volumedown    Turn down volume by a DELTA increment.
  volumeup      Turn up volume by a DELTA increment.
  write_config  Write the name of default Chromecast device to config file.

How to install CATT in Linux (full content release)

1. Add ~/.local/bin Give you PATH (If not already added). Simultaneous export PYTHONPATH Such as /usr/lib/python3/dist-packages:$PYTHONPATH Avoid letting other applications get Python modules from it ~/.local/lib.
You can do this manually (and source .bashrc / .zshrc) Or run the following command to complete all these operations:

  • For Bash:
echo "export PATH="$PATH:$HOME/.local/bin"" >> ~/.bashrc
echo "export PYTHONPATH="/usr/lib/python3/dist-packages:$PYTHONPATH"" >> ~/.bashrc
. ~/.bashrc
  • For Zsh:
echo "export PATH="$PATH:$HOME/.local/bin"" >> ~/.zshrc
echo "export PYTHONPATH="/usr/lib/python3/dist-packages:$PYTHONPATH"" >> ~/.zshrc
. ~/.zshrc

2. Install Python3 PIP and Python3 Setuptools
In Debian/Ubuntu/Linux Mint, use:

sudo apt install python3-pip python3-setuptools

3. Use Python3 PIP to install CATT:

pip3 install --user catt

If you encounter permission errors when attempting to install CATT using this command, you may have previously used PIP to install the package as root. This is not recommended, but in this case, you can force the installation of CATT by using sudo to run the above install command. To download the CATT source, please refer to This one page.