Qwitch Icon

Qwitch

Stream Twitch in Quicktime!


Qwitch is a CLI which allows you to watch streams and videos from Twitch directly in Quicktime on macOS.

PyPI Logo

Get it on

PyPI.org

Demo picture on computer.

Watch livestreams and videos!

Qwitch allows you to know which of the streamers you follow are live to watch their streams. You can also watch their videos, and all that with the video quality of your choice!


Avoid the resource-heavy Twitch.tv!

Because of the technology it uses, Twitch.tv uses a lot of resources on your computer. Qwitch exists to avoid using this website, and still enjoy your favourite streams!


And... It's open-source!

Qwitch is open-source and free, it'll stay this way forever. This means you can read Qwitch's code to check that it doesn't collect any of your data.

You can contact us at:

Extra demo picture on computer.

FAQ

How to install Qwitch?

To install Qwitch you will need to have installed Python >= 3.8 and the XCode Command Line Tools.

What's beautiful is that you can get these two requirement installed with only one command since XCode Command Line Tools will also install a compatible version of python3. All you need to do is run the following command

                        
                            xcode-select --install
                        
                    

This will prompt you to install XCode Command Line Tools on your environment. Now you should be able to run python and pip commands.

Qwitch is available via pip only. Simply run the following command to install it:

                        
                            pip3 install --user qwitch
                        
                    

Once that's done, you'll be able to use Qwitch directly in the terminal. On the first use, the CLI will ask you two things:

  • The value of Twitch's auth-token cookie
  • For you to allow Qwitch to have access to a few things on your Twitch account

First, open your favorite web browser and log into your Twitch account. Then you'll need the value of the auth-token cookie. To grab it:

  1. Right-click anywhere on Twitch's webpage
  2. Click on "Inspect Element" or "Inspect"
  3. Navigate to the "Storage" or "Application" tab on the little window that opened
  4. Expand the "Cookies" folder
  5. Click on "twitch.tv"
  6. Search for the "auth-token" entry and copy its value (a 30-character string containing numbers and letters)

Alternatively, you can use a browser extension like cookies.txt for Firefox. This will generate a text file in which you'll need to search for the "auth-token" entry.

Well done! You'll need this to set up Qwitch.

Now you can use Qwitch in the terminal and it will ask you for this token in due time. It will also prompt you to give it access to a few information from your Twitch account. To do so it will automatically open your web browser, you'll need to accept, and then copy and paste the URL of the page back to Qwitch.

Are there configurable options?

As a matter of fact, yes. Qwitch generates a config file to store the information it uses, and there are options you can configure in there. To know more about those, please visit Qwitch's GitHub repository.

Which streamers I follow are live now?

This is rather simple, simply enter the command below:

                        
                            qwitch -s
                        
                    

The option -s is short for --streams. Qwitch will get the list of streamers you follow and display which ones are live now, with information about their stream.

How do I list the streamers I follow and their channel name?

This is rather simple, simply enter the command below:

                        
                            qwitch -f
                        
                    

The option -f is short for --follows. Qwitch will get the list of streamers you follow and display information about their channel. Most important information is their channel name displayed in red, which Qwitch needs when you search for their videos or streams.

How do I watch this streamer's livestream?

Say your favourite streamer is live and you want to watch their stream. Then all you'll need is the name of their channel. For example, if I want to watch Critical Role live, and I know the name of their channel is criticalrole then I use the following command to launch their livestream:

                        
                            qwitch -s criticalrole
                        
                    

To know your streamer's channel name either use qwitch -s, if they are live then the channel name will be written in red. Otherwise, look at Twitch's link to their channel. In Critical Role's example it would be https://twitch.tv/criticalrole so their channel name is criticalrole.

Alternatively you can list the streamers you follow with qwitch -f and the channel names will be displayed in red.

How do I watch this streamer's last video?

You can watch a streamer's last video with the -l option (short for --last), like so:

                        
                            qwitch -l channelname
                        
                    

and replacing channelname by the streamer's actual channel name.

How do I list a streamer's last 20 videos?

You can watch a streamer's last video with the -V option (or --Videos), like so:

                        
                            qwitch -V channelname
                        
                    

and replacing channelname by the streamer's actual channel name.

This will list the videos one by one, and ask you each time if you want to watch the video. Simply enter y, for yes, or n, for no, and hit ⏎ Enter.

How do I search for, and watch a streamer's video?

To search and watch one of the streamer's last 20 videos, you can use the -v (short for --vod) either with a video ID or by using keywords from the video's title.

A video ID can be obtained from the video's twitch.tv link (e.g. https://twitch.tv/videos/524717693 the video ID is 524717693), or after using qwitch -V channelname to list channelname's last 20 videos. Once the video ID is obtained you can watch it with:

                        
                            qwitch -v <VIDEO_ID>
                        
                    

where <VIDEO_ID> has to be replaced with the actual video ID (e.g. 524717693).

To search for a video with a keyword(s), specify the keyword in quotation marks followed by the channel name. Like so:

                        
                            qwitch -v "some keywords" channelname
                        
                    

This will search for a video with the title containing exactly some keywords in channelname's last 20 videos. The keywords you use have to be an exact match (up to letter case) because Twitch does not have any search engine to search for videos.

How do I adjust the video quality?

You can adjust a video's playback quality by telling Qwitch which video quality you want it to use. This is done by passing a video quality tag in the command (i.e. one of worst, 160p, 360p, 480p, 720p, 1080p or best) like so:

                        
                            qwitch -s criticalrole 480p
                        
                    

This works with any qwitch command that can play a video.

By default qwitch will use the best available quality. However, you can override this by setting the default-stream option in Qwitch's config file.