limontec

afreeca.bat

May 7th, 2017
4,028
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Batch 12.46 KB | None | 0 0
  1. @echo off
  2. SETLOCAL EnableDelayedExpansion
  3. for /F "tokens=1,2 delims=#" %%a in ('"prompt #$H#$E# & echo on & for %%b in (1) do rem"') do (
  4.   set "DEL=%%a"
  5. )
  6.  
  7.  
  8. :CDN
  9.  
  10. echo.
  11. echo -------------------------------------------------------------------------------
  12. echo.
  13. call :ColorText 0e "Set CDN server (just pick one, switch if you experience lag)"
  14. echo.
  15. echo.
  16. call :ColorText 0d " 1"
  17. call :ColorText 0f " Amazon AWS
  18. echo.
  19. call :ColorText 0d " 2"
  20. call :ColorText 0f " GSCDN
  21. echo.
  22. echo.
  23.  
  24. set /p cdn="> "
  25.  
  26. 2>NUL CALL :CDN_%cdn%
  27. IF ERRORLEVEL 1 CALL :DEFAULT_CDN
  28.  
  29. :CDN_1
  30.   set cdn=aws
  31.   echo.
  32.   call :ColorText 0f "CDN set to"
  33.   call :ColorText 0c " Amazon AWS"
  34.   GOTO QUALITY
  35. :CDN_2
  36.   set cdn=gs
  37.   echo.
  38.   call :ColorText 0f "CDN set to"
  39.   call :ColorText 0c " GSCDN"
  40.   GOTO QUALITY
  41. :DEFAULT_CDN
  42.   set cdn=gs
  43.   echo.
  44.   call :ColorText 0f "Unintelligible garbage input by user, defaulted to GSCDN"
  45.   GOTO QUALITY
  46.  
  47.  
  48. :QUALITY
  49.  
  50. echo.
  51. echo.
  52. call :ColorText 0e "Set stream quality"
  53. echo.
  54. echo.
  55. call :ColorText 0d " 1"
  56. call :ColorText 0f " Source (1080p)"
  57. echo.
  58. call :ColorText 0d " 2"
  59. call :ColorText 0f " HD (720p)"
  60. echo.
  61. call :ColorText 0d " 3"
  62. call :ColorText 0f " SD (480p)"
  63. echo.
  64. echo.
  65.  
  66. set /p quality="> "
  67.  
  68. 2>NUL CALL :QUALITY_%quality%
  69. IF ERRORLEVEL 1 CALL :DEFAULT_QUALITY
  70.  
  71. :QUALITY_1
  72.   set quality=original
  73.   echo.
  74.   call :ColorText 0f "Quality set to"
  75.   call :ColorText 0c " SOURCE"
  76.   echo.
  77.   echo.
  78.   echo -------------------------------------------------------------------------------
  79.   GOTO STREAM
  80. :QUALITY_2
  81.   set quality=hd
  82.   echo.
  83.   call :ColorText 0f "Quality set to"
  84.   call :ColorText 0c " HD"
  85.   echo.
  86.   echo.
  87.   echo -------------------------------------------------------------------------------
  88.   GOTO STREAM
  89. :QUALITY_3
  90.   set quality=sd
  91.   echo.
  92.   call :ColorText 0f "Quality set to"
  93.   call :ColorText 0c " SD"
  94.   echo.
  95.   echo.
  96.   echo -------------------------------------------------------------------------------
  97.   GOTO STREAM
  98. :DEFAULT_QUALITY
  99.   set quality=hd
  100.   echo.
  101.   call :ColorText 0f "Unintelligible garbage input by user, defaulted to HD"
  102.   echo.
  103.   echo.
  104.   echo -------------------------------------------------------------------------------
  105.   GOTO STREAM
  106.  
  107.  
  108. :STREAM
  109.  
  110. echo.
  111. call :ColorText 0d "Name"
  112. call :ColorText 0f " or"
  113. call :ColorText 0d " Afreeca ID"
  114. call :ColorText 0f " [or"
  115. call :ColorText 0d " .online"
  116. call :ColorText 0f ", "
  117. call :ColorText 0d " .setup"
  118. call :ColorText 0f ", "
  119. call :ColorText 0d " .help"
  120. call :ColorText 0f "]"
  121. echo.
  122.  
  123.  
  124. :loop
  125.  
  126. set /p name="> "
  127.  
  128. 2>NUL CALL :CASE_%name%
  129. IF ERRORLEVEL 1 CALL :DEFAULT_CASE
  130.  
  131. :CASE_.online
  132.   start "" https://bwstreams.appspot.com
  133.   echo Launching online players list in your browser...
  134.   GOTO STREAM
  135. :CASE_.teamliquid
  136.   start "" http://www.teamliquid.net/forum/brood-war/512913-guide-watch-afreeca-sc-bw-streams-with-vlc
  137.   echo Launching TeamLiquid thread in your browser...
  138.   GOTO STREAM
  139. :CASE_.setup
  140.   GOTO CDN
  141. :CASE_.help
  142.   echo.
  143.   echo.
  144.   echo.
  145.   echo.
  146.   echo.
  147.   echo.
  148.   echo -------------------------------------------------------------------------------
  149.   echo.
  150.   call :ColorText 0e "HOW TO USE"
  151.   echo.
  152.   echo.
  153.   echo ^> Bisu
  154.   echo.
  155.   echo To begin watching a stream, enter the player's nickname or Afreeca ID.
  156.   echo The stream should start in 5 to 30 seconds. Names are not case sensitive.
  157.   echo.
  158.   echo.
  159.   call :ColorText 0e "SHOW ONLINE PLAYERS"
  160.   echo.
  161.   echo.
  162.   echo ^> .online
  163.   echo.
  164.   echo Type to launch https://bwstreams.appspot.com/ in your browser.
  165.   echo.
  166.   echo.
  167.   call :ColorText 0e "SET CDN AND QUALITY OPTIONS"
  168.   echo.
  169.   echo.
  170.   echo ^> .setup
  171.   echo.
  172.   echo Type .setup to reconfigure the CDN (content distribution network) server
  173.   echo and quality options. Try different options if you experience stream lag.
  174.   echo GSCDN tends to be more lag free, but it depends on your region.
  175.   echo.
  176.   echo Different streams can have different stream qualities. Just type .setup
  177.   echo and reconfigure the quality settings and then launch another stream. The
  178.   echo quality options for the first stream will be preserved.
  179.   echo.
  180.   echo.
  181.   call :ColorText 0e "HELP"
  182.   echo.
  183.   echo.
  184.   echo ^> .help
  185.   echo.
  186.   echo View this help file. See n) recursion
  187.   echo.
  188.   echo.
  189.   call :ColorText 0e "TROUBLESHOOTING"
  190.   echo.
  191.   echo.
  192.   echo 1) If your stream lags or buffers, FIRST switch CDN. This usually helps.
  193.   echo If it still buffers, try lowering the quality. I have been able to run
  194.   echo GSCDN on SOURCE for every stream so far.
  195.   echo.
  196.   echo 2) If the stream displays a countdown timer, close the VLC window and
  197.   echo enter the name again. This happens some times in embedded streams when
  198.   echo watching Afreeca, possibly due to CDN or ad-service problems.
  199.   echo.
  200.   echo 3) For further info, read the TeamLiquid thread by typing .teamliquid
  201.   echo.
  202.   echo -------------------------------------------------------------------------------
  203.   GOTO STREAM
  204. :CASE_41tv
  205.   set id=isee1541
  206.   GOTO PLAYER_START
  207. :CASE_910
  208.   set id=kuyol
  209.   GOTO PLAYER_START
  210. :CASE_air
  211.   set id=rudwk1220
  212.   GOTO PLAYER_START
  213. :CASE_ample
  214. :CASE_sasin
  215.   set id=hoonykkk
  216.   GOTO PLAYER_START
  217. :CASE_anytime
  218.   set id=zeusboy2714
  219.   GOTO PLAYER_START
  220. :CASE_asl
  221. :CASE_aslkor
  222.   set id=afstar1
  223.   GOTO PLAYER_START
  224. :CASE_asleng
  225.   set id=asl2eng2
  226.   GOTO PLAYER_START
  227. :CASE_autumn
  228.   set id=onstyles
  229.   GOTO PLAYER_START
  230. :CASE_backho
  231.   set id=cksdnddldhkd
  232.   GOTO PLAYER_START
  233. :CASE_beast
  234.   set id=rjsrkdgkwk12
  235.   GOTO PLAYER_START
  236. :CASE_best
  237.   set id=wodnrdldia
  238.   GOTO PLAYER_START
  239. :CASE_bisu
  240.   set id=rlaxordyd
  241.   GOTO PLAYER_START
  242. :CASE_boxer
  243.   set id=sblyh119
  244.   GOTO PLAYER_START
  245. :CASE_brave
  246.   set id=xorbzzang111
  247.   GOTO PLAYER_START
  248. :CASE_britney
  249.   set id=khm11903
  250.   GOTO PLAYER_START
  251. :CASE_spire
  252. :CASE_by.spire
  253.   set id=idch0726
  254.   GOTO PLAYER_START
  255. :CASE_calm
  256.   set id=brainzerg7
  257.   GOTO PLAYER_START
  258. :CASE_casy
  259.   set id=casy
  260.   GOTO PLAYER_START
  261. :CASE_cola
  262.   set id=nojaesang
  263.   GOTO PLAYER_START
  264. :CASE_dongrae
  265.   set id=dongrae
  266.   GOTO PLAYER_START
  267. :CASE_eagle
  268.   set id=cjsdkxjddlf
  269.   GOTO PLAYER_START
  270. :CASE_effort
  271.   set id=momo130
  272.   GOTO PLAYER_START
  273. :CASE_envy.bisu
  274.   set id=tjdwo0000
  275.   GOTO PLAYER_START
  276. :CASE_ErOs_LYH
  277.   set id=kisszzang14
  278.   GOTO PLAYER_START
  279. :CASE_ETStarTV
  280.   set id=scv306306
  281.   GOTO PLAYER_START
  282. :CASE_firebathero
  283. :CASE_fbh
  284.   set id=firebathero
  285.   GOTO PLAYER_START
  286. :CASE_fishcast
  287.   set id=fishcast
  288.   GOTO PLAYER_START
  289. :CASE_flash
  290. :CASE_byflash
  291. :CASE_by.flash
  292.   set id=byflash
  293.   GOTO PLAYER_START
  294. :CASE_force
  295. :CASE_force[name]
  296.   set id=bs1369
  297.   GOTO PLAYER_START
  298. :CASE_free
  299. :CASE_pretty
  300.   set id=dbsdydx
  301.   GOTO PLAYER_START
  302. :CASE_ggaemo
  303.   set id=kkmkhh1234
  304.   GOTO PLAYER_START
  305. :CASE_great
  306.   set id=myunghwan
  307.   GOTO PLAYER_START
  308. :CASE_guemchi
  309. :CASE_iammang
  310.   set id=rlatldgus
  311.   GOTO PLAYER_START
  312. :CASE_hero
  313.   set id=byhero
  314.   GOTO PLAYER_START
  315. :CASE_hint
  316. :CASE_hackanim
  317.   set id=kyuhoikim
  318.   GOTO PLAYER_START
  319. :CASE_hiya
  320.   set id=aisiteru99
  321.   GOTO PLAYER_START
  322. :CASE_hoejja
  323.   set id=gkm905
  324.   GOTO PLAYER_START
  325. :CASE_hogil
  326.   set id=nspzerg
  327.   GOTO PLAYER_START
  328. :CASE_horang2
  329.   set id=rudals5467
  330.   GOTO PLAYER_START
  331. :CASE_hwan
  332.   set id=wlghks910903
  333.   GOTO PLAYER_START
  334. :CASE_hwasin
  335.   set id=piroopirong
  336.   GOTO PLAYER_START
  337. :CASE_hyun
  338.   set id=understay
  339.   GOTO PLAYER_START
  340. :CASE_hyuk
  341.   set id=rlekfu6
  342.   GOTO PLAYER_START
  343. :CASE_hyvaa
  344.   set id=youszlls14
  345.   GOTO PLAYER_START
  346. :CASE_icarus
  347.   set id=psn1555
  348.   GOTO PLAYER_START
  349. :CASE_iris
  350. :CASE_berserker
  351.   set id=bht0205
  352.   GOTO PLAYER_START
  353. :CASE_jaedong
  354.   set id=Jaedong23
  355.   GOTO PLAYER_START
  356. :CASE_jaehoon
  357.   set id=rlawogns019
  358.   GOTO PLAYER_START
  359. :CASE_jangbi
  360.   set id=mycou
  361.   GOTO PLAYER_START
  362. :CASE_jat.tv
  363.   set id=yyy2222
  364.   GOTO PLAYER_START
  365. :CASE_jsmtv
  366.   set id=hiji0312
  367.   GOTO PLAYER_START
  368. :CASE_july
  369. :CASE_julyzerg
  370.   set id=julyzerg
  371.   GOTO PLAYER_START
  372. :CASE_kal
  373. :CASE_goojila
  374.   set id=rngusdl
  375.   GOTO PLAYER_START
  376. :CASE_kds
  377.   set id=cantob
  378.   GOTO PLAYER_START
  379. :CASE_killer
  380.   set id=h78ert
  381.   GOTO PLAYER_START
  382. :CASE_kimeunho
  383.   set id=dmsghdlekd
  384.   GOTO PLAYER_START
  385. :CASE_koala
  386.   set id=cyskkscv
  387.   GOTO PLAYER_START
  388. :CASE_kwanro
  389.   set id=ehrflq2013
  390.   GOTO PLAYER_START
  391. :CASE_larva
  392. :CASE_hong9
  393.   set id=dpfgc3
  394.   GOTO PLAYER_START
  395. :CASE_last
  396.   set id=rlatjdgus228
  397.   GOTO PLAYER_START
  398. :CASE_lazy
  399.   set id=hateliar
  400.   GOTO PLAYER_START
  401. :CASE_leta
  402.   set id=palko1
  403.   GOTO PLAYER_START
  404. :CASE_leto
  405.   set id=sereniss87
  406.   GOTO PLAYER_START
  407. :CASE_light
  408.   set id=scv6256
  409.   GOTO PLAYER_START
  410. :CASE_lovetv
  411.   set id=sr629
  412.   GOTO PLAYER_START
  413. :CASE_m18m
  414.   set id=minooli
  415.   GOTO PLAYER_START
  416. :CASE_mahell
  417.   set id=alsd1323
  418.   GOTO PLAYER_START
  419. :CASE_midas
  420.   set id=sangwk
  421.   GOTO PLAYER_START
  422. :CASE_mind
  423.   set id=peros777
  424.   GOTO PLAYER_START
  425. :CASE_mini
  426.   set id=bye1013
  427.   GOTO PLAYER_START
  428. :CASE_miso
  429.   set id=hdy4546
  430.   GOTO PLAYER_START
  431. :CASE_modesty
  432.   set id=tearstt
  433.   GOTO PLAYER_START
  434. :CASE_mong
  435.   set id=cksgmldbs
  436.   GOTO PLAYER_START
  437. :CASE_mook
  438.   set id=limtaemook
  439.   GOTO PLAYER_START
  440. :CASE_movie
  441.   set id=jyh8610
  442.   GOTO PLAYER_START
  443. :CASE_nada
  444.   set id=nada11200
  445.   GOTO PLAYER_START
  446. :CASE_nal_ra
  447. :CASE_nalra
  448. :CASE_ra
  449.   set id=nalra82
  450.   GOTO PLAYER_START
  451. :CASE_noble
  452.   set id=rnjsgurwls15
  453.   GOTO PLAYER_START
  454. :CASE_onicle
  455.   set id=onicle
  456.   GOTO PLAYER_START
  457. :CASE_perfectman
  458.   set id=row6400
  459.   GOTO PLAYER_START
  460. :CASE_piano
  461. :CASE_organ
  462.   set id=organ333
  463.   GOTO PLAYER_START
  464. :CASE_pure
  465.   set id=psj0436
  466.   GOTO PLAYER_START
  467. :CASE_pusan
  468.   set id=jou1025
  469.   GOTO PLAYER_START
  470. :CASE_rain
  471. :CASE_sun
  472. :CASE_by.rain
  473. :CASE_by.sun
  474.   set id=ioioiobb
  475.   GOTO PLAYER_START
  476. :CASE_rapsodytoss
  477.   set id=younggunz91
  478.   GOTO PLAYER_START
  479. :CASE_really
  480. :CASE_sea.really
  481.   set id=theferrari
  482.   GOTO PLAYER_START
  483. :CASE_rock
  484. :CASE_therock
  485. :CASE_nal_rock
  486.   set id=aghhi
  487.   GOTO PLAYER_START
  488. :CASE_roro
  489.   set id=skwangs7
  490.   GOTO PLAYER_START
  491. :CASE_rush
  492.   set id=yoo376
  493.   GOTO PLAYER_START
  494. :CASE_s2
  495.   set id=ssoov227
  496.   GOTO PLAYER_START
  497. :CASE_saber
  498. :CASE_ryul2
  499.   set id=jackpot
  500.   GOTO PLAYER_START
  501. :CASE_sabitv
  502.   set id=zzzz2z
  503.   GOTO PLAYER_START
  504. :CASE_savior
  505.   set id=mjy1123
  506.   GOTO PLAYER_START
  507. :CASE_scat.horang2
  508.   set id=comby4343
  509.   GOTO PLAYER_START
  510. :CASE_sea
  511.   set id=yuambo
  512.   GOTO PLAYER_START
  513. :CASE_sea.kh
  514.   set id=youngskh
  515.   GOTO PLAYER_START
  516. :CASE_sexy
  517.   set id=rfvtgb778
  518.   GOTO PLAYER_START
  519. :CASE_shark
  520.   set id=starbell87
  521.   GOTO PLAYER_START
  522. :CASE_sharp
  523. :CASE_sharpragu
  524.   set id=sharpragu
  525.   GOTO PLAYER_START
  526. :CASE_shine
  527.   set id=lyh8808
  528.   GOTO PLAYER_START
  529. :CASE_shinee
  530.   set id=onlysibar
  531.   GOTO PLAYER_START
  532. :CASE_shuttle
  533. :CASE_eyewater
  534.   set id=jk890202
  535.   GOTO PLAYER_START
  536. :CASE_sky
  537.   set id=gksmfaowj
  538.   GOTO PLAYER_START
  539. :CASE_skyhigh
  540.   set id=chobs0309
  541.   GOTO PLAYER_START
  542. :CASE_smile
  543.   set id=worud0608
  544.   GOTO PLAYER_START
  545. :CASE_snow
  546. :CASE_by.snow
  547.   set id=tmsh401
  548.   GOTO PLAYER_START
  549. :CASE_sonic
  550.   set id=sogoodtt
  551.   GOTO PLAYER_START
  552. :CASE_soulblacktv
  553.   set id=goodplay
  554.   GOTO PLAYER_START
  555. :CASE_soulkey
  556. :CASE_g_soulkey
  557. :CASE_neo.g_soulkey
  558.   set id=minchul
  559.   GOTO PLAYER_START
  560. :CASE_spotimes
  561.   set id=bsscamp
  562.   GOTO PLAYER_START
  563. :CASE_ssak
  564.   set id=ghtjs3833
  565.   GOTO PLAYER_START
  566. :CASE_starcue
  567.   set id=jimeang
  568.   GOTO PLAYER_START
  569. :CASE_stork
  570.   set id=koreasbg
  571.   GOTO PLAYER_START
  572. :CASE_terror
  573.   set id=y1026
  574.   GOTO PLAYER_START
  575. :CASE_trot
  576.   set id=tjdwnls123
  577.   GOTO PLAYER_START
  578. :CASE_tyson
  579.   set id=subeom12
  580.   GOTO PLAYER_START
  581. :CASE_yellow
  582.   set id=lifeisjust
  583.   GOTO PLAYER_START
  584. :CASE_zelot
  585.   set id=jh3697
  586.   GOTO PLAYER_START
  587. :CASE_zergman
  588.   set id=jun10280
  589.   GOTO PLAYER_START
  590. :CASE_zero
  591.   set id=kimmyungwun
  592.   GOTO PLAYER_START
  593. :CASE_zeus
  594.   set id=70jeontaekyu
  595.   GOTO PLAYER_START
  596. :DEFAULT_CASE
  597.   set id=%name%
  598.   GOTO PLAYER_START
  599. :PLAYER_START
  600. call :ColorText 0f "Attempting to connect to "
  601. call :ColorText 0c " %name%"
  602. echo ...
  603.  
  604. cd C:\Program Files (x86)\Streamlink\bin
  605. REM aqui você coloca o local onde está o arquivo streamlink.exe , se seu Windows for 32bits provavelmente será C:\Program Files\Streamlink\bin
  606. start /B streamlink --loglevel=error --player="C:\Program Files (x86)\VideoLAN\VLC\vlc.exe --file-caching=5000 --network-caching=5000 --meta-title=%name%" afreeca.com/%id% %cdn%_%quality%
  607. REM em "C:\Program Files (x86)\VideoLAN\VLC\vlc.exe" substitua se necessário pelo caminho correto onde está o seu VLC
  608. GOTO STREAM
  609.  
  610. :ColorText
  611. echo off
  612. <nul set /p ".=%DEL%" > "%~2"
  613. findstr /v /a:%1 /R "^$" "%~2" nul
  614. del "%~2" > nul 2>&1
  615. goto :eof
Add Comment
Please, Sign In to add comment