
Twitch.tv playlist parser
Source (link to git-repo or to original if based on someone elses unmodified work):
https://gist.github.com/stefansundin/c200324149bb00001fef5a252a120fc2
This playlist parser utilizes a proxy since v0.3.0 since Twitch completely shut down their old API. Please update to the latest version to make things work again.
For information about the proxy please go to https://github.com/stefansundin/media-resolver. You can run the proxy on your own computer but you'll have to edit the proxy_host variable in the code.
Install:
Put the file in the lua/playlist/ directory:
- On Windows: %APPDATA%\vlc\lua\playlist
- On Mac: $HOME/Library/Application Support/org.videolan.vlc/lua/playlist/
- On Linux: ~/.local/share/vlc/lua/playlist/
- On Linux (snap package): ~/snap/vlc/current/.local/share/vlc/lua/playlist/
To install the addon for all users, put the file here instead:
- On Windows: C:\Program Files\VideoLAN\VLC\lua\playlist
- On Mac: /Applications/VLC.app/Contents/MacOS/share/lua/playlist/
- On Linux: /usr/lib/vlc/lua/playlist/
- On Linux (snap package): /snap/vlc/current/usr/lib/vlc/lua/playlist/
On Linux, you can download and install with the following commands:
mkdir -p ~/.local/share/vlc/lua/playlist/
curl -o ~/.local/share/vlc/lua/playlist/twitch.lua https://gist.githubusercontent.com/stefansundin/c200324149bb00001fef5a252a120fc2/raw/twitch.lua
On Mac, you can download and install with the following commands:
mkdir -p "$HOME/Library/Application Support/org.videolan.vlc/lua/playlist/"
curl -o "$HOME/Library/Application Support/org.videolan.vlc/lua/playlist/twitch.lua" https://gist.githubusercontent.com/stefansundin/c200324149bb00001fef5a252a120fc2/raw/twitch.lua
Features:
- Load up a channel and watch live, e.g.: https://www.twitch.tv/speedgaming
- Load an archived video, e.g.: https://www.twitch.tv/videos/113837699
- Load a clip: https://clips.twitch.tv/AmazonianKnottyLapwingSwiftRage
OLD FEATURES THAT ARE CURRENTLY BROKEN BUT MAY COME BACK:
- Load a collection, e.g.: https://www.twitch.tv/videos/112628247?collection=k2Ou9QRbAhUMPw
- Load a game and get the top streams, e.g.: https://www.twitch.tv/directory/game/Minecraft
- Load a game's archived videos, e.g.: https://www.twitch.tv/directory/game/Minecraft/videos/all
- Load a community and get the top streams, e.g.: https://www.twitch.tv/communities/speedrunning
- Load a channel's most recent videos, e.g.: https://www.twitch.tv/speedgaming/videos/all
- Load a channel's collections, e.g.: https://www.twitch.tv/speedgaming/videos?filter=collections
- Load the homepage and get a list of featured streams: https://www.twitch.tv/
- Load the next page.
- Load a channel's clips, e.g.: https://www.twitch.tv/speedgaming/videos?filter=clips
- Load a game's clips, e.g.: https://www.twitch.tv/directory/game/Minecraft/clips
In order to load VODs with a timestamp in the url (e.g. ?t=1h10m10s), then you must also install the Twitch.tv extension from here: https://gist.githubusercontent.com/stefansundin/c200324149bb00001fef5a252a120fc2/raw/twitch-extension.lua
Note that this extension must be activated in the VLC menu each time that VLC is started!
If you like this addon, please rate in the top right corner of this page. If you have any issues, please report them in the comments below, or in the git repository. Thank you!
Enjoy!!
v0.3.1
Public release of new playlist parser that uses my proxy. Support for Twitch Clips was also added back. I may add new features to the proxy which will automatically work without the need for you to update the twitch.lua file. You can run the proxy on your own computer if you so desire (please see the code in twitch.lua for more information). ENJOY!
Ratings & Comments
42 Comments
past broadcast links does not works, when i tried to add it to vlc. it's say "Error: channel is not live" https://www.twitch.tv/xqc/videos?filter=archives
You are trying to load a URL that is in the "OLD FEATURES THAT ARE CURRENTLY BROKEN BUT MAY COME BACK" list. It currently interprets that the same as the channel URL so it is trying to play the channel as if it is live, which it is not and that is why it is giving you that error.
only works with cliips
Both live channels and archived videos are working for me. Can you link an example that doesn't work? Make sure you are using the latest version.
Hello everyone. You may have noticed that this stopped working about a month ago. You may have thought that this would never be updated again. WRONG! I just released v0.3.1 which makes it work again. The new versions are using a proxy in order to work. Please see the link in the description above for more information. ENJOY!
Just made a account to say THANK YOU!!!
Don't forget to also rate the addon and become a "fan" on this page
i don't understand what needs to do? can you make normal instruction? "Run locally" run what? what is this all stuff? what i need to do with this?
The instructions are good, you just need to read them more carefully. You don't need to run the proxy locally, that's for advanced users.
no, i don't undrestand what needs to do... what links needs to look like for open it in vlc? http://localhost:8080/resolve?url=https://www.twitch.tv/xqc/videos
maybe i need paste this code(or what its all?) in other program or what? i don't understand all this github stuffs and what to do with this all about
It is NOT possible to load a list of a channel's videos right now. I know that it used to work BEFORE, but it does NOT work anymore! I haven't had time to implement that yet. Unless you can code then there is not a way to solve this problem. You can do three things right now: 1. Load a channel that is currently live. Example: https://www.twitch.tv/xqc 2. Load a single archived video. Example: https://www.twitch.tv/videos/1828391756 3. Load a clip. Example: https://www.twitch.tv/xqc/clip/ExquisiteDepressedTurnipTriHard-2tc4CC7oFFDxwbTD Don't bother with trying to run it locally. Use Twitch URLs only. Don't look at GitHub. All the instructions you need are on this page here. If you are not happy with this you have two options: 1. Come back in 6 months and check if I have released an update. 2. Send me a big donation so that I write these features sooner.
9 9 excellent
Parser does not load list of past/all broadcasts NEED FIX! https://www.twitch.tv/???/videos?filter=archives https://www.twitch.tv/???/videos?filter=all
Hello. I wasn't notified of your comments for some reason. Please calm down and hopefully I will get to it in the next few days. Thank you.
This is now fixed in v0.2.3. Enjoy!
THANKS!<3
don't work pages like: videos?filter=archives&sort=time
Please fix that! :(
Constantly advertising since today?
Note that Twitch API v3 is shutting down very soon. I think everything in this playlist parser will continue to work (if you have the latest version), but in case you notice something broken, please let me know.
don't work pages like: videos?filter=archives&sort=time
I don't know if it is new API or your parser or just my stupidity, but there is no option in the playlist for 1080p quality, only 720p.
Not your fault.. I just uploaded a new version to fix it. I also added a stream for audio only. Thanks for reporting! By the way.. is it just me, or are there ads on these stream now? I don't think there were any before.. :(
I have encountered another issue. After some minutes it completely stops loading VOD. Even though i have enough speed to watch it without buffering.