Twitch.tv to VLC

by Rando the Random

Version 1 (March 29, 2022)

Download (5 downloads)

Opens any given twitch stream.

Requirements:
1. Termux & Termux:Tasker (Install from F-Droid, as the Google Play Store version is outdated)
2. Streamlink (pkg install python clang && pip install Streamlink)
3. VLC on Android


In `/.termux/tasker`, create the following file `run_streamlink.sh`:

```
#!/data/data/com.termux/files/usr/bin/bash

streamlink http://twitch.tv/$1 $2 --player-external-http --player-external-http-port 40129
```

Then create `stop_streamlink.sh` in the same directory:

```
#!/data/data/com.termux/files/usr/bin/bash

kill -9 $(ps -eo pid,args | grep twitch | grep python | awk '{print $1}')
```

See the Termux documentation for proper permissions on these scripts.

There is a 5 seconds delay to accommodate for Streamlink starting up the HTTP server for VLC to connect to. Feel free to adjust depending on how good your internet is.