Lorerunner's Forums

The Lorerunner's Forums

Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Turn 5-1069
Sun Oct 15, 2017 12:30 pm by SilverDragonRed

» Babylon 5: The Fall of Centauri Prime (S5:E19) ~ On the End of Londo Mollari and the Symmetry of Mister Morden
Tue Oct 10, 2017 10:20 am by Arsene Lupin

» Turn 4-1069
Mon Oct 09, 2017 9:30 pm by The_Wanderer_In_Rags

» StarCraft 2: Redux
Mon Oct 09, 2017 3:23 pm by theshadowcouncil

» Potential Future Loreruns
Mon Oct 09, 2017 2:26 am by WKC690

» Your Top 3 Themes of each Final Fantasy?
Sun Oct 08, 2017 11:28 am by Alianger

» Lorewalkers' Top 5: JRPGs
Sun Oct 08, 2017 9:27 am by Alianger

» Turn 3-1069
Sun Oct 01, 2017 5:21 am by FreelanceZero

» Bound by the Past
Thu Sep 28, 2017 2:58 pm by SilverDragonRed

You are not connected. Please login or register

Streamlink: A Brief How To

View previous topic View next topic Go down  Message [Page 1 of 1]

1 Streamlink: A Brief How To on Wed Jun 24, 2015 5:36 pm

UPDATE 2016-12-04: Livestreamer hasn't had a release since May 2015, and there's been no commits to the github repo since Feb 2016 either; it's effectively dead.
However, Streamlink is a fork of Livestreamer which has active development, so I'm updating the instructions. The legacy instructions are in a spoiler at the bottom of this post.

Streamlink and Livestreamer coexist fine, you can even use your old oauth token if you want (though I would recommend making a new one). You'll have to copy and paste the sections of livestreamerrc that you're using (e.g. twitch-oauth-token, default-stream, etc.) into streamlinkrc. See the "config file location" spoiler below.


This comes up often on the stream (way back in Jun 2015, damn it's been a while), and has gotten long enough, that I think writing it down here is a good idea (also others can link this easily).
See the second post for the links, if you can't see them (e.g. because you aren't logged in).

So, you want to watch Archengeia's-- er, Lorerunner's stream, but Twitch's player won't work, or the stream is constantly buffering:
Use Streamlink in conjunction with VLC for simplest operation.

This will be rather Windows centric, but Streamlink and VLC are usable on Linux, Mac OS X and some BSDs.
See the official Streamlink documentation for installation, and configuration and usage. See here on how to get VLC for your system.

1) Get the VLC installer for Windows and install VLC. Make sure to select what files you want VLC to associate with (if anything).
2) Get the latest stable Streamlink exe installer for Windows (or a portable version, or the nightly version if you're feeling very adventurous) and install Streamlink. You can tell the installer to open the config file, as it'll be needed for the next step.
3) Generate an oauth token so Streamlink can use your account. As of 2016-09-14, Twitch Client-ID is mandatory![1]

Windows config file location:
Code:
%APPDATA%\streamlink
You can get there by pasting it into the Run command (Start Menu -> Run). Then right-click on streamlinkrc and Open in Notepad (or, preferably, Edit with Notepad++).
Linux config file location:

Code:
~/.config/streamlink
You'll have to manually create the file "~/.config/streamlink/config" (without quotes)
streamlinkrc on Windows and config on Linux are the same.

How to generate an oauth token and configure Streamlink to use it:
Instructions for OAuth Generation:
Run as administrator:
Code:
streamlink --twitch-oauth-authenticate
Your default web browser will open (likely Firefox or Chrome) and ask you to login to twitch (if not already logged in).

Once logged in, it will ask you to "Authorize Streamlink to use your account"; click the "Authorize" button.

You will be redirected to another page, and in the middle of the page it should say
Code:
twitch-oauth-token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Where the X's are your actual oauth token; DO NOT SHARE IT. You want to copy that and paste it into your streamlinkrc file.

The old method or the noscript method:

With noscript turned on, it won't say anything, so either temporarily allow "streamlink.github.io" reload and do the above, or:

You will be redirected to another page; the address (or URL) bar of your browser should look similar to this
Code:
https://streamlink.github.io/twitch_oauth.html#access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&scope=user_read+user_subscriptions
The X's will be different for everyone; that is your oauth token, DO NOT SHARE IT.

You want to copy that string of characters between "#access_token=" and "&scope" and paste it into your streamlinkrc file as the following:
Code:
twitch-oauth-token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Where the X's are your actual oauth token, which you just copied from the address bar.

Test that Streamlink and the oauth token work:
Test:
Run as administrator:
Code:
cmd
Then type
Code:
streamlink twitch.tv/thelorerunner best
and press Enter. You should see this output
Code:
[cli][info] Found matching plugin twitch for URL twitch.tv/thelorerunner
[plugin.twitch][info] Attempting to authenticate using OAuth token
[plugin.twitch][info] Successfully logged in as <your twitch username>
In my case, "<your twitch username>" says "lurker4711825".
If you have any problems feel free to ask questions here, but don't post your oauth token.

If you see "Successfully logged in", then it should Just Work™️

If Youtube Live is a frozen image (possibly others, I don't know):

It might be a lack of m3u8 support in vlc issue. I had issue with VLC 2.2.1, upgrading to VLC-3.0.0-git-20160403-0402 fixed it for me (latest as of writing this update).

3.0.0-git has been stable enough for me, but no guarantees. You only need VLC-3 if you want to watch Youtube Live.
Either get >=3.0 stable from above (if it's out when you're reading this), or get the 3.0.0-git win32 exe or 3.0.0-git win64 exe.

Advanced UNSUPPORTED Youtube Live With VLC-2:
Courtesy of this issue, more specifically, this comment, the following command might work (I haven't personally tested it); if you don't have the programs in the path (streamlink, ffmpeg, vlc), you'll need to modify the command to be the full path.

You can get windows ffmpeg binaries here. You'll probably want release build (3.2 currently), 32-bit, shared (though static will work fine for this use case).

The actual command that will (or should) make Streamlink and VLC-2 work with Youtube Live (adjusted for Windows cmd: '2>/dev/null' to '2>NUL'; reverse if on *nix or cygwin)
Code:
streamlink -O <youtube link> best | ffmpeg -i - -vcodec copy -tune zerolatency -acodec copy -preset fast -f mpegts - 2>NUL | vlc -
If the above made you quite confused, well, that's why it's Advanced and UNSUPPORTED by me.

Optional configuration:
If the stream is constantly buffering:

There are a couple of things you can try [2]:

1) Add the following to streamlinkrc and try again.
Code:
hls-segment-threads=4
If that doesn't work, then

2) Add the following to streamlinkrc and try again.
Code:
player="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --file-caching=10000 --network-caching=10000
Note: If you are using 32-bit Windows or the 64-bit VLC, change "Program Files (x86)" to "Program Files" (without quotes)

3) If that still doesn't work, then try lowering the quality, e.g. for medium
Code:
streamlink twitch.tv/thelorerunner medium
Note: You may want to delete the "player=" change above, because some people have had problems with that option.
The "Setting one or more qualities as default" spoiler tag has info on how to find available stream qualities.
Setting one or more qualities as default:

Adding the following to steamlinkrc will allow you to get the best quality stream available (source on twitch) without having to specify it every time
Code:
default-stream=best

You can also specify multiple qualities, and the first available will be chosen, e.g.
Code:
default-stream=medium,high,best

If you want to find out what stream qualities are available:
Run as administrator:
Code:
cmd
Then type
Code:
streamlink twitch.tv/thelorerunner list
and press Enter. (If "default-stream" is set, streamlink <stream> won't only list the available streams)

Example Output: (which has been massaged with additional quality options from another stream. Hopefully, one day, I can undo the massage.)
Code:
[cli][info] Found matching plugin twitch for URL twitch.tv/thelorerunner
[plugin.twitch][info] Attempting to authenticate using OAuth token
[plugin.twitch][info] Successfully logged in as <twitch username>
error: The specified stream(s) 'list' could not be found.
       Available streams: audio, mobile (worst), low, medium, high, source (best)
Then you can specify the stream you want, e.g. to see what mobile users see, but without as much buffering Razz
Code:
streamlink twitch.tv/thelorerunner mobile
Check for updates to streamlink:

Streamlink no longer automatically checks for new versions when invoked.
To manually check, run as administrator:
Code:
cmd
Then type
Code:
streamlink --version-check
and press Enter.
If it tells you there's a new version, you can get the latest stable Streamlink exe installer for Windows here.

Legacy Livestreamer How To:
This comes up often on the stream, and has gotten long enough, that I think writing it down here is a good idea (also others can link this easily).
See the second post for the links, if you can't see them (e.g. because you aren't logged in).

So, you want to watch Archengeia's-- er, Lorerunner's stream, but Twitch's player won't work, or the stream is constantly buffering:
Use Livestreamer in conjunction with VLC for simplest operation.

This will be rather Windows centric, but Livestreamer and VLC are usable on Linux, Mac OS X and some BSDs.
See the official Livestreamer documentation for installation, and configuration and usage. See here on how to get VLC for your system.

1) Get the VLC installer for Windows and install VLC. Make sure to select what files you want VLC to associate with (if anything).
2) Get the Livestreamer installer for Windows and install livestreamer and rtmpdump (it's included in the installer, and the default option).
3) Generate an oauth token so livestreamer can use your account. As of 2016-09-14, Twitch Client-ID is mandatory![1]

Windows config file location:
Code:
%APPDATA%\livestreamer
You can get there by pasting it into the Run command (Start Menu -> Run). Then right-click on livestreamerrc and Open in Notepad (or, preferably, Edit with Notepad++).
Linux config file location:

Code:
~/.config/livestreamer
You'll have to manually create the file "~/.config/livestreamer/config" (without quotes)
livestreamerrc on Windows and config on Linux are the same.

How to generate an oauth token and configure livestreamer to use it:
Instructions:

Copied from here.
Run as administrator:
Code:
livestreamer --twitch-oauth-authenticate
Your default web browser will open (likely Firefox or Chrome) and ask you to login to twitch (if not already logged in).

Once logged in, it will ask you to "Authorize livestreamer to use your account"; click the "Authorize" button.

Don't close the tab just yet.

You will be redirected to another page; the address (or URL) bar of your browser should look similar to this
Code:
http://livestreamer.tanuki.se/en/develop/twitch_oauth.html#access_token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX&scope=user_read+user_subscriptions
The X's will be different for everyone; that is your oauth token, DO NOT SHARE IT.

You want to copy that string of characters between "access_token=" and "&scope" and paste it into your livestreamerrc file as the following:
Code:
twitch-oauth-token=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Where the X's are your actual oauth token, which you just copied from the address bar.

Test that livestreamer and the oauth token work:
Test:
Run as administrator:
Code:
cmd
Then type
Code:
livestreamer twitch.tv/thelorerunner best
and press Enter. You should see this output
Code:
[cli][info] Found matching plugin twitch for URL twitch.tv/thelorerunner
[plugin.twitch][info] Attempting to authenticate using OAuth token
[plugin.twitch][info] Successfully logged in as <your twitch username>
In my case, "<your twitch username>" says "lurker4711825".
If you have any problems feel free to ask questions here, but don't post your oauth token.

If you see "Successfully logged in", then it should Just Work™️

If "youtube live" is a frozen image (possibly others, I don't know):

It might be a lack of m3u8 support in vlc issue. I had issue with VLC 2.2.1, upgrading to VLC-3.0.0-git-20160403-0402 fixed it for me (latest as of writing this update).

Either get >=3.0 stable from above (if it's out when you're reading this), or get the 3.0.0-git win32 exe or 3.0.0-git win64 exe


Optional configuration:
If the stream is constantly buffering:

There are a couple of things you can try [2]:

1) Add the following to livestreamerrc and try again.
Code:
hls-segment-threads=4
If that doesn't work, then

2) Add the following to livestreamerrc and try again.
Code:
player="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" --file-caching=10000 --network-caching=10000
Note: If you are using 32-bit Windows or the 64-bit VLC, change "Program Files (x86)" to "Program Files" (without quotes)

3) If that still doesn't work, then run the following as administrator so you can at least listen to the stream
Code:
livestreamer twitch.tv/thelorerunner audio
Note: You may want to delete the "player=" change above, because some people have had problems with that option.
If you don't want to remember to specify the stream quality:

Add the following to livestreamerrc
Code:
default-stream=best

You can also specify multiple qualities, and the first available will be chosen, e.g.
Code:
default-stream=medium,high,best

If you want to find out what stream qualities are available:
Run as administrator:
Code:
cmd
Then type
Code:
livestreamer twitch.tv/thelorerunner list
and press Enter. (If "default-stream" is set, livestreamer <stream> won't only list the available streams)

Example Output: (which has been massaged with additional quality options from another stream. Hopefully, one day, I can undo the massage.)
Code:
[cli][info] Found matching plugin twitch for URL twitch.tv/thelorerunner
error: The specified stream(s) 'list' could not be found.
        Available streams: audio, high, low, medium, mobile (worst), source (best)
Then you can specify the stream you want, e.g. to see what mobile users see, but without as much buffering Razz
Code:
livestreamer twitch.tv/thelorerunner mobile



Last edited by lurker4701822 on Mon Jun 12, 2017 6:44 pm; edited 23 times in total

View user profile

2 Re: Streamlink: A Brief How To on Wed Jun 24, 2015 5:46 pm

VLC installer for Windows: https://www.videolan.org/vlc/download-windows.html
Streamlink installer links for Windows: https://streamlink.github.io/install.html#windows-binaries
Latest stable Streamlink exe installer: https://github.com/streamlink/streamlink/releases/latest

latest VLC nightly build for Windows (32-bit): http://nightlies.videolan.org/build/win32/last/
latest VLC nightly build for Windows (64-bit): http://nightlies.videolan.org/build/win64/last/

Notepad++: https://notepad-plus-plus.org/

Streamlink homepage: https://streamlink.github.io/
VLC homepage: http://videolan.org/vlc

Streamlink installation docs: https://streamlink.github.io/install.html
Streamlink configuration and usage docs: https://streamlink.github.io/cli.html

How to get VLC for your system: https://www.videolan.org/vlc/#download

Streamlink docs on common issues (e.g. buffering): https://streamlink.github.io/issues.html

FFMpeg Windows Binaries: https://ffmpeg.zeranoe.com/builds/

Legacy Livestreamer Links:
Livestreamer installer for Windows: http://livestreamer.tanuki.se/install.html#windows-binaries

Livestreamer homepage: http://livestreamer.tanuki.se/

Livestreamer installation docs: http://livestreamer.tanuki.se/install.html
Livestreamer configuration and usage docs: http://livestreamer.tanuki.se/cli.html

Livestreamer docs on common issues (e.g. buffering): http://docs.livestreamer.io/issues.html



Last edited by lurker4701822 on Thu May 11, 2017 8:05 pm; edited 12 times in total

View user profile

3 Re: Streamlink: A Brief How To on Wed Jun 24, 2015 6:24 pm

Thanks man. Will try this if I have any issues. If I'm lucky my new rig will be up and running by the kotor stream.

View user profile

4 Re: Streamlink: A Brief How To on Wed Jun 24, 2015 6:26 pm

Stickying.


_________________
The Lorerunner
View user profile http://lorerunner.com/

5 Re: Streamlink: A Brief How To on Thu Jun 25, 2015 1:50 pm

If anyone is interested, I can provide an addition to Lurker's tutorial, focused on making Livestreamer a one-click solution, rather than having to deal with batch files or fiddling with the command line. I know that some people, myself included, got really irritated at always having to type some long commands in whenever they'd watch a stream, so I just figured I'd offer my preferred method of running Livestreamer to anyone who wants it. Let me know what you guys think.

View user profile

6 Re: Streamlink: A Brief How To on Thu Jun 25, 2015 2:47 pm

There is also a lot of alternative GUI extensions for livestreamer: https://github.com/chrippa/livestreamer/wiki/Alternative-interfaces

I personally tried this one: https://github.com/bastimeyer/livestreamer-twitch-gui
Pretty simple, just type in the name of the channel, click and watch.

View user profile

7 Re: Streamlink: A Brief How To on Thu Jun 25, 2015 2:52 pm

smajdalf wrote:There is also a lot of alternative GUI extensions for livestreamer: https://github.com/chrippa/livestreamer/wiki/Alternative-interfaces

I personally tried this one: https://github.com/bastimeyer/livestreamer-twitch-gui
Pretty simple, just type in the name of the channel, click and watch.

Interesting. I've always gone through a particular Rainmeter plugin. I might have to look into some of the more standalone GUI extensions myself. Even still, I feel it's a better alternative than having to go through the command line every time, personally.

View user profile

8 Re: Streamlink: A Brief How To on Thu Jun 25, 2015 5:51 pm

Is there a Linux based version of the livestreamer?

View user profile

9 Re: Streamlink: A Brief How To on Fri Jun 26, 2015 1:21 pm

TheLastSamurai14 wrote:If anyone is interested, I can provide an addition to Lurker's tutorial, focused on making Livestreamer a one-click solution, rather than having to deal with batch files or fiddling with the command line. I know that some people, myself included, got really irritated at always having to type some long commands in whenever they'd watch a stream, so I just figured I'd offer my preferred method of running Livestreamer to anyone who wants it. Let me know what you guys think.
Feel free to post away. I'm a Gentoo GNU/Linux guy (I also grew up with CP/M and DOS), so command line is second first nature to me. Razz

SilverDragonRed wrote:Is there a Linux based version of the livestreamer?

Yes there is.
lurker4701822 wrote:See the official Livestreamer documentation for installation, and configuration and usage. See here on how to get VLC for your system.
The installation docs will tell you how to get it for your distro, and the config and usage docs will tell you where to put the livestreamerrc file (on my system it's ~/.config/livestreamer/config and doesn't exist by default).



Last edited by lurker4701822 on Thu Sep 15, 2016 4:22 pm; edited 1 time in total

View user profile

10 Re: Streamlink: A Brief How To on Fri Jun 26, 2015 1:54 pm

lurker4701822 wrote:
TheLastSamurai14 wrote:If anyone is interested, I can provide an addition to Lurker's tutorial, focused on making Livestreamer a one-click solution, rather than having to deal with batch files or fiddling with the command line. I know that some people, myself included, got really irritated at always having to type some long commands in whenever they'd watch a stream, so I just figured I'd offer my preferred method of running Livestreamer to anyone who wants it. Let me know what you guys think.
Feel free to post away. I'm a Gentoo GNU/Linux guy (I also grew up with CP/M and DOS), so command line is second first nature to me. Razz

I certainly get where you're coming from, as I'm planning on delving into Linux at some point within the end of the year, and I got a fair bit of command line experience when I was going to school for my CompTIA certs. That being said, given that most of us (myself included) are primarily Windows users and young enough to have not used DOS as a standalone OS, I figure I'd show off the QOL improvements that Rainmeter can provide for Windows users, especially through a plugin which directly benefits this entire community. I'll try and get my tutorial out before the KotOR lorerun starts tomorrow, but if not, it will most certainly be up sometime soon afterwards.

View user profile

11 Re: Streamlink: A Brief How To on Fri Jun 26, 2015 3:04 pm

Thank you a lot for posting this! This method has been especially helpful when watching Twitch streams. It has noticeably reduced buffering for me.

View user profile

12 Re: Streamlink: A Brief How To on Fri Jun 26, 2015 11:54 pm

Theodoricos wrote:Thank you a lot for posting this! This method has been especially helpful when watching Twitch streams. It has noticeably reduced buffering for me.

Glad I could help.

View user profile

13 Re: Streamlink: A Brief How To on Sat Jul 18, 2015 4:48 pm

livestreamer URL quality --player-passthrough hls

I use this command line and MPC-HC for VOD-past brodcasts; main advantage is that you can use the scroll time bar, and see the time.

View user profile

14 Re: Streamlink: A Brief How To on Fri Sep 16, 2016 6:21 pm

Thank you Lurker! Very Happy

View user profile

View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum