I wrote something similar (a CLI tool in Haskell), but I'd like to remove the necessity to install anything except a media player...
[Guide] Watch Afreeca SC/BW streams with VLC - Page 7
Forum Index > BW General |
Vendethiel
213 Posts
I wrote something similar (a CLI tool in Haskell), but I'd like to remove the necessity to install anything except a media player... | ||
juvenal
2448 Posts
On April 10 2017 23:17 Aylear wrote: Really? The quality is the exact same for me. Check the quality settings on the Afreeca player. Is it set to Source or something else? Is the VLC better or worse for you? Your wording is ambiguous. it's noticeably worse, I'm using MPC instead of VLC, could that be the problem? edit: nope, just checked it with VLC, here's how it compares to the stream in Chrome: | ||
Aylear
Norway3988 Posts
On April 12 2017 15:31 juvenal wrote: it's noticeably worse, I'm using MPC instead of VLC, could that be the problem? edit: nope, just checked it with VLC, here's how it compares to the stream in Chrome: Then I have no idea. Did you remember to set %AppData%\Roaming\livestreamer\livestreamerrc as specified in the setup guide? stream-types=hls hls-segment-threads=4 default-stream=best | ||
Petrucci86
Spain3 Posts
On April 12 2017 06:33 Vendethiel wrote: That's really cool! Do you have a github with that? I wrote something similar (a CLI tool in Haskell), but I'd like to remove the necessity to install anything except a media player... I don't have it, although I might consider setting one up. Obviously removing the Livestreamer/Streamlink dependency would be great, but that would also mean that any changes made in the endpoints would need to be addressed by you, making the app harder to maintain. Leaving that responsibility to Streamlink and building a GUI on top of it is just a easier choice. | ||
juvenal
2448 Posts
On April 12 2017 17:14 Aylear wrote: Then I have no idea. Did you remember to set %AppData%\Roaming\livestreamer\livestreamerrc as specified in the setup guide? stream-types=hls hls-segment-threads=4 default-stream=best yes Somehow livestreamer chooses the 'worst' quality option instead, it would appear. I manually chose it from cmd and the quality stayed the same. | ||
Aylear
Norway3988 Posts
On April 12 2017 18:59 juvenal wrote: yes Somehow livestreamer chooses the 'worst' quality option instead, it would appear. I manually chose it from cmd and the quality stayed the same. Well, crap. I don't know what the problem would be. =( I only barely know how to use Livestreamer. I just updated an existing guide that worked well for me. If there's a configuration option somewhere that could fix this for you, I don't know of it. | ||
juvenal
2448 Posts
edit: got it to work but the quality stays shit. Are you sure you have the same quality in the browser, Aylear? | ||
Aylear
Norway3988 Posts
It is possible that Livestreamer doesn't stream in Source from Afreeca, but I can at least confirm it looks better than High. | ||
juvenal
2448 Posts
| ||
BonitiilloO
Dominican Republic605 Posts
| ||
fabiano
Brazil4644 Posts
On August 17 2016 00:12 Aylear wrote:+ Show Spoiler + Watch Afreeca SC/BW streams with VLC Media Player Latest update to this guide: April 5, 2017: Added Shine to the .bat file + 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 Welcome back to Brood War. Afreeca is the most popular streaming service in South Korea. Most top SC/BW players have a channel from which they stream their practice games every day. 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: Bisu is "rlaxordyd", Last is "rlatjdgus228", Shuttle is "jk890202". These are their stream names even when watching an embedded stream from TeamLiquid, so it quickly becomes confusing. The easiest and most convenient way to watch Afreeca is using Livestreamer. This is a command line utility that connects live streams to a media player (usually VLC). For convenience, RoX.Malki created a .bat file which simplifies the process. The installation is a bit annoying, but after that it's easy to connect. Installation (Most of this information taken from defiler.ru. I have updated the information and fixed some broken scripts.) + Show Spoiler [Click for Linux instructions] + 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.
• Install VLC Media Player (install to default directory or be prepared to edit the .bat file later) • Install Livestreamer (grab the installer package) When Livestreamer finishes installing, tick the "Edit configuration file" option: Now add the following lines to the bottom of the configuration file: stream-types=hls Save and exit. Note: You can find this config file again by going to %appdata%/livestreamer/livestreamerrc 2) Go to your Livestreamer plugins folder. From wherever you installed it [default is C:\Program Files (x86)]: ...\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\plugins Delete the file afreecatv.pyc (note: NOT afreeca.pyc, but afreecatv.pyc) Download afreecatv.py (right-click and save as) and place it in the stream folder. The plugins folder should now look like this: 3) Go to your Livestreamer stream folder. From wherever you installed it [default is C:\Program Files (x86)]: ...\Livestreamer\livestreamer-1.12.2-py2.7.egg\livestreamer\stream Delete the file hls.pyc Download hls.py (right-click and save as) and place it in the stream folder. The stream folder should now look like this: 4) Download the .bat file appropriate for your system: Download hls.py (right-click and save as) and place it in the stream folder. Windows 64-bit: afreeca_x64.bat (right-click and save as) Windows 32-bit: afreeca_x86.bat (go to link, click download) Note: The only difference between the two .bat files is the specified path of VLC media player. 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 to point to the proper location. Example: If you installed VLC to the D:\ drive, you would need to change
to
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.) Run the afreeca_x??.bat file, and when prompted type in the name (or Afreeca ID) of a player you want to watch. After a few moments, VLC should start up. You can keep typing in more names as well -- VLC will open new instances for each player so that you can easily multistream. Lastly, most players have a lot of smurfs. The Fish Server entry on Liquipedia has a list of known smurfs and aliases, so it's easy to look up who people are playing against. Troubleshooting & FAQ
A: They're also on Pastebin. Grab them from here (go to the link and click "download" on Pastebin): http://pastebin.com/upgnsq8g - afreecatv.py http://pastebin.com/6L1zBnJA - hls.py http://pastebin.com/AyKrHMPF - afreeca_x64.bat http://pastebin.com/bF7gEyaC - afreeca_x86.bat Q: The stream is still lagging. Can I fix it? A: Possibly. I haven't needed to do this myself, but according to the guide on defiler.ru you can try the following:
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: + Show Spoiler + Q: I can't connect to some streams. When I try, I get this error message. A: Remove any Afreeca IPs from the hosts file (see above). Q: When I try to connect to a streamer I get this 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) A: VLC is not installed, or VLC is not installed to the default directory, or you are using the wrong .bat file for your system, or you forgot to edit the .bat file to point Livestreamer to the proper VLC directory. See the installation instructions again for details. Q: I tried to connect to [player] but it says No streams found on this URL. 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. Q: It takes a long time between entering a name into the command line and VLC opening. A: That's normal. It usually takes 10 - 45 seconds for me to connect. Q: What is the difference between this guide and the one on defiler.ru? A: Nothing, it's a blatant copy-paste so that I get credit instead of RoX.Malki. Actually, since Afreeca changed its domains around some of the old scripts were broken. For instance, I edited afreecatv.py to properly point to the new domain so you didn't have to edit it yourself. I also added direct links to the .py and .bat files to speed up the installation process. Besides that, I just made clarifications and added pictures to make things less ambiguous. Give this man a medal! And another one, in case he loses it! Thank you very much, streams are working smooth as silk for me now. | ||
toriak
Slovakia477 Posts
On April 12 2017 19:37 juvenal wrote: got it to work but the quality stays shit. Are you sure you have the same quality in the browser? i think you are right. It seems the quality in browser is better. I didnt noticed it before because have a small monitor... | ||
outscar
2828 Posts
Anyway to fix this? So annoying to watch from here because Afreeca snucks in 5 min. commercials. Now it's not working T_T | ||
Aylear
Norway3988 Posts
On April 19 2017 10:53 outscar wrote: [clic][error] Could not open stream: Missing #EXTM3U header Anyway to fix this? So annoying to watch from here because Afreeca snucks in 5 min. commercials. Now it's not working T_T That's odd. I've never seen that error before. It seems to be a connectivity problem on your end from what I can deduce. Are you sure you downloaded the hls.py and afreecatv.py files and put them in the proper folders? Seems like it's an error that can come up where hls.py is used, and it's all I can think of to try. | ||
outscar
2828 Posts
On April 19 2017 11:12 Aylear wrote: That's odd. I've never seen that error before. It seems to be a connectivity problem on your end from what I can deduce. Are you sure you downloaded the hls.py and afreecatv.py files and put them in the proper folders? Seems like it's an error that can come up where hls.py is used, and it's all I can think of to try. Added those files again, strangely I didn't had hls.py (instead I had hls.pyc which I deleted). But now I get "error: No plugin can handle URL: (stream URL)". Any idea? | ||
Aylear
Norway3988 Posts
On April 19 2017 12:25 outscar wrote: Added those files again, strangely I didn't had hls.py (instead I had hls.pyc which I deleted). But now I get "error: No plugin can handle URL: (stream URL)". Any idea? No idea. And not to be too rude about it, but you just told me you didn't follow the installation instructions properly. I don't know enough about Livestreamer and how it fully works to spend time troubleshooting an issue unique to you that could just end up being "lol i forgot to edit a thing you clearly specified in the OP, whoopsie!" If you still can't get it to work, maybe try some other solutions on this forum. I haven't tried these programs myself so I can't verify that they work, but: http://www.teamliquid.net/forum/brood-war/519028-scbw-afreeca-picker-vlc-livestreamer Vendethiel made a frontend program instead of a .bat file that has some additional features. It supposedly doesn't require a lot of messing with Livestreamer either. http://www.teamliquid.net/forum/brood-war/512913-guide-watch-afreeca-sc-bw-streams-with-vlc?page=6#120 Petrucci86 posted his own frontend program on the previous page of this thread. Might be another option for you. Good luck. | ||
outscar
2828 Posts
On April 19 2017 12:39 Aylear wrote: No idea. And not to be too rude about it, but you just told me you didn't follow the installation instructions properly. I don't know enough about Livestreamer and how it fully works to spend time troubleshooting an issue unique to you that could just end up being "lol i forgot to edit a thing you clearly specified in the OP, whoopsie!" If you still can't get it to work, maybe try some other solutions on this forum. I haven't tried these programs myself so I can't verify that they work, but: http://www.teamliquid.net/forum/brood-war/519028-scbw-afreeca-picker-vlc-livestreamer Vendethiel made a frontend program instead of a .bat file that has some additional features. It supposedly doesn't require a lot of messing with Livestreamer either. http://www.teamliquid.net/forum/brood-war/512913-guide-watch-afreeca-sc-bw-streams-with-vlc?page=6#120 Petrucci86 posted his own frontend program on the previous page of this thread. Might be another option for you. Good luck. Well the reason I didn't followed your installation because it was already installed on my PC (defiler.ru one) and it was working perfecut until now and I saw that your installation is same but only plugin files changed. I tried to replace those files and still getting errors. Might try clean install then. Also lately I installed some antivirus thingy might be it blocking. Thanks for tips! EDIT: Yeah, this fucking shit was because of antivirus, fuck them Now I can run. | ||
Vendethiel
213 Posts
Leaving that responsibility to Streamlink and building a GUI on top of it is just a easier choice. Of course you're right, but it means a one-click installer for the program would be feasible. Non-technical people will not go through with "install steamlink in this and that directory". Maybe the solution is to instead package streamlink... | ||
Craton
United States17222 Posts
I'll have to experiment some more and see if I can figure anything out. My versions: VLC 2.2.1 Livestreamer 1.11.1 Latest version of the plugins from OP Also, does anyone happen to know of the API Afeeca exposes to get stream status, thumnails, etc? I have a Windows app I wrote that leverages the Twitch API (a glorified Livestreamer GUI with a similar UI to the Twitch website) and I'd like to expand it to incorporate Afreeca as well. I think it might end up being something this community would find useful. | ||
Aylear
Norway3988 Posts
Windows 64-bit: afreeca_x64.bat (right-click and save as) Windows 32-bit: afreeca_x86.bat (right-click and save as) or http://pastebin.com/AyKrHMPF - afreeca_x64.bat (go to the link and click "download" on Pastebin) http://pastebin.com/bF7gEyaC - afreeca_x86.bat (go to the link and click "download" on Pastebin) | ||
| ||