Back

Abuse My Nipples Dot Biz

Streamlink Tutorial

We live in a day and age where watching people play video games on Twitch has all but replaced having real friends, which is somewhat unfortunate given just how much garbage overhead a streaming site like that pushes through to your computer. Simply put, watching Twitch without Streamlink is like being in space without a space suit or getting a blowjob from a t-rex: painful and full of advertisements. This tutorial will walk you through setting up a means to watch Twitch without actually having to deal with the site itself. The end result will be a much higher-quality stream that you will have much more control over, since it will be piped directly to your media player rather than run through your browser.

This is easy as hell.

Step #1: What You'll Need

REQUIRED

OPTIONAL

As you can see, there's really not a whole lot you need for this. Given that you should already have VLC, the entire setup process will actually take about a minute from start to finish. The only step that will take any appreciable amount of time is the optional final one, wherein we will create a script to act as a front-end for Streamlink.

Step #2: Installation & Configuration

Installation is easy. Just run the installer and... y'know, install it. I couldn't make this part any simpler if I gave it an orange spray tan and made it the president. Once the installation is complete, we need to edit the configuration file located in C:/Users/(You!)/Appdata/Roaming/Streamlink, which the installation process should prompt you to do and open up for you.

Once inside, just add the following line:

player="C:\Program Files (x86)\VLC\vlc.exe" --fullscreen

(Obviously, if you have VLC installed somewhere than the default folder, just modify the above to match.)

Step #3: Creating A GUI

Streamlink is not a complicated program - it's nothing more than a command-line utility that pipes a stream directly to a specified media player whilst avoiding any unnecessary overhead in between. The key phrase there is "command-line" - it doesn't actually have a front end to work with. We could just type in the necessary command every time we want to watch a stream, but that's a pain in the ass and we're lazy so we're just going to make a front-end out of a batch file.

Open up Notepad++, paste the following content into a new file, and then save it as a .bat file.

@echo off

cd /d "C:\Users\(You!)\AppData\Local\Streamlink\bin"

set /p derp=Enter name of stream:

Streamlink twitch.tv/%derp% best --twitch-disable-ads

(As with the VLC path above, modify the directory as needed if you installed Streamlink elsewhere.)

Running the resulting batch file gives us basic functionality: we enter the name of the stream and then it opens up while Twitch ads go fuck themselves in a dark basement with sandpaper-covered dildos. Note that the quality argument is required - "best" is always available and gives you the best quality, while the availability of other settings is entirely dependent on how much Twitch likes the guy you're watching. But unless you're reading this from some hillbilly shack in the middle of West Virginia, your internet is probably good enough to just run with "best".

Now that we have it working (go ahead and give it a test run if you'd like), let's add some more fucntionality on to our batch file. First, we'll add a loop so that if the stream dies, it'll try to reconnect automatically.

@echo off

cd /d "C:\Users\(You!)\AppData\Local\Streamlink\bin"

set /p derp=Enter name of stream:

:loop
Streamlink twitch.tv/%derp% best --twitch-disable-ads
timeout 10
goto loop

The timeout tells the script to wait ten seconds (you can speed it up by hitting any key) so you don't just spam the source non-stop. The :loop is an anchor; somewhere in the script that we can to point to.

Next, we'll add in an option to open up chat for us in a popout window, so as to avoid as much Twitch bullshit as humanly possible. Note that this will also count you as a viewer in the stream if that sort of thing actually matters to you.

@echo off

cd /d "C:\Users\(You!)\AppData\Local\Streamlink\bin"

set /p derp=Enter name of stream:

choice /m "Open up chat?"
if errorlevel 2 goto loop
start "" https://www.twitch.tv/%derp%/chat?popout=

:loop
Streamlink twitch.tv/%derp% best --twitch-disable-ads
timeout 10
goto loop

"Choice" is a weird function. I generally prefer to avoid using it if at all possible since you have to work around a response of "no" and trying to explain "errorlevel" to people is like fucking a band saw. The only real advantage is that it doesn't accept a non-binary response and will just keep beeping at you until you answer Y or N; this gives us a simpler and ultimately shorter script than if you were to go with open user input and then account for said user for some reason responding to a yes/no question with "suck my dick, fag".

Sorry, got a little sidetracked there. What the above script is doing is pretty simple: if the user answers "no" to opening chat, this sets "errorlevel" to 2 and we jump to the loop anchor. Otherwise, we move on and open up a chat window first.

Finally... let's add some favorites.

@echo off

cd /d "C:\Users\(You!)\AppData\Local\Streamlink\bin"

echo.
echo.
echo. Streamlink MENU
echo. -----------------
echo.
echo. 0: Games Done Quick
echo. 1: Nowea
echo. 2: Mishrak
echo. 3: Leadbeer
echo. 4: Fathlo
echo. 5: Kolthor The Barbarian
echo. 6: Coherent Noise
echo.

set /p derp=Enter name of stream:

if /i %derp% equ 0 set derp=gamesdonequick& goto loop
if /i %derp% equ 1 set derp=nowea& goto chat
if /i %derp% equ 2 set derp=mishrak109& goto chat
if /i %derp% equ 3 set derp=leadbeer& goto chat
if /i %derp% equ 4 set derp=Fathlo23& goto chat
if /i %derp% equ 5 set derp=Kolthor_TheBarbarian& goto chat
if /i %derp% equ 6 set derp=coherent_noise& goto chat

choice /m "Open up chat?"
if errorlevel 2 goto loop

:chat
start "" https://www.twitch.tv/%derp%/chat?popout=

:loop
Streamlink twitch.tv/%derp% best --twitch-disable-ads
timeout 10
goto loop

So now it's a bit longer. The "echo" bits are all for show: they're just there to remind us what our options are and to look pretty. The actual shortcuts are the "if" statements that are inserted before the choice to open up chat. We've added a :chat anchor so that these shortcuts can skip the question and just go ahead and open up chat for us. Conversely, for GDQ we just skip to opening the stream since GDQ chat is cancer and nobody in their right mind would ever want to look at it.

Step #4: Wrapping It All Up

And that's about it. You've probably noticed by now that the command window is tied to anything that it opens up (i.e. VLC) and that killing it will also kill VLC. If you'd like, you can give the window a custom title and icon by creating a shortcut to the batch file; it will run with whatever icon is assigned to the shortcut with the name given to the shortcut.

Until next time, everyone.

btb@abusemynipples.biz