Skip to content
/ cwitch Public

A CLI tool to watch Twitch live streams and videos with the help of mpv and yt-dlp.

License

Notifications You must be signed in to change notification settings

zefr0x/cwitch

Repository files navigation

cwitch

AUR votes

AUR version

A CLI tool for watching Twitch live streams and videos with the help of mpv and yt-dlp.

Features

  • Watch one or more video with the ID.
  • Play a live stream with the channel's ID.
  • List a channel's videos and choose one or more to watch in a playlist form.
  • Check for the status of a channels list from a file and show who is online and who is offline, then choose some live streams to play.
  • Select a media format (e.g. 1080p60, 480p, Audio_Only) for every live stream or video you want to watch.

Installation

AUR last modified

Using paru

paru -Sa cwitch

Using yay

yay -Sa cwitch

From github

pip install https://github.com/zefr0x/cwitch/archive/refs/tags/v0.3.0.zip

You might need to use pip3 or python3 -m pip instead of just pip

Usage

Use the --help or -h option to see the help menu.

cwitch -h

There are three subcommands c, s and v. Choose a subcommand and then you can use the -h option to see the help menu for the subcommand.

Creating a channels list

Create a file in you home directory with the path: .config/cwitch/channels.ini if there wasn't . Then add your channels list as following:

[Display Name]
id=channel_id

[Display Name]
id=channel_id

Change the configurations

Create a file on you home directory with the path: .config/cwitch/config.ini if there wasn't. Then overwrite an existing option, like this:

[playlist_fetching]
# The default number of fetched videos when listing a channel's videos.
max_videos_count=5

There are no option other than this for now.

For both config and channels list there is an example file in the repo.

Todo

  • Display videos comments as subtitles.
  • Contact with yt-dlp if possible to improve the progress bar.
  • Support bash and zsh tap completions
  • Integrate some mpv userscript to easily controle the video quality on the fly, like mpv-youtube-quality.
  • Add some configurations for mpv caching and the streaming process.