Latest update to this guide: September 10, 2017: Added the new Afreeca ASL streams to the .bat file (preparing for ASL Season 4).
+ Show Spoiler [Changelog] +
August 16, 2016: First version of document
August 23, 2016: Wording and clarifications, no new or updated downloads
September 6, 2016: Wording and clarifications, no new or updated downloads
October 4, 2016: Added Rain to the .bat file
October 29, 2016: Added Soulkey to the .bat file
April 1, 2017: Added Jaedong, Stork, and BackHo to the .bat file
April 3, 2017: Added ggaemo and HyuN to the .bat file
April 5, 2017: Added Shine to the .bat file
April 24, 2017: Added Horang2 to the .bat file
April 29, 2017: v2.0: Streamlink & .bat launcher update
August 18, 2017: v3.0: New launcher and support for Twitch. Added lots of players to the launcher
August 19, 2017: Added MaNa, LancerX, Bonyth, and Schamtoo to the .bat launcher.
September 5, 2017: Minor tweaks to the .bat launcher, added a few players.
September 10, 2017: Added the new Afreeca ASL streams to the .bat file (preparing for ASL Season 4).
August 23, 2016: Wording and clarifications, no new or updated downloads
September 6, 2016: Wording and clarifications, no new or updated downloads
October 4, 2016: Added Rain to the .bat file
October 29, 2016: Added Soulkey to the .bat file
April 1, 2017: Added Jaedong, Stork, and BackHo to the .bat file
April 3, 2017: Added ggaemo and HyuN to the .bat file
April 5, 2017: Added Shine to the .bat file
April 24, 2017: Added Horang2 to the .bat file
April 29, 2017: v2.0: Streamlink & .bat launcher update
August 18, 2017: v3.0: New launcher and support for Twitch. Added lots of players to the launcher
August 19, 2017: Added MaNa, LancerX, Bonyth, and Schamtoo to the .bat launcher.
September 5, 2017: Minor tweaks to the .bat launcher, added a few players.
September 10, 2017: Added the new Afreeca ASL streams to the .bat file (preparing for ASL Season 4).
![[image loading]](http://i.imgur.com/2E9Lq1o.png)
Welcome back to Brood War.
With the release of Starcraft: Remastered, more people are streaming Starcraft than ever before. In South Korea, most top SC/BW players have a channel from which they stream their practice games every day. The platform of choice for many of these players is the streaming service Afreeca, South Korea's answer to Twitch.tv
Unfortunately, Afreeca occasionally lags for foreigners (depending on the Afreeca server currently assigned to serve users), and the interface is confusing if you can't read Korean. Players frequently use random IDs on Afreeca:
![(Wiki)](/images/forum/wiki_icon.png)
![(Wiki)](/images/forum/wiki_icon.png)
![(Wiki)](/images/forum/wiki_icon.png)
The most lag-free method of watching streams is using Streamlink. It is a command line utility that connects live streams to a media player (usually VLC). This process is automated using a simple launcher (a Windows .bat file). This launcher features CDN server and stream quality options, and you can view multiple streams at once.
You can watch Afreeca.com and Twitch.tv streams using this method, with more to come.
Files and instructions below are always up to date. Any new .bat files, fixes or updates posted in the comment section are automatically added to this guide. If you are currently performing a first-time install, you do not need to look for file updates in the comment section. Updates posted in the comment section after your first time install may be of use to you, especially if the .bat file was updated to include additional players.
Below guide confirmed working perfectly as of October, 2017.
NOTE: As of writing, Amazon AWS is out of commission. Please use GSCDN for the time being.
Requirements
Streamlink requires Windows Vista SP2 or above
Installation
Fast portable install (recommended)
• Install VLC Media Player (install to default directory)
• Download Starcraft Stream Viewer (Streamlink 0.7.0 Portable).exe
• Launch the .exe and extract to any location
• Launch the .bat file in the Stream Viewer folder
Fast manual install
• Install VLC Media Player (install to default directory)
• Install Streamlink
• Download afreeca.py.
• Go to Streamlink's plugins folder (C:\Program Files (x86)\Streamlink\pkgs\streamlink\plugins), overwrite afreeca.py
• Download Starcraft Stream Viewer.bat and run it. Done!
Detailed manual installation below
+ Show Spoiler [Click for Linux instructions] +
NOTE BY AYLEAR:
This Linux install is maintained by TeamLiquid user letian. Contact him if you have any problems with the Linux setup.
On July 09 2017 18:22 letian wrote:
To all Linux users.
I have dropped my livestreamer fork and switched to streamlink backend.
Now, to watch the bw streams via vlc you'll only need a bash script which you can take from here.
As usual, you'll need to replace the afreeca.py (if you still haven't) which is installed with streamlink with the one here.
The script can check who's online, set "aws_original", "aws_hd" or "aws_sd" quality of streams. Run multiple vlc stream instances (unless you explicitly forbid it in vlc config) with different players.
Here is a github repo with the instructions and the required files.
To all Linux users.
I have dropped my livestreamer fork and switched to streamlink backend.
Now, to watch the bw streams via vlc you'll only need a bash script which you can take from here.
As usual, you'll need to replace the afreeca.py (if you still haven't) which is installed with streamlink with the one here.
The script can check who's online, set "aws_original", "aws_hd" or "aws_sd" quality of streams. Run multiple vlc stream instances (unless you explicitly forbid it in vlc config) with different players.
Here is a github repo with the instructions and the required files.
+ Show Spoiler [Old version] +
On August 23 2016 23:12 letian wrote:
Ok, I figured it out for Linux.
1. First uninstall with your package manager any previous versions of livestreamer.
For archlinux/manjaro: sudo pacman -Rcn livestreamer
2. Do not add to /etc/hosts "121.156.109.165 chromecast.afreeca.gscdn.com"
3. Download my livestreamer fork with all afreeca modifications included.
git clone https://github.com/tastyminerals/livestreamer.git livestreamer-tasty
4. cd livestreamer-tasty
5. sudo python3 setup.py install
Now you can use afreeca.sh to play streams!
Use !online command to get currently available streamers, use exit to quit afreeca.sh.
Ok, I figured it out for Linux.
1. First uninstall with your package manager any previous versions of livestreamer.
For archlinux/manjaro: sudo pacman -Rcn livestreamer
2. Do not add to /etc/hosts "121.156.109.165 chromecast.afreeca.gscdn.com"
3. Download my livestreamer fork with all afreeca modifications included.
git clone https://github.com/tastyminerals/livestreamer.git livestreamer-tasty
4. cd livestreamer-tasty
5. sudo python3 setup.py install
Now you can use afreeca.sh to play streams!
Use !online command to get currently available streamers, use exit to quit afreeca.sh.
- 1) Install VLC Media Player
• Install VLC Media Player (install to default directory or be prepared to edit the .bat file later)
2) Install Streamlink
• Install Streamlink (use the stable build, direct link here if you need it)
3) Update Streamlink scripts
Download afreeca.py (right-click and save link as...) to a folder (don't overwrite from the browser directly)
Navigate to your Streamlink plugins folder, usually:
C:\Program Files (x86)\Streamlink\pkgs\streamlink\plugins
Replace the afreeca.py file in this folder with the one you just downloaded (copy and overwrite).
NOTE: Browser do not have permission to directly overwrite files in C:\Program Files or other system folders. You need to download the file to a location on your computer and then manually copy/paste and overwrite.
4) Download Windows .bat launcher file
Windows (Vista SP2, Win 7, Win 8, Win 10) (32 and 64-bit):
Starcraft Stream Viewer.bat (right-click and save link as)
If you installed VLC to a custom location you will need to edit the .bat file now. Click the spoiler below.
+ Show Spoiler [If VLC installed to custom folder] +
If you installed VLC to a custom folder, you will have to edit the .bat file and add the path to the set vlcpath= line. Open the .bat file with a text editor (Notepad++ is recommended, although Notepad will do fine) and follow the instructions near the top of the file.
Example: If you installed VLC to D:\VLC, you would need to set the line to
Example: If you installed VLC to D:\VLC, you would need to set the line to
set vlcpath=D:\VLC\vlc.exe
Using the launcher
Once you have installed everything, check the TeamLiquid sidebar to see who is currently streaming. (You can also check https://bwstreams.appspot.com/ which does the same thing and shows more streams.) Run the launcher.
![[image loading]](http://i.imgur.com/X7QDshk.png)
You will be given the choice between Afreeca CDN servers. Amazon AWS may be better if you are in the US, while GSCDN may be better for European viewers. If streams still lag for you, switch CDN servers first before you mess with quality options. The CDN option only affects Afreeca connections.
NOTE: As of writing, Amazon AWS is out of commission. Please use GSCDN for the time being.
When prompted, type in the name (or ID) of a player you want to watch, then select the desired stream quality. After a few moments, VLC should start up. You can keep typing in more names as well -- VLC will open new instances so that you can easily multistream.
If you enter a name or channel ID that has not been added to the launcher, the script will ask you if you want to attempt to connect to that name on Twitch.tv or Afreeca.com. This way you can use the launcher to watch any stream on either platform so long as you know the channel ID.
Lastly, most players have a lot of smurfs. Liquipedia has a list of SCR ladder aliases making it easier to look up who is playing who. If they are playing on the Fish server, the Fish Server entry on Liquipedia has a list as well.
Troubleshooting & FAQ
- Q: Can I use another media player instead of VLC?
+ Show Spoiler +
A:
Streamlink does technically work with MPC, but you'll need to mess with the .bat file a bit. More on that in a bit.
I haven't added native support for MPC because 1) extra work for me, and 2) some command lines are missing. Most notably --file-caching and --network-caching don't work, but you also can't add a meta title to an MPC window. When VLC pops up, it properly titles the window with the name you input, i.e. Bisu, Stork, Flash. MPC can't do that, so the window title remains something generic like "stdin".
Anyway, to use this setup in MPC you need the following:
- At least version 1.7 of MPC (1.6 or below will give file not found errors)
- Edit the bat file with the following values:
Open the .bat file in notepad++ or notepad. Near the top of the file you'll see this line:
...which by default is blank. Type in the path to your MPC player, i.e.
Next, scroll down to the bottom of the .bat file and find the following line:
Change this line to:
...which removes the "--file-caching=5000 --network-caching=5000 --meta-title=%name%" bit since MPC can't use those.
This worked on my system just fine.
Edit: If there is sufficient interest, I can make it so the .bat file accepts MPC by default as an option when you launch it. Let me know if this is something anyone else wants, otherwise I'm sticking with the basic VLC setup.
On September 05 2017 17:07 Arvendilin wrote:
Is there a way to use this with MPC instead of VLC? since VLC fucks with colour saturation
Is there a way to use this with MPC instead of VLC? since VLC fucks with colour saturation
Streamlink does technically work with MPC, but you'll need to mess with the .bat file a bit. More on that in a bit.
I haven't added native support for MPC because 1) extra work for me, and 2) some command lines are missing. Most notably --file-caching and --network-caching don't work, but you also can't add a meta title to an MPC window. When VLC pops up, it properly titles the window with the name you input, i.e. Bisu, Stork, Flash. MPC can't do that, so the window title remains something generic like "stdin".
Anyway, to use this setup in MPC you need the following:
- At least version 1.7 of MPC (1.6 or below will give file not found errors)
- Edit the bat file with the following values:
Open the .bat file in notepad++ or notepad. Near the top of the file you'll see this line:
set vlcpath=
...which by default is blank. Type in the path to your MPC player, i.e.
set vlcpath=C:\Program Files\MPC-HC\mpc-hc64.exe
Next, scroll down to the bottom of the .bat file and find the following line:
start /B streamlink --loglevel=error --player="%vlcpath% --file-caching=5000 --network-caching=5000 --meta-title=%name%" %url%/%id% %output%
Change this line to:
start /B streamlink --loglevel=error --player="%vlcpath%" %url%/%id% %output%
...which removes the "--file-caching=5000 --network-caching=5000 --meta-title=%name%" bit since MPC can't use those.
This worked on my system just fine.
Edit: If there is sufficient interest, I can make it so the .bat file accepts MPC by default as an option when you launch it. Let me know if this is something anyone else wants, otherwise I'm sticking with the basic VLC setup.
On September 06 2017 10:50 Arvendilin wrote:
2 small little infos for everyone who wants to use MPC aswell:
Some streams might only get audio not video, to fix that, go to options > Internal filters > Splitters and then increase stream analysis duration, this will give it time to detect every stream it gets send!
The second thing is that ofcourse have to go into multi window mode if you want to watch multiple streams, I know this is easy but I was confused for about 10 secs so I thought I'd let everyone know that that option exists!
2 small little infos for everyone who wants to use MPC aswell:
Some streams might only get audio not video, to fix that, go to options > Internal filters > Splitters and then increase stream analysis duration, this will give it time to detect every stream it gets send!
The second thing is that ofcourse have to go into multi window mode if you want to watch multiple streams, I know this is easy but I was confused for about 10 secs so I thought I'd let everyone know that that option exists!
Q: It takes a long time between entering a name into the command line and VLC opening.
+ Show Spoiler +
A: That's normal. It usually takes 5 - 30 seconds for me to connect.
Q: Can I watch Afreeca VODs using this setup?
+ Show Spoiler +
A: No, Streamlink cannot be used to watch VODs on Afreeca.
Q: The downloads are broken, I can't grab the .py and .bat files!
+ Show Spoiler +
A: They're also on Pastebin. Grab them from here (go to the link and click "download" on Pastebin):
https://pastebin.com/ZYFXe76a - afreeca.py
https://pastebin.com/Z6T9YpB2 - starcraft_stream_viewer.bat
TL user prech also uploaded afreeca.py to TeamLiquid (right-click and save link as)
https://pastebin.com/ZYFXe76a - afreeca.py
https://pastebin.com/Z6T9YpB2 - starcraft_stream_viewer.bat
TL user prech also uploaded afreeca.py to TeamLiquid (right-click and save link as)
Q: I think the .bat file is broken, the colors are all messed up.
+ Show Spoiler +
Q: I have messed with CDN and quality options, but the stream is still lagging. Can I fix it?
+ Show Spoiler +
A: Possibly. I haven't needed to do this myself, but according to the guide on defiler.ru you can try the following:
Copy the IP address response, and add it to your hosts file. (See below for instructions.)
This IP address randomizes every once in a while as Afreeca hosts from different servers. If you experience stream lag, you may want to do a quick nslookup and add the new IP address to the hosts file.
How to add something to your hosts file
Google the path to your hosts file if you need to. On Windows 7/8/10 it is:
C:\Windows\System32\drivers\etc\
Right-click your hosts file, and uncheck read-only / write-protect.
Edit the hosts file using notepad or notepad++.
Add the IP address you received from the nslookup command, followed by "chromecast.afreeca.gscdn.com", to the bottom of the hosts file. Example:
Save the hosts file, and re-enable write-protect / read-only mode. It should look like this:
![[image loading]](http://i.imgur.com/TU3a7vk.png)
- Start -> Run "cmd.exe"
In the command line interface, type the following:
nslookup chromecast.afreeca.gscdn.com
Copy the IP address response, and add it to your hosts file. (See below for instructions.)
This IP address randomizes every once in a while as Afreeca hosts from different servers. If you experience stream lag, you may want to do a quick nslookup and add the new IP address to the hosts file.
How to add something to your hosts file
Google the path to your hosts file if you need to. On Windows 7/8/10 it is:
C:\Windows\System32\drivers\etc\
Right-click your hosts file, and uncheck read-only / write-protect.
Edit the hosts file using notepad or notepad++.
Add the IP address you received from the nslookup command, followed by "chromecast.afreeca.gscdn.com", to the bottom of the hosts file. Example:
121.156.109.165 chromecast.afreeca.gscdn.com
Save the hosts file, and re-enable write-protect / read-only mode. It should look like this:
![[image loading]](http://i.imgur.com/TU3a7vk.png)
Q: I can't connect to some streams. When I try, I get this error message.
+ Show Spoiler +
A: Remove any Afreeca IPs from the hosts file (see above).
Q: I connected to a streamer, but it just showed a countdown timer that did nothing when it got to 0.
+ Show Spoiler +
A: Close the VLC window and type in the name again. This happens some times in embedded streams when watching Afreeca, possibly due to CDN or ad-service problems.
Q: I'm getting a generic cannot find streamlink error.
+ Show Spoiler +
A: You haven't installed Streamlink properly. The .bat file requires you to install it using the Windows installer, which (among other things) adds Streamlink as a PATH variable so the .bat file can launch it properly.
Q: Error message:
error: Failed to start player: C:\Program Files (x86)\VideoLAN\VLC\vlc.exe --file-caching=5000 --network-caching=5000 --meta-title=psn1555 ([Error 2] The system cannot find the file specified)+ Show Spoiler +
A: VLC is not installed, or VLC is not installed to the default directory, or you forgot to edit the .bat file to point Streamlink to the proper VLC directory. See the installation instructions again for details.
Q: Error message:
error: The available stream(s) 'aws_hd' could not be found. Available streams: live_hls, live (worst, best)+ Show Spoiler +
A: You didn't properly copy and replace the afreeca.py file linked in the OP, meaning you either skipped this step or it failed to overwrite properly. Browsers do not have permission to overwrite files in C:\Program Files, so you have to do it manually.
Q: Error message:
error: Unable to open URL: [url=http://sessionmanager01.afreeca.tv:6060/broad_stream_assign.html]http://sessionmanager01.afreeca.tv:6060/broad_stream_assign.html[/url] (HTTPConnectionPool(host='sessionmanager01.afreeca.tv', port=6060): Max retries exceeded with url: /broad_stream_assign.html?use_cors=true&broad_key=195313113-flash-hd-rtmp&return_type=gs_cdn&cors_origin_url=m.afreeca.com&broad_no=195313113-mobile-hd-rtmp (Caused by ConnectTimeoutError(<urllib3.connection.HTTPConnection object at 0x0423A5D0>, 'Connection to sessionmanager01.afreeca.tv timed out. (connect timeout=20.0)')))+ Show Spoiler +
A: You probably didn't properly copy and replace the afreeca.py file linked in the OP, meaning you either skipped this step or it failed to overwrite properly. Browsers do not have permission to overwrite files in C:\Program Files, so you have to do it manually.
Q: Error message:
error: No plugin can handle URL: (stream URL)+ Show Spoiler +
A: Turn off your antivirus; it may be aggressively throttling your Streamlink connection.
Q: Error message:
error: No playable streams found on this URL+ Show Spoiler +
A: TeamLiquid only refreshes the sidebar periodically. The player may have just gone offline. Check https://bwstreams.appspot.com/ to see who is currently live and try another player.
Q: No seriously, I know Horang2 is streaming, but I'm still getting
error: No playable streams found on this URL+ Show Spoiler +
A: Some streamers (Horang2 does this some times) will occasionally set their streams to adults-only (19+) mode. When a stream is in adults-only mode, you have to use the Korean AfreecaTV Player (proprietary software) to view it, or Afreeca will refuse your connection. Either petition Horang2 to stop doing that, or find someone else to watch.
Q: What happened to Livestreamer and the old guide on defiler.ru?
+ Show Spoiler +
A: Livestreamer is no longer being actively worked on, so any time the API changes or a plugin somehow breaks, there is no immediate fix. Afreeca keeps changing their API every few months to the frustration of everyone, and I finally got tired of updating the hls.py and afreecatv.py files.
Streamlink is the current replacement for Livestreamer. It has additional quality options which are easy to find, options for CDN servers, and is generally updated very frequently. I have created a new .bat file to make use of these options.
RoX.Malki still deserves credit for his original Livestreamer guide which formed the basis for this entire guide. His effort has given us months of watching Afreeca without lag. In that spirit, I'll try to keep things updated as best I can.
Streamlink is the current replacement for Livestreamer. It has additional quality options which are easy to find, options for CDN servers, and is generally updated very frequently. I have created a new .bat file to make use of these options.
RoX.Malki still deserves credit for his original Livestreamer guide which formed the basis for this entire guide. His effort has given us months of watching Afreeca without lag. In that spirit, I'll try to keep things updated as best I can.